Skip to content

Create Provisioning Token

POST
/api/provisioning-tokens
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.

organization_id
required
Organization Id
string format: uuid
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>
description
Any of:
string
expires_at
Any of:
string format: date-time
max_devices
Any of:
integer
>= 1
name
required
Name

Human-readable name for the token

string
>= 1 characters <= 255 characters
Example generated
{
"allowed_hardware_versions": [
"example"
],
"default_scopes": [
"example"
],
"description": "example",
"expires_at": "2026-04-15T12:00:00Z",
"max_devices": 1,
"name": "example"
}

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
created_by_id
required
Any of:
string format: uuid
default_scopes
required
Default Scopes
Array<string>
description
required
Any of:
string
devices_provisioned
required
Devices Provisioned
integer
expires_at
required
Any of:
string format: date-time
id
required
Id
string format: uuid
is_active
required
Is Active
boolean
last_used_at
required
Any of:
string format: date-time
max_devices
required
Any of:
integer
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"
}
]
}