> ## Documentation Index
> Fetch the complete documentation index at: https://help.draftable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test and production accounts in the Draftable API

> Every Draftable API account comes with two sets of credentials, one labelled test and one labelled production. This article explains what the difference actually is and how to use them.

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.

<Note>
  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.
</Note>

## 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.

```
Production account ID:   aBcDeFgH
Test account ID:         aBcDeFgH-test
```

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

<Warning>
  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.
</Warning>

## Which one should I use?

<Steps>
  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>
</Steps>

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

<AccordionGroup>
  <Accordion title="Are comparisons made with test credentials free?">
    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](mailto:support@draftable.com)** and we will confirm it for your account.
  </Accordion>

  <Accordion title="Can I see my test comparisons in the same place as my production ones?">
    No. Listing comparisons returns only the comparisons created with the credentials you authenticated with. To see your test comparisons, authenticate with your test credentials.
  </Accordion>

  <Accordion title="I only ever see one set of credentials. Where is the other one?">
    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](mailto:support@draftable.com)** and we will retrieve them for you.
  </Accordion>

  <Accordion title="Can I get more than two credential sets?">
    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.
  </Accordion>

  <Accordion title="Do test credentials expire?">
    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.
  </Accordion>
</AccordionGroup>

## If a token is exposed

Treat an exposed **production** auth token as an incident and contact **[support@draftable.com](mailto: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.

## Related articles

<CardGroup>
  <Card title="Authenticating with the Draftable API" icon="key" href="/hc/en-us/articles/Draftable-API-authentication" iconType="solid" horizontal />

  <Card title="Getting started with the Draftable API" icon="rocket" href="/hc/en-us/articles/Draftable-API-getting-started" iconType="solid" horizontal />

  <Card title="Customizing your account and viewer" icon="sliders" href="/hc/en-us/articles/Customizing-your-Draftable-API-account-and-viewer" iconType="solid" horizontal />
</CardGroup>
