Creates a new provisioning token that can be used to onboard edge devices. The raw token is only returned once and should be saved securely.
The token field is only returned at creation time. Store it immediately or use the setup_command on your device right away.
Request Body
A descriptive name for the token (e.g., “Production Line 1”)
Number of days until the token expires. Set to null for no expiration.
If true, the token will be automatically revoked after the first successful device provisioning.
Response
Unique identifier for the token
The name provided when creating the token
The raw provisioning token (format: apt_<hex>). Only returned once!
Whether the token will auto-revoke after first use
ISO 8601 timestamp of creation
ISO 8601 timestamp when the token expires (null if never)
Ready-to-use shell command for device setup
curl -X POST https://acusight.io/api/provisioning-tokens \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Line 1",
"expires_in_days": 7,
"single_use": true
}'
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Line 1",
"token": "apt_a1b2c3d4e5f6...",
"single_use": true,
"created_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-22T10:30:00Z",
"setup_command": "curl -sSL https://acusight.io/setup | sh -s -- apt_a1b2c3d4e5f6..."
}
}