Authentication and scopes
The Canary API authenticates every request with an organization API key. Send the key with the HTTP Bearer scheme.Key prefixes and data access
Create a key
- As an organization administrator, open Settings → API Keys in Canary.
- Select Create API Key.
- Give the key a name that identifies its owner and workload.
- Choose the test or live prefix.
- Grant the smallest set of scopes required by the integration.
- Copy the key into your secret manager when Canary displays it.
Scope model
Every endpoint requires one exact scope. Read and write capabilities are separate: a write scope does not imply its read scope. Keys belong to one organization; an organization ID in a request cannot switch the key’s tenant. API keys act as integration principals, not as the human user who created them. Human team membership and role presets do not replace API-key scopes.Work management
Equipment and inventory
Linking or unlinking a part to an asset requires
parts:write. Both resources must belong to the key’s organization.
Work-order parts and cost visibility
GET /work-orders/{id}/parts uses work_orders:read; its commands use work_orders:write. These are work-order operations, not direct inventory adjustment endpoints. Use the returned capabilities to determine allowed transitions and edits. Organization settings, lifecycle rules, and stock availability can still reject a command with the correct scope.
Work-order reads include their economic projection. work_orders:read therefore grants visibility of work-order labor rates, labor costs, and purchase costs; it is not a cost-redacted permission.
Organization feature modules
Scopes do not enable disabled features. These module checks apply in addition to scopes and tenant checks:
Identifier resolution filters unavailable targets. Retiring an identifier and archiving a meter remain available for cleanup after a module is disabled. Work-order parts retain history and expose service-computed capabilities for permitted recovery; a disabled module does not grant permission to create new stock commitments.
Organization data
Keep keys safe
- Store keys in a secret manager or protected environment variable.
- Create one key per integration and deployment environment.
- Keep keys out of source control, client-side applications, logs, URLs, and support screenshots.
- Rotate a key by creating its replacement, deploying the replacement, then revoking the previous key.
- Revoke a key immediately when its owner or workload changes unexpectedly.
Authentication and authorization errors
Authentication errors useapplication/problem+json and include the same X-Request-ID value as the body request_id.
The generated endpoint reference displays each operation’s required scope.
Revoke a key
Open Settings → API Keys, select the key, and confirm revocation. Requests made with that key begin returning401 invalid_api_key immediately.