Provisions a new edge device using a valid provisioning token. This endpoint is typically called by the setup script running on the edge device.
This is a public endpoint - no bearer token required. Authentication is via the provisioning token in the request body.
Request Body
The provisioning token (format: apt_<hex>)
Information about the device being provisionedShow device_info properties
Unique device identifier (typically Docker daemon ID)
Display name for the device. If omitted, auto-generated from device_id.
Hardware identifier (e.g., “RPi4-8GB-v1.4”)
Version of the Acusight agent
Response
The device’s unique identifier
Same as device_id (for compatibility)
Device API key for future requests (format: adk_<hex>). Only returned once!
Base URL for device API calls
Portainer Edge key for agent deployment (optional, if Portainer is configured)
Portainer endpoint ID (optional, if Portainer is configured)
Errors
| Status | Code | Description |
|---|
| 400 | VALIDATION_ERROR | Invalid request body |
| 401 | INVALID_TOKEN | Token format invalid or not found |
| 401 | TOKEN_EXPIRED | Token has expired |
| 409 | DEVICE_EXISTS | Device already registered |
curl -X POST https://acusight.io/api/devices/provision \
-H "Content-Type: application/json" \
-d '{
"token": "apt_a1b2c3d4e5f6...",
"device_info": {
"device_id": "ABCD:1234:5678:EFGH",
"name": "Edge Camera 1",
"ip_address": "192.168.1.50",
"agent_version": "1.0.0"
}
}'
{
"success": true,
"data": {
"device_id": "ABCD:1234:5678:EFGH",
"endpoint_id": "ABCD:1234:5678:EFGH",
"api_key": "adk_x9y8z7w6v5u4...",
"api_endpoint": "https://acusight.io",
"edge_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"portainer_endpoint_id": 5
}
}