Create Provisioning Token
POST
/api/provisioning-tokens
const url = 'https://example.com/api/provisioning-tokens?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"allowed_hardware_versions":["example"],"default_scopes":["example"],"description":"example","expires_at":"2026-04-15T12:00:00Z","max_devices":1,"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/provisioning-tokens?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "allowed_hardware_versions": [ "example" ], "default_scopes": [ "example" ], "description": "example", "expires_at": "2026-04-15T12:00:00Z", "max_devices": 1, "name": "example" }'Create a new provisioning token for fleet onboarding.
This token should be baked into your Yocto image. When devices boot, they use this token to register and receive a unique API key.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ” organization_id
required
Organization Id
string format: uuid
Request Bodyrequired
Section titled “ Request Bodyrequired ” Media type application/json
ProvisioningTokenCreate
Create a provisioning token for fleet onboarding
object
allowed_hardware_versions
Allowed Hardware Versions
Allowed hardware versions (empty = all)
Array<string>
default_scopes
Default Scopes
Scopes to assign to generated API keys
Array<string>
name
required
Name
Human-readable name for the token
string
Example generated
{ "allowed_hardware_versions": [ "example" ], "default_scopes": [ "example" ], "description": "example", "expires_at": "2026-04-15T12:00:00Z", "max_devices": 1, "name": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
ProvisioningTokenCreatedResponse
Response when provisioning token is created (includes full token)
object
allowed_hardware_versions
required
Allowed Hardware Versions
Array<string>
created_at
required
Created At
string format: date-time
default_scopes
required
Default Scopes
Array<string>
devices_provisioned
required
Devices Provisioned
integer
id
required
Id
string format: uuid
is_active
required
Is Active
boolean
name
required
Name
string
organization_id
required
Organization Id
string format: uuid
token
required
Token
string
token_prefix
required
Token Prefix
string
Example generated
{ "allowed_hardware_versions": [ "example" ], "created_at": "2026-04-15T12:00:00Z", "created_by_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "default_scopes": [ "example" ], "description": "example", "devices_provisioned": 1, "expires_at": "2026-04-15T12:00:00Z", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "is_active": true, "last_used_at": "2026-04-15T12:00:00Z", "max_devices": 1, "name": "example", "organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "token": "example", "token_prefix": "example"}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}