Duet Machines
Reference · API reference

Reference

API reference

Every operation a workspace API key can call, generated from the API's own OpenAPI schema when you open this page.

#Authentication

Create an API key in Settings; it is shown once and only its hash is stored. Send it as Authorization: Bearer <key>. A key acts as the member who created it, with their current role, in that workspace: operations reserved for owners and admins (marked Owner or admin below) answer 403 admin_required for a member's key, and removing the member deletes their keys. Every resource outside the key's workspace answers 404.

Managing members, invites, API keys, alert channels, exclusion rules and redaction needs a signed-in session, never a key, so those operations are not listed here. The schema itself is at /api/openapi.json.

The optional X-Duet-Environment header scopes every read of a request to one environment; without it a request reads all. Errors are JSON with a detail field: a short code such as agent_not_found, a sentence, or the validation errors of a 422.

#Operations