Core API
Provision Device
Provisions a new edge device using a provisioning token
POST
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 provisioned
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 |