Provision a new token
Registers a token in your tenant. The token starts in PROVISIONED, or in ACTIVE when auto_activate is true. uid must be unique across every tenant on the platform, and metadata is validated against the tenant TOKEN metadata schema. A tenant without a TOKEN metadata schema cannot store metadata: any non-empty map is a 422.
Requires the emsp:tokens:write scope.
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Client-generated unique key per operation intent (UUID). Same key + identical body replays the original response; same key + different body returns 409.
Body
RFID, APP_USER, AD_HOC_USER, EMAID, OTHER Caller-supplied, unique across every tenant on the platform
1 - 50Contract or credential identity, e.g. an eMAID
1 - 50Issuer name associated with the credential
1 - 100OCPI whitelist policy. Required, no default
ALWAYS, ALLOWED, ALLOWED_OFFLINE, NEVER 1 - 64Preferred language, e.g. en or da
2 - 10Defaults to the creation time
Omit for no expiry
Name/value pairs validated against the tenant's active TOKEN metadata schema. A tenant without a TOKEN metadata schema cannot store metadata: any non-empty map is a 422
Spirii EMSP token groups to join at provision time, each one of the tenant's own group ids
100OCPI token group id used in roaming payloads. Unrelated to Spirii EMSP token groups
1 - 50Provision straight into ACTIVE. Whitelist distribution to CPO networks starts in the background, and whitelist_distributed turns true once it completes
Response
The provisioned token
Canonical schema version
v1 Stable internal token id, commonly a UUIDv7
64Owning tenant, set by the platform
RFID, APP_USER, AD_HOC_USER, EMAID, OTHER Primary credential identifier, unique across every tenant on the platform
50Contract or credential identity, e.g. an eMAID
50Issuer name associated with the credential
100OCPI whitelist policy
ALWAYS, ALLOWED, ALLOWED_OFFLINE, NEVER PROVISIONED, ACTIVE, SUSPENDED, EXPIRED, REVOKED Whether the token has been distributed to whitelist-capable CPO networks
When the token was created in the platform registry
Canonical publication timestamp propagated to roaming partners
Derived from the EMSP identity that issues the token. Null when the registry does not carry it
2Derived from the EMSP identity that issues the token. Null when the registry does not carry it
364Preferred language of the token owner
OCPI token group id used in roaming payloads. Unrelated to Spirii EMSP token groups
50Primary Spirii EMSP token group. A convenience only: membership is many-to-many and is managed through POST /emsp/v1/token-groups/{groupId}/tokens. Null when the registry names no primary group
50Name/value pairs validated against the tenant's active TOKEN metadata schema