Skip to content

Errors ​

Failed requests return an HTTP error status and an error envelope.

Error format ​

json
{
  "success": false,
  "data": null,
  "error": {
    "code": 404,
    "reason": "invalid_device_credentials",
    "message": "Device does not exist or the safe code is incorrect."
  }
}
FieldTypeDescription
codeintegerHTTP status code
reasonstring | nullMachine-readable reason, when the endpoint provides one
messagestringHuman-readable text. Field validation errors use field: message. Some messages follow Accept-Language.

Handle errors by HTTP status and reason. Show message to people, but do not parse it.

Generic errors ​

Authentication failed ​

The request has no credentials, or the token is invalid, expired, or inactive. The API returns 403 for these cases, not 401.

json
{
  "success": false,
  "data": null,
  "error": { "code": 403, "reason": null, "message": "Invalid token" }
}

Forbidden ​

The caller lacks the role for the endpoint, the resource is outside the token's project scope, or an API token called an Owner-only endpoint.

json
{
  "success": false,
  "data": null,
  "error": { "code": 403, "reason": null, "message": "You do not have permission to perform this action." }
}

Bad request ​

A parameter is missing or invalid. message names the first failing field.

json
{
  "success": false,
  "data": null,
  "error": { "code": 400, "reason": null, "message": "port must be an integer between 1 and 65535." }
}

Not found ​

The resource does not exist, or the caller cannot see it.

json
{
  "success": false,
  "data": null,
  "error": { "code": 404, "reason": null, "message": "Device not found." }
}

Method not allowed ​

The resource does not support the HTTP method, for example POST /projects/{project_id}/devices/.

Service unavailable ​

A dependency failed: the device gateway, the real-time data store, or the export service. Retry with exponential backoff.

Internal server error ​

An unexpected failure. Retry once; contact support if the error persists.

Plan errors ​

StatusReasonDescription
403membership_readonlyThe organization's plan is inactive. Read requests work; write requests fail. Point off and stop commands stay available.
403membership_quota_exceededCreating or moving the resource would exceed the plan's project, device, or point quota.

Reason codes ​

StatusReasonEndpointDescription
400device_already_assignedBind a deviceThe device is already in a project
400device_owned_by_other_orgBind a deviceThe device belongs to another organization
404invalid_device_credentialsBind a deviceWrong serial number or safe code
409point_in_useDelete a pointOther configuration still references the point
400INVALID_DEVICECreate an export taskdevice_id is missing or not a positive integer
400INVALID_FACTORSCreate an export taskfactors is missing or empty
403INVALID_FACTORSCreate an export taskA point does not exist on the selected device
400TOO_MANY_FACTORSCreate an export taskMore points than the export limit
400INVALID_TIME_RANGECreate an export taskMissing time, or end_time before start_time
400EXPORT_RANGE_TOO_LARGECreate an export taskRange longer than the export limit
400INVALID_FORMATCreate an export taskformat is not csv or json
400INVALID_NAMECreate an export taskname is longer than 128 characters
400INVALID_IDEMPOTENCY_KEYCreate an export taskIdempotency-Key is longer than 64 characters
404DEVICE_NOT_FOUNDCreate an export taskThe device is not in the project
409TASK_NOT_CANCELLABLECancel an export taskThe task has already finished
409TASK_NOT_RETRYABLERetry an export taskOnly failed tasks can be retried
409TASK_NOT_DELETABLEDelete an export taskThe task is still running
409 / 404EXPORT_FILE_MISSINGGet a download URLThe task has no file yet (409) or the file is gone (404)
410EXPORT_FILE_EXPIREDGet a download URLThe file passed its retention period
503EXPORT_TEMPORARILY_UNAVAILABLEExport tasksThe export service or file storage is unavailable