{"openapi":"3.1.0","info":{"title":"STATXE Public API","version":"1.0.0","description":"Production public API for inbox, outbox, contacts, segments, and webhooks. Human docs: https://docs.statxe.com — OpenAPI only covers the public `/api/v1` surface (no provider or admin routes).","contact":{"url":"https://docs.statxe.com"}},"externalDocs":{"description":"STATXE developer documentation","url":"https://docs.statxe.com"},"servers":[{"url":"https://api.statxe.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Getting Started"},{"name":"Domains"},{"name":"Contacts"},{"name":"Segments"},{"name":"Inbox"},{"name":"Outbox"},{"name":"Webhooks"}],"paths":{"/me":{"get":{"tags":["Getting Started"],"summary":"Test an API key","description":"Returns the authenticated org, key id, scopes, and rate-limit profile.","x-required-scopes":["me:read"],"responses":{"200":{"description":"Current API key details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/domains":{"get":{"tags":["Domains"],"summary":"List sending domain options","description":"Returns verified sending domains in the workspace with available sender identities per domain.","x-required-scopes":["domains:read"],"responses":{"200":{"description":"Domain options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOptionListEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts","x-required-scopes":["contacts:read"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Contact list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Contacts"],"summary":"Create a contact","x-required-scopes":["contacts:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactRequest"}}}},"responses":{"201":{"description":"Created contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable — well-formed but rejected by a business rule (e.g. the contact email failed quality validation). See the error `details`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/contacts/{id}":{"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"get":{"tags":["Contacts"],"summary":"Retrieve a contact","x-required-scopes":["contacts:read"],"responses":{"200":{"description":"Contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found, or not owned by this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"tags":["Contacts"],"summary":"Update a contact","x-required-scopes":["contacts:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactRequest"}}}},"responses":{"200":{"description":"Updated contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found, or not owned by this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"tags":["Contacts"],"summary":"Delete a contact","x-required-scopes":["contacts:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Deleted contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found, or not owned by this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/segments":{"get":{"tags":["Segments"],"summary":"List segments","x-required-scopes":["segments:read"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Segment list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentListEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Segments"],"summary":"Create a segment","x-required-scopes":["segments:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentRequest"}}}},"responses":{"201":{"description":"Created segment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/inbox/threads":{"get":{"tags":["Inbox"],"summary":"List inbox threads","x-required-scopes":["inbox.threads:read"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Inbox thread list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxThreadListEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/outbox/broadcasts":{"get":{"tags":["Outbox"],"summary":"List broadcasts","x-required-scopes":["outbox.broadcasts:read"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Broadcast list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastListEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Outbox"],"summary":"Draft a broadcast","x-required-scopes":["outbox.broadcasts:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastRequest"}}}},"responses":{"201":{"description":"Created broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/outbox/emails":{"post":{"tags":["Outbox"],"summary":"Send a transactional email","description":"Sends one transactional email from an address on a sendable workspace domain. Consumes one transactional credit per recipient (to + cc + bcc) and counts against the sending domain's daily warm-up cap. Returns 202 once the message is accepted for delivery — delivery outcome arrives on your webhooks.","x-required-scopes":["outbox.transactional:send"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTransactionalEmailRequest"}}}},"responses":{"202":{"description":"Message accepted for delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionalEmailEnvelope"}}}},"400":{"description":"Rejected before delivery. `details.reason` is one of INVALID_FROM, NO_RECIPIENTS, TOO_MANY_RECIPIENTS, EMPTY_BODY, TOO_MANY_ATTACHMENTS, or INVALID_ATTACHMENT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient transactional credits, and overage billing is not enabled for this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — sender domain is missing, not ready, or needs attention, or a recipient is suppressed. `details.reason` is one of DOMAIN_NOT_FOUND, DOMAIN_NOT_READY, DOMAIN_ATTENTION, DOMAIN_REPUTATION_RECOVERY, or RECIPIENT_SUPPRESSED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"A referenced `attachment_id` does not exist in this workspace. `details.reason` is INVALID_ATTACHMENT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large. `details.reason` is REQUEST_TOO_LARGE (the raw request body exceeded the route's byte ceiling), MESSAGE_TOO_LARGE (body over 25 MB), or ATTACHMENT_TOO_LARGE (a single attachment over 12 MB, or body plus attachments over 25 MB).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The upstream delivery provider rejected the message. Credits and domain quota are released; safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/outbox/attachments":{"post":{"tags":["Outbox"],"summary":"Create an attachment upload URL","description":"Returns a short-lived URL to upload a file directly to storage, plus the `attachment_id` to reference when sending. Use this for any attachment: the bytes never pass through the API, so this is the only way to send files larger than the inbound request-body limit. Upload with `PUT` using exactly the headers in `required_headers` — the URL is signed against that content type and length. Unused uploads are deleted after 7 days.","x-required-scopes":["outbox.transactional:send"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttachmentUploadRequest"}}}},"responses":{"201":{"description":"Upload URL created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentUploadEnvelope"}}}},"400":{"description":"Invalid filename or disallowed content type. `details.reason` is INVALID_ATTACHMENT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Declared size exceeds the per-file limit. `details.reason` is ATTACHMENT_TOO_LARGE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Attachment storage is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","x-required-scopes":["webhooks:read"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Webhook endpoint list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint","x-required-scopes":["webhooks:write"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"Created webhook endpoint. Response includes the one-time signing secret; store it — it is never returned again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreatedEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service temporarily unavailable — a required dependency (e.g. secret encryption) is not available. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks/deliveries":{"get":{"tags":["Webhooks"],"summary":"List webhook delivery logs","x-required-scopes":["webhooks:read"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/DeliveryStatus"}],"responses":{"200":{"description":"Webhook delivery list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/webhooks/deliveries/{id}/replay":{"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"post":{"tags":["Webhooks"],"summary":"Queue a webhook delivery replay","x-required-scopes":["webhooks:admin"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"Queued delivery replay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryEnvelope"}}}},"400":{"description":"Invalid request — malformed body/JSON, failed field validation, an invalid pagination cursor, an invalid resource id, or a missing/short Idempotency-Key on a write.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found, or not owned by this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — a duplicate resource (e.g. duplicate contact email), or an Idempotency-Key reused with a different request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Public API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"STATXE API key"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Required for retry-safe write operations."},"ResourceId":{"name":"id","in":"path","required":true,"schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},"Cursor":{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},"WebhookId":{"name":"webhook_id","in":"query","required":false,"schema":{"type":"string"}},"DeliveryStatus":{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","delivering","delivered","failed","exhausted"]}}},"schemas":{"ApiKeyContext":{"type":"object","properties":{"org_id":{"type":"string"},"org_slug":{"type":["string","null"]},"org_name":{"type":["string","null"]},"actor_user_id":{"type":"string"},"key_id":{"type":["string","null"],"description":"Null when the request was not authenticated with an API key."},"auth_method":{"type":"string"},"scopes":{"type":"array","description":"Scopes granted to this key.","items":{"type":"string"}},"enabled_scope_catalog":{"type":"array","description":"Every scope this API surface exposes, with its launch state — not only the scopes granted to this key (see `scopes` for those).","items":{"$ref":"#/components/schemas/ScopeCatalogEntry"}},"rate_limit_profile":{"type":"object"}}},"ScopeCatalogEntry":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"access":{"type":"string"},"launch":{"type":"string"},"description":{"type":"string"}}},"SenderOption":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"is_default":{"type":"boolean"},"verified":{"type":"boolean"}}},"DomainOption":{"type":"object","properties":{"_id":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"isDefault":{"type":"boolean"},"domainSource":{"type":"string"},"deliverability":{"type":"object"},"sender_options":{"type":"array","items":{"$ref":"#/components/schemas/SenderOption"}}}},"ContactStatus":{"type":"string","description":"Subscription state of a contact. These are the only values accepted when updating a contact; any other value is rejected with 400.","enum":["active","unsubscribed","bounced","complained","suppressed"]},"Contact":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"company":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"customFields":{"type":"object"},"status":{"$ref":"#/components/schemas/ContactStatus"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateContactRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"custom_fields":{"type":"object","default":{}}}},"UpdateContactRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"custom_fields":{"type":"object"},"status":{"$ref":"#/components/schemas/ContactStatus"}}},"Segment":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"contactCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateSegmentRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"tags":{"type":"array","items":{"type":"string"},"default":[]}}},"Broadcast":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"previewText":{"type":"string"},"fromName":{"type":"string"},"fromEmail":{"type":"string","format":"email"},"groupIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"scheduledAt":{"type":["string","null"],"format":"date-time"},"metrics":{"type":"object"},"createdAt":{"type":"string","format":"date-time"}}},"CreateBroadcastRequest":{"type":"object","required":["name","subject","from_name","from_email","segment_ids"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"subject":{"type":"string","minLength":1,"maxLength":500},"preview_text":{"type":"string","maxLength":200},"from_name":{"type":"string","minLength":1,"maxLength":100},"from_email":{"type":"string","format":"email"},"reply_to":{"type":"string","format":"email"},"segment_ids":{"type":"array","minItems":1,"items":{"type":"string"}},"html":{"type":"string"},"plain_text":{"type":"string"},"scheduled_at":{"type":"string","format":"date-time"}}},"SendTransactionalEmailRequest":{"type":"object","required":["from","to","subject"],"description":"Supply at least one of `html` or `text`.","properties":{"from":{"type":"string","minLength":3,"maxLength":320,"description":"`addr@host` or `Display Name <addr@host>`. The host must be a sendable domain in this workspace; any local part is allowed."},"to":{"oneOf":[{"type":"string","format":"email"},{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string","format":"email"}}]},"cc":{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}},"bcc":{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}},"subject":{"type":"string","minLength":1,"maxLength":998},"html":{"type":"string","maxLength":500000},"text":{"type":"string","maxLength":200000},"reply_to":{"type":"string","format":"email"},"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":4000},"description":"Additional RFC 5322 headers. `Message-ID` is always assigned by STATXE."},"attachments":{"type":"array","maxItems":20,"description":"Files sent with the message. Bytes are passed through to delivery and never stored — only filename, type, and size are retained on the message record.","items":{"oneOf":[{"$ref":"#/components/schemas/OutboundAttachment"},{"$ref":"#/components/schemas/StoredAttachmentRef"}]}},"scheduled_at":{"type":"string","description":"ISO 8601 timestamp or natural language (e.g. `in 1 hour`), up to 30 days out."}}},"CreateAttachmentUploadRequest":{"type":"object","required":["filename","content_type","size_bytes"],"properties":{"filename":{"type":"string","minLength":1,"maxLength":512},"content_type":{"type":"string","description":"MIME type, e.g. `application/pdf`."},"size_bytes":{"type":"integer","description":"Exact byte length of the file. The upload URL is signed against it."}}},"AttachmentUpload":{"type":"object","properties":{"attachment_id":{"type":"string","description":"Reference this in an email's `attachments` after uploading."},"upload_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"required_headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Send exactly these headers on the PUT, or the upload is rejected."}}},"StoredAttachmentRef":{"type":"object","required":["attachment_id"],"description":"An attachment already uploaded via POST /outbox/attachments.","properties":{"attachment_id":{"type":"string"},"filename":{"type":"string","description":"Overrides the name given at upload time."},"content_type":{"type":"string"},"content_id":{"type":"string","description":"Set to embed the file inline via `cid:<content_id>`."}}},"OutboundAttachment":{"type":"object","required":["filename","content"],"properties":{"filename":{"type":"string","minLength":1,"maxLength":512},"content":{"type":"string","format":"byte","description":"Base64-encoded file bytes. Max 12 MB per file."},"content_type":{"type":"string","maxLength":255,"description":"MIME type, e.g. `application/pdf`. Inferred by the recipient if omitted."},"content_id":{"type":"string","maxLength":255,"description":"Set to embed the file in the HTML body via `cid:<content_id>` instead of attaching it. Must be unique within the message."}}},"TransactionalEmail":{"type":"object","properties":{"_id":{"type":"string"},"message_id":{"type":"string"},"provider_message_id":{"type":"string"},"rfc_message_id":{"type":"string","description":"RFC 5322 Message-ID sent on the wire; use it to correlate replies."},"from":{"type":"string","format":"email"},"to":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string"},"status":{"type":"string","enum":["sent","scheduled"]},"recipient_count":{"type":"integer"},"attachment_count":{"type":"integer"},"credits_deducted":{"type":"integer"},"overage_used":{"type":"integer","description":"Recipients billed as overage because the credit balance was exhausted."}}},"InboxThread":{"type":"object","properties":{"_id":{"type":"string"},"inboxThreadId":{"type":"string"},"subject":{"type":"string"},"unreadCount":{"type":"integer"},"lastMessageAt":{"type":"string","format":"date-time"}}},"WebhookEventType":{"type":"string","description":"A webhook event type. These are the only values accepted when creating an endpoint; any other value is rejected with 400.","enum":["contact.created","contact.updated","contact.deleted","broadcast.sent","broadcast.completed","email.delivered","email.opened","email.clicked","email.bounced","email.complained","unsubscribe"]},"WebhookEndpoint":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"}},"enabled":{"type":"boolean"},"deliveryCount":{"type":"integer"},"failureCount":{"type":"integer"},"lastDeliveredAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"WebhookEndpointCreated":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","required":["secret"],"properties":{"secret":{"type":"string","description":"Signing secret (prefixed `whsec_`) used to verify webhook payload signatures. Returned ONLY once — in the response to endpoint creation — and never included in any later response. Store it securely."}}}]},"CreateWebhookRequest":{"type":"object","required":["name","url","events"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri"},"events":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/WebhookEventType"}},"enabled":{"type":"boolean","default":true}}},"WebhookDelivery":{"type":"object","properties":{"_id":{"type":"string"},"webhookId":{"type":"string"},"eventId":{"type":"string"},"eventType":{"$ref":"#/components/schemas/WebhookEventType"},"status":{"type":"string","enum":["queued","delivering","delivered","failed","exhausted"]},"attemptCount":{"type":"integer"},"responseStatus":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"lastAttemptAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"replayCount":{"type":"integer","description":"Number of times this delivery has been replayed."},"replayedAt":{"type":["string","null"],"format":"date-time","description":"When this delivery was last replayed; null if never replayed."}}},"DeleteResult":{"type":"object","required":["deleted","id"],"properties":{"deleted":{"type":"boolean"},"id":{"type":"string"}}},"SuccessEnvelope":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"const":true},"data":{},"meta":{"$ref":"#/components/schemas/Meta"}}},"ErrorEnvelope":{"type":"object","required":["ok","error","meta"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message","docs_url"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"docs_url":{"type":"string","format":"uri","description":"Stable link to the public error catalog entry."},"details":{}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"Meta":{"type":"object","required":["request_id"],"properties":{"request_id":{"type":"string"},"pagination":{"type":"object"},"rate_limit":{"type":"object"}}},"MeEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyContext"}}}]},"DomainOptionListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DomainOption"}}}}]},"ContactEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}]},"ContactListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}}]},"SegmentEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Segment"}}}]},"SegmentListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}}}}]},"InboxThreadListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxThread"}}}}]},"AttachmentUploadEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AttachmentUpload"}}}]},"TransactionalEmailEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransactionalEmail"}}}]},"BroadcastEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Broadcast"}}}]},"BroadcastListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Broadcast"}}}}]},"WebhookEndpointEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpoint"}}}]},"WebhookEndpointCreatedEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}}]},"WebhookEndpointListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}]},"WebhookDeliveryEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookDelivery"}}}]},"WebhookDeliveryListEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}]},"DeleteEnvelope":{"allOf":[{"$ref":"#/components/schemas/SuccessEnvelope"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResult"}}}]}},"x-statxe-scopes":[{"id":"me:read","domain":"me","access":"read","launch":"public","description":"Inspect the current API key, org, scopes, and rate-limit profile."},{"id":"domains:read","domain":"domains","access":"read","launch":"public","description":"Read verified sending domains and available sender identities."},{"id":"inbox.threads:read","domain":"inbox","access":"read","launch":"public","description":"Read inbox threads, messages, and delivery events."},{"id":"inbox.threads:write","domain":"inbox","access":"write","launch":"public","description":"Update inbox thread/message state such as read, starred, archived, and tags."},{"id":"outbox.broadcasts:read","domain":"outbox","access":"read","launch":"public","description":"Read outbox broadcasts, campaign drafts, schedules, and send status."},{"id":"outbox.broadcasts:write","domain":"outbox","access":"write","launch":"public","description":"Create and update broadcast drafts and schedules."},{"id":"outbox.broadcasts:send","domain":"outbox","access":"send","launch":"public","description":"Launch or cancel broadcast/send lifecycle operations."},{"id":"outbox.transactional:send","domain":"outbox","access":"send","launch":"public","label":"Transactional email — Send","description":"Send individual transactional emails via the API or the SMTP front door. Deliberately separate from outbox.broadcasts:send so an SMTP-only key cannot launch a broadcast."},{"id":"contacts:read","domain":"contacts","access":"read","launch":"public","description":"Read contacts and contact metadata."},{"id":"contacts:write","domain":"contacts","access":"write","launch":"public","description":"Create, update, import, export, and delete contacts."},{"id":"segments:read","domain":"segments","access":"read","launch":"public","description":"Read segments, groups, and membership lists."},{"id":"segments:write","domain":"segments","access":"write","launch":"public","description":"Create/update segments and manage contact membership."},{"id":"webhooks:read","domain":"webhooks","access":"read","launch":"public","description":"Read webhook endpoints and delivery status."},{"id":"webhooks:write","domain":"webhooks","access":"write","launch":"public","description":"Create and update webhook endpoints."},{"id":"webhooks:admin","domain":"webhooks","access":"admin","launch":"public","description":"Delete webhooks, rotate secrets, and replay deliveries."},{"id":"api_keys:read","domain":"api_keys","access":"read","launch":"public","description":"Read API key metadata."},{"id":"api_keys:write","domain":"api_keys","access":"write","launch":"public","description":"Create and revoke API keys."},{"id":"assistant.chat:write","domain":"assistant","access":"write","launch":"gated","description":"Send gated assistant chat requests for admin-approved orgs."},{"id":"assistant.tools:read","domain":"assistant","access":"read","launch":"gated","label":"Assistant tools — Read","description":"Discover gated assistant tools available to an approved org."},{"id":"assistant.sessions:read","domain":"assistant","access":"read","launch":"gated","label":"Assistant sessions — Read","description":"Read gated assistant session and usage state."}]}}