> ## Documentation Index
> Fetch the complete documentation index at: https://docs.droyd.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Requests, Responses, and Errors

> Use the common HTTP and error contract across API-key operations.

Send JSON for every write, use UUIDs exactly as returned by Droyd, and keep
client-generated `client_key` values stable when a route supports idempotency.
Successful responses include `ok: true`; unsuccessful responses include an
HTTP status plus a stable error `code` and a human-readable `message`.

```json theme={null}
{
  "ok": false,
  "error": {
    "code": "invalid_request",
    "message": "Request body must be valid JSON."
  }
}
```

Treat `400` as a request that needs correction, `401` or `403` as an
authentication or account-access problem, `404` as an inaccessible or missing
resource, and `409` as a state or idempotency conflict. Retry `500` and `503`
only when the operation's idempotency rules make doing so safe.

Ownership is intentionally non-disclosing: a resource outside the key owner's
scope normally returns `404`, not its existence or metadata. Unknown or
duplicate query parameters, malformed JSON, wrong field types, unsupported
enum values, and forbidden ownership fields return `400 invalid_request`.
Dependency failures retain a route-specific stable code when available. Do not
branch automation on `message`; branch on HTTP status and `error.code`.
