Skip to main content
When you sign up for the Draftable API, you are issued two sets of credentials rather than one. Each set is an account ID paired with an auth token, and they are labelled test and production. This catches a lot of people out, so it is worth stating plainly.
The two credential sets are functionally identical. Both talk to the same API, run the same comparison engine, support the same file types and options, and return the same results. Neither one is a sandbox, a mock, or a reduced-capability environment.

So what is the difference?

The difference is labelling, not behaviour. The two sets exist so you can keep your development and testing traffic separate from your live traffic. The only visible distinction is in the account ID itself. Your test account ID carries a -test suffix, and your production account ID does not.
The auth tokens are generated the same way for both and look the same. Each account ID has its own auth token, so you cannot mix a production account ID with a test auth token.

Why have two at all?

Because comparisons created through one credential set are not visible to the other. That gives you a clean separation without needing a second Draftable account. In practice, this means:
  • Your automated tests and local development can create as many comparisons as they need without those comparisons appearing alongside your real, customer-facing ones
  • You can list, inspect and delete everything in your test stream without any risk of touching production data
  • Usage can be reported separately for the two streams, so your test traffic does not obscure your real usage patterns
  • You can rotate or share test credentials more freely than production credentials, because they are not attached to live customer documents
Separation is the only protection you get. Test credentials are not a safety net. A comparison created with test credentials is a real comparison, processed the same way and stored the same way. Do not submit documents to the test stream that you would not be willing to submit to production.

Which one should I use?

1

Use test credentials while you are building

Use the test account ID and auth token for local development, CI pipelines, integration tests, proof-of-concept work and anything exploratory.
2

Switch to production credentials when you go live

When your integration is serving real users, switch to the production account ID and auth token. This is normally a configuration change only, since nothing else about your code needs to change.
3

Keep them in separate configuration

Store the two credential sets in separate environment variables or secrets, so that promoting a build between environments swaps the credentials rather than requiring a code change.
Because the two sets behave identically, a working integration against test credentials will work against production credentials. There is no second round of API compatibility testing to do when you switch.

Common questions

Test and production usage are recorded separately, but neither stream is a free tier. If you are unsure how your particular agreement treats test usage, contact us at support@draftable.com and we will confirm it for your account.
No. Listing comparisons returns only the comparisons created with the credentials you authenticated with. To see your test comparisons, authenticate with your test credentials.
Both sets are issued automatically when the account is created, so they exist even if you have only ever used one. If you cannot locate them, contact support@draftable.com and we will retrieve them for you.
Accounts are issued exactly one test and one production credential set. If you need further separation, for example per-team or per-environment isolation, contact us to discuss the right structure for your organisation.
No. Both credential sets remain valid for the life of the account. Either auth token can be reset if you believe it has been exposed.

If a token is exposed

Treat an exposed production auth token as an incident and contact support@draftable.com immediately so it can be reset. An exposed test auth token is lower risk, but it still allows someone to create comparisons against your account. Have it reset as well.

Authenticating with the Draftable API

Getting started with the Draftable API

Customizing your account and viewer