Skip to main content
POST
/
core
/
devices
/
provision
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
  }
}
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

token
string
required
The provisioning token (format: apt_<hex>)
device_info
object
required
Information about the device being provisioned

Response

device_id
string
The device’s unique identifier
endpoint_id
string
Same as device_id (for compatibility)
api_key
string
Device API key for future requests (format: adk_<hex>). Only returned once!
api_endpoint
string
Base URL for device API calls
edge_key
string
Portainer Edge key for agent deployment (optional, if Portainer is configured)
portainer_endpoint_id
integer
Portainer endpoint ID (optional, if Portainer is configured)

Errors

StatusCodeDescription
400VALIDATION_ERRORInvalid request body
401INVALID_TOKENToken format invalid or not found
401TOKEN_EXPIREDToken has expired
409DEVICE_EXISTSDevice 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
  }
}