cURL
/v1 (e.g. POST /v1/messages/send). The /v1 prefix is immutable — backwards-compatible changes never break existing integrations.
Authentication
Authenticate with a bearer API key on every request:cURL
gork_live_... (production) or gork_test_... (test). Only the SHA-256 hash is stored server-side — the raw key is shown exactly once at creation and can never be retrieved again.
Scopes
Every key carries a set of scopes. Endpoints declare the scope they require, and a key without it receives403 insufficient_scope. A key with the * wildcard scope (the default for unbound keys) may call everything.
Resource wildcards are also honored:
messages:* covers both messages:read and messages:send.
Inbox-bound agent keys (created with an
inboxId) may only hold mail scopes — inboxes:read, messages:read, messages:send, threads:read — and every call is confined to their own inbox. See API Keys.Success envelope
Every successful response wraps its payload in adata envelope:
200 OK
data:
200 OK
Error envelope
Errors always use the same shape:422 Unprocessable Entity
Idempotency
POST /v1/messages/send accepts an Idempotency-Key header. Replaying a request with the same key returns the original result instead of sending twice:
cURL
- Keys are capped at 255 characters — longer values are rejected with
400 validation_failed. - A replayed delivery returns HTTP 200 (not 201) with an
Idempotent-Replayed: trueresponse header. - Always generate a fresh UUID per logical send, and reuse it only when retrying that same send after a network failure.
Rate limits
Requests are limited to 240 requests per minute per organization. Every authenticated response carries the current budget:
Exceeding the budget returns
429 rate_limit_exceeded. Back off and retry after the reset time.
Health and machine-readable spec
GET https://api.gork.email/healthreturns{ "status": "healthy", "service": "gork.email", ... }with no authentication. Use it for uptime checks.GET https://api.gork.email/openapi.jsonserves the full OpenAPI specification — the same source SDKs and agent tool definitions are generated from.