Sandbox
Sandbox is where you build. Everything in it is real code paths against real logic, with nothing real at stake.
What Sandbox is
A logical environment inside your tenant, separate from Production. Same API, same behaviour, same validation, same errors. Issuers, credential configurations and credentials created in Sandbox exist only in Sandbox.
It is not a mock. A request that succeeds in Sandbox exercises the same code that will run in Production.
Getting a key
Sandbox is provisioned once per tenant, and it returns an API key.
POST /api/sandbox
This is the one administrative call in the whole flow. It requires staff authentication and is made by whoever administers your DiligenceID tenant — typically once, during onboarding. Everything afterwards is done with the key it returns.
The key is shown once. It is stored hashed and cannot be retrieved later. If you lose it, provision a new one; there is no recovery path, by design.
Recognising your key
| Prefix | Environment |
|---|---|
did_test. |
Sandbox |
did_live. |
Production |
Assert on the prefix at startup. Both SDKs expose isSandbox for exactly this:
var credential = new DiligenceApiKeyCredential(apiKey);
if (!credential.IsSandbox) throw new InvalidOperationException("Refusing to run tests against production.");
A test suite that silently pointed at Production would issue real credentials to real people.
What is isolated
Everything. Issuers, credential configurations, verification policies, credentials, transactions, verifications.
A Sandbox key cannot see, configure or use anything in Production, and the reverse holds. The environment is taken from the key, never from a request field — so a request cannot ask for the other environment.
A cross-environment read returns 404, not 403. A 403 would confirm the resource exists, which is itself a disclosure.
Moving to Production
There is no migration. Sandbox configuration does not copy across, deliberately: a Production issuer should be created and reviewed as a Production issuer, not inherited from something set up while learning.
Recreate configuration in Production through the same Management API calls, with a did_live. key. If your
setup is scripted, that is the same script with a different key — which is a reason to script it.
Before going live, read production integration.