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 within the tenant, and metadata is validated against the tenant TOKEN metadata schema.
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 within the tenant
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 ISO 3166-1 alpha-2, e.g. DK
2Party ID of the token owner, e.g. SPI
31 - 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
Spirii EMSP token groups to join at provision time. Canonical group ids are opaque strings up to 50 characters, so they are not validated as UUIDs here
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 within the tenant
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
2364Preferred language of the token owner
OCPI token group id used in roaming payloads. Unrelated to Spirii EMSP token groups
50Primary Spirii EMSP token group, set at provision time. A convenience only: membership is many-to-many and is managed through POST /emsp/v1/token-groups/{groupId}/tokens
50Name/value pairs validated against the tenant's active TOKEN metadata schema