Developers

Authentication

The manufacturer API uses API keys sent in the X-Api-Key header. Each key belongs to one company, carries only the scopes you choose, and can be revoked at any time.

Create a key

  1. Sign in to the company portal as an owner or admin. Only owners and admins can manage API keys, and your company must be approved by CredChek.
  2. Go to Settings → API keys and select Create API key.
  3. Enter a Name, pick a preset under Start from a preset or tick individual Scopes, choose when it Expires, then select Create key.
  4. Copy the key from Copy your new API key. This is the only time you’ll see the full key.

Send the key

shell
curl https://api.credchek.com/v1/products -H "X-Api-Key: $CREDCHECK_API_KEY"

Server-side only

Use keys from your own servers only. Never put a key in a website, mobile app, public repository or log. Store it in a secrets manager. If a key may have leaked, revoke it in Settings → API keys (it stops working at once) and create a new one.

Sandbox and production

EnvironmentBase URLKey prefix
Productionhttps://api.credchek.comcc_live_
Sandboxhttps://api.sandbox.credchek.comcc_test_

The sandbox has its own accounts and data. Create sandbox keys in the sandbox portal ([[SANDBOX PORTAL URL]]). A key only works in its own environment: a cc_test_ key sent to production (or the reverse) is rejected with 401 wrong_environment.

Scopes

Endpoints are closed to API keys unless they opt in to a scope. Team, billing, settings, API key management and sign-in endpoints can never be called with a key. The API reference shows the scope each endpoint needs.

ScopeAllows
products:readRead products, batches and batch details
products:writeCreate, update and delete products and add batches
recalls:writeStart batch recalls
codes:readRead code metadata and generation jobs (never plaintext serials)
codes:writeGenerate and import codes, change code status
codes:exportDownload encrypted code deliverables (plaintext serials)
analytics:readRead verification analytics
alerts:readRead fraud alerts
alerts:writeUpdate fraud alert status
reports:readRead consumer reports
reports:writeUpdate consumer report status and respond
webhooks:manageManage webhook endpoints and deliveries

Presets in the portal

  • Read-only reporting: products:read, codes:read, analytics:read
  • ERP / product sync: products:read, products:write
  • Packaging line (codes): products:read, codes:read, codes:write, codes:export
  • Alerts & webhooks: alerts:read, reports:read, webhooks:manage

codes:export returns plaintext serials

Only give it to the system that prints your codes.

Keys never exceed their creator’s permissions

A key acts on behalf of the person who created it. Every request is checked against both the key’s scopes and that person’s current role in the company. If their role changes or they lose access, the key loses those permissions too.

Authentication errors

StatusCodeMeaning
401invalid_api_keyThe key is missing, malformed or unknown.
401wrong_environmentA test key was sent to production, or a live key to the sandbox.
401api_key_revokedThe key has been revoked.
401api_key_expiredThe key has passed its expiry date.
403insufficient_scopeThe key doesn’t have the scope this endpoint needs.
403api_key_not_allowedThis endpoint is not available to API keys.

Next: Errors and rate limits

Authentication · CredChek