Departments API Reference
Enterprise API endpoints for managing departments.
List departments on this account
/departmentsQuery Parameters
| Parameter | In | Required |
|---|---|---|
| limit | query | No |
| cursor | query | No |
| sort | query | No |
Request Example
Responses
OK.
Unauthorized, invalid or expired authorization token
Forbidden. One of: (1) the token is valid but lacks the required scope for this endpoint (no body); (2) the OAuth client's access has been revoked ('{error: "The user has revoked access for this application..."}'). Never returned on the API-key auth path, which does not check scope at all.
No example response recorded for this status code.
Example response — 402-account-suspended:
Example response — 402-trial-ended:
No example response recorded for this status code.
List properties in a department
/departments/{departmentId}/propertiesPath Parameters
| Parameter | Type | Required |
|---|---|---|
| departmentId | string | Yes |
Query Parameters
| Parameter | In | Required |
|---|---|---|
| limit | query | No |
| cursor | query | No |
| sort | query | No |
Request Example
Responses
OK. Empty 'payload' (not a 404) if the department has zero properties.
Unauthorized, invalid or expired authorization token
Forbidden. One of: (1) the token is valid but lacks the required scope for this endpoint (no body); (2) the OAuth client's access has been revoked ('{error: "The user has revoked access for this application..."}'). Never returned on the API-key auth path, which does not check scope at all.
Department not found.
No example response recorded for this status code.
Example response — 402-account-suspended:
Example response — 402-trial-ended:
No example response recorded for this status code.
List access records for a department
/departments/{id}/accessSame response shape as GET /devices/{id}/access, scoped to the department.
Path Parameters
| Parameter | Type | Required |
|---|---|---|
| id | string | Yes |
Query Parameters
| Parameter | In | Required |
|---|---|---|
| limit | query | No |
| cursor | query | No |
| sort | query | No |
Request Example
Responses
OK.
Unauthorized, invalid or expired authorization token
Forbidden. One of: (1) the token is valid but lacks the required scope for this endpoint (no body); (2) the OAuth client's access has been revoked ('{error: "The user has revoked access for this application..."}'). Never returned on the API-key auth path, which does not check scope at all.
Department not found.
No example response recorded for this status code.
Example response — 402-account-suspended:
Example response — 402-trial-ended:
No example response recorded for this status code.
List devices in a department
/departments/{id}/devicesSame response shape as GET /devices, scoped to the department.
Path Parameters
| Parameter | Type | Required |
|---|---|---|
| id | string | Yes |
Query Parameters
| Parameter | In | Required |
|---|---|---|
| limit | query | No |
| cursor | query | No |
| sort | query | No |
Request Example
Responses
OK.
Unauthorized, invalid or expired authorization token
Forbidden. One of: (1) the token is valid but lacks the required scope for this endpoint (no body); (2) the OAuth client's access has been revoked ('{error: "The user has revoked access for this application..."}'). Never returned on the API-key auth path, which does not check scope at all.
Department not found.
No example response recorded for this status code.
Example response — 402-account-suspended:
Example response — 402-trial-ended:
No example response recorded for this status code.