Skip to main content
POST
curl
The credential is consumed by the device lane, described in SDK event submission, which also lists what the server enforces on every device request and which events are safe to drop under backpressure.

Authorizations

x-api-key
string
header
required

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

Body

application/json

camelCase aliases are accepted: vendorData, entityType, allowedEventCategories, ttlSeconds, maxUses, bindToOrigin.

vendor_data
string
required

Your id for the subject every event submitted with this credential belongs to.

Required string length: 1 - 255
entity_type
string
default:individual

company binds a company subject; any other value (default individual) binds an individual.

Maximum string length: 32
allowed_event_categories
enum<string>[]

Categories the credential may submit. Omit it or send [] to allow every category.

Available options:
auth,
session,
gameplay,
bonus,
affiliate,
payment,
dispute,
security,
responsible_gambling,
custom
ttl_seconds
integer
default:900

Lifetime of the credential in seconds.

Required range: 60 <= x <= 86400
max_uses
integer | null
default:1000

Number of events the credential may submit (a batch spends one use per event). Send null for no cap within the lifetime.

Required range: x >= 1
bind_to_origin
string | null

When set, the browser Origin header of every device request must equal this value exactly; a request without Origin is refused.

Maximum string length: 255

Response

The credential was minted. Hand monitoring_token to the app and treat it as a secret until expires_at.

monitoring_token
string
required

The device credential (a 43-character URL-safe token). Send it in the X-Monitoring-Token header.

expires_at
string<date-time>
required

When the credential stops being accepted.

allowed_event_categories
enum<string>[]
required

Categories the credential may submit; [] means every category.

Available options:
auth,
session,
gameplay,
bonus,
affiliate,
payment,
dispute,
security,
responsible_gambling,
custom
max_uses
integer | null
required

Event budget of the credential; null means no cap.

bind_to_origin
string | null
required

Origin the credential is bound to, or null.