{"openapi":"3.1.0","info":{"title":"mycompany.email API","version":"1.0.0","description":"Send and receive email, manage sending identities, templates, suppression lists, and domain DNS, and manage who works on which brands. Use a scoped bearer API key; member management takes opt-in scopes on an organization-wide key created by an owner or admin. All resource access is scoped to the key's organization and brand restrictions. Swagger executes real requests against this server; use a dedicated least-privilege key. Dates are ISO 8601 UTC strings. Collection endpoints with a cursor expose it explicitly; other lists do not support cursor pagination."},"servers":[{"url":"/","description":"Current server"}],"externalDocs":{"url":"/docs","description":"Quickstart and integration guide"},"security":[{"bearerAuth":[]}],"tags":[{"name":"Email"},{"name":"Brands"},{"name":"Domains"},{"name":"Mailboxes"},{"name":"Inbox"},{"name":"Drafts"},{"name":"Request logs"},{"name":"Suppressions"},{"name":"Templates"},{"name":"Members"},{"name":"MCP"},{"name":"Health"}],"paths":{"/v1/emails":{"post":{"operationId":"sendEmail","tags":["Email"],"summary":"Send an email","description":"Required API key scope: `email:send`.\n\nSends a real email. Use Idempotency-Key when retrying. The API checks routing, domain readiness, suppression, quotas, and the key's brand restriction before delivery submission.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send"],"responses":{"202":{"description":"Accepted for delivery. This does not confirm delivery to the recipient.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAccepted"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"402":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmail"}}}}},"get":{"operationId":"listEmails","tags":["Email"],"summary":"List sent emails","description":"Required API key scope: `email:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPage"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size; values above 200 are capped."},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Use the previous page's next_before value. Results are newest first."}]}},"/v1/emails/{id}":{"get":{"operationId":"getEmail","tags":["Email"],"summary":"Read delivery status and events","description":"Required API key scope: `email:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDetail"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]}},"/v1/brands":{"post":{"operationId":"createBrand","tags":["Brands"],"summary":"Create a sending brand","description":"Required API key scope: `brands:write`.\n\nRequires an organization-wide key; a key restricted to a brand gets 403. Returns 409 when another brand in the organization already uses the slug.","security":[{"bearerAuth":[]}],"x-required-scopes":["brands:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrand"}}}}},"get":{"operationId":"listBrands","tags":["Brands"],"summary":"List brands","description":"Required API key scope: `brands:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["brands:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}}},"/v1/brands/{id}":{"get":{"operationId":"getBrand","tags":["Brands"],"summary":"Read a sending brand","description":"Required API key scope: `brands:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["brands:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]},"patch":{"operationId":"updateBrand","tags":["Brands"],"summary":"Change a brand's name or slug","description":"Required API key scope: `brands:write`.\n\nSend `name`, `slug` or both; an omitted field keeps its value. The brand id never changes, so its domains, mailboxes, templates, members and API keys are unaffected. A slug is unique within the organization: one another brand uses returns 409 with `param: \"slug\"`. A key issued by a brand-scoped member gets 403.","security":[{"bearerAuth":[]}],"x-required-scopes":["brands:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrand"}}}}}},"/v1/brands/{id}/provision":{"post":{"operationId":"provisionBrand","tags":["Brands"],"summary":"Activate a local brand","description":"Required API key scope: `brands:write`.\n\nMarks the local brand ready. SMTP2GO sender registration is managed per domain.","security":[{"bearerAuth":[]}],"x-required-scopes":["brands:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/domains":{"post":{"operationId":"createDomain","tags":["Domains"],"summary":"Add and provision a sending domain","description":"Required API key scope: `domains:write`.\n\nCreate the local brand, fetch GET /v1/domains/ownership and publish its ownership TXT record directly with your DNS provider. Creation requires live proof. Returns SMTP2GO sender DNS records; provider enrollment errors appear in smtp2go_error and can be retried with /provision. DNS publication is attempted when configured unless publish_dns is false.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainDetails"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomain"}}}}},"get":{"operationId":"listDomains","tags":["Domains"],"summary":"List domains and DNS records","description":"Required API key scope: `domains:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DomainDetails"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}}},"/v1/domains/{id}":{"get":{"operationId":"getDomain","tags":["Domains"],"summary":"Read a domain's DNS and verification status","description":"Required API key scope: `domains:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainDetails"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]},"delete":{"operationId":"deleteDomain","tags":["Domains"],"summary":"Unregister a sending domain","description":"Required API key scope: `domains:write`.\n\nRequires no remaining mailboxes or queued sends. Email history is retained. Provider identities and DNS records remain for separate cleanup.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"domain":{"type":"string"},"deleted":{"type":"boolean","const":true},"provider_identity_removed":{"type":"boolean","const":false},"dns_records_removed":{"type":"boolean","const":false},"warning":{"type":"string"}},"required":["id","domain","deleted","provider_identity_removed","dns_records_removed","warning"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/domains/{id}/provision":{"post":{"operationId":"provisionDomain","tags":["Domains"],"summary":"Retry domain provisioning","description":"Required API key scope: `domains:write`.\n\nRequires the ownership TXT record to remain published. Recovery after partial provisioning. Existing identities and keys are retained.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainDetails"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"publish_dns":{"type":"boolean","default":true}},"required":[],"additionalProperties":false}}}}}},"/v1/domains/{id}/check":{"post":{"operationId":"checkDomain","tags":["Domains"],"summary":"Refresh domain verification","description":"Required API key scope: `domains:write`.\n\nRequires the domain's ownership TXT record to remain published.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainDetails"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/domains/{id}/publish-dns":{"post":{"operationId":"publishDomainDns","tags":["Domains"],"summary":"Publish DNS records to Cloudflare","description":"Required API key scope: `domains:write`.\n\nRequires live ownership TXT verification and the server to have access to this domain's Cloudflare zone. Repeated calls converge the managed records.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDns"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/domains/{id}/receiving":{"post":{"operationId":"enableDomainReceiving","tags":["Domains"],"summary":"Enable receiving or check it again","description":"Required API key scope: `domains:write`.\n\nRequires the domain's ownership TXT record to be published. Records this organization's receiving claim on the exact domain, then checks the receiving identity: a verified parent domain covers it; otherwise an identity is created for this domain and receiving.identity.dns_records lists the CNAMEs to publish. Call again after publishing. An identity check that cannot finish is reported in receiving.identity.error; the ownership claim is kept. Returns 409 when another workspace already receives mail for the domain. Independent of SMTP2GO sending verification.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainReceiving"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/mailboxes":{"post":{"operationId":"createMailbox","tags":["Mailboxes"],"summary":"Create an address or catch-all mailbox","description":"Required API key scope: `inbox:write`.\n\nCreates the address claim. Mail arrives once receiving.live is true; receiving.next_step names what is missing. Use POST /v1/domains/{id}/receiving to prove ownership and set up the receiving identity. receiving_mx equals receiving.mx.record.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxCreated"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMailbox"}}}}},"get":{"operationId":"listMailboxes","tags":["Mailboxes"],"summary":"List mailboxes","description":"Required API key scope: `inbox:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Mailbox"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}}},"/v1/mailboxes/{id}":{"delete":{"operationId":"deleteMailbox","tags":["Mailboxes"],"summary":"Delete a mailbox address","description":"Required API key scope: `inbox:write`.\n\nRemoves the address claim. Existing received messages are retained with mailbox_id set to null.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},"required":["deleted"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/inbox":{"get":{"operationId":"listInbox","tags":["Inbox"],"summary":"List received messages","description":"Required API key scope: `inbox:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPage"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size; values above 200 are capped."},{"name":"folder","in":"query","required":false,"schema":{"type":"string","enum":["inbox","spam","archive","trash","quarantine"],"default":"inbox"},"description":"Mailbox folder."},{"name":"mailbox_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"description":"Filter by mailbox."},{"name":"cursor_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Pass next_cursor.received_at together with cursor_id."},{"name":"cursor_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"description":"Pass next_cursor.id together with cursor_at."}]}},"/v1/inbox/search":{"get":{"operationId":"searchInbox","tags":["Inbox"],"summary":"Search received messages","description":"Required API key scope: `inbox:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxItem"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Full-text query; supports quoted phrases and exclusions."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size; values above 200 are capped."},{"name":"folder","in":"query","required":false,"schema":{"type":"string","enum":["inbox","spam","archive","trash","quarantine"]},"description":"Optional folder filter."}]}},"/v1/inbox/{id}":{"get":{"operationId":"getInboxMessage","tags":["Inbox"],"summary":"Read a received message","description":"Required API key scope: `inbox:read`.\n\nOpening a message marks it read only when the key also has inbox:write. HTML is sanitized. Attachment contents are downloaded through the attachment endpoint.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundMessage"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]},"delete":{"operationId":"trashInboxMessage","tags":["Inbox"],"summary":"Move a received message to trash","description":"Required API key scope: `inbox:write`.\n\nSoft deletion. The message can be restored.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"folder":{"type":"string","const":"trash"}},"required":["id","folder"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/inbox/{id}/attachments/{attachmentId}":{"get":{"operationId":"downloadAttachment","tags":["Inbox"],"summary":"Download an attachment","description":"Required API key scope: `inbox:read`.\n\nReturns an opaque download with Content-Disposition: attachment and Cache-Control: no-store. Infected attachments are refused with 403.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:read"],"responses":{"200":{"description":"Raw attachment bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Content-Disposition":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]}},"/v1/inbox/{id}/folder":{"post":{"operationId":"moveInboxMessage","tags":["Inbox"],"summary":"Move a message to a folder","description":"Required API key scope: `inbox:write`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"folder":{"type":"string","enum":["inbox","spam","archive","trash","quarantine"]}},"required":["id","folder"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"string","enum":["inbox","spam","archive","trash","quarantine"]}},"required":["folder"]}}}}}},"/v1/inbox/{id}/star":{"post":{"operationId":"starInboxMessage","tags":["Inbox"],"summary":"Set a message's starred state","description":"Required API key scope: `inbox:write`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"starred":{"type":"boolean"}},"required":["id","starred"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starred":{"type":"boolean"}},"required":["starred"]}}}}}},"/v1/inbox/{id}/read":{"post":{"operationId":"markInboxMessageRead","tags":["Inbox"],"summary":"Set a message's read state","description":"Required API key scope: `inbox:write`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"read":{"type":"boolean"}},"required":["id","read"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"}},"required":["read"]}}}}}},"/v1/requests":{"get":{"operationId":"listApiRequests","tags":["Request logs"],"summary":"List recent API requests","description":"Required API key scope: `email:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiRequest"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size; values above 200 are capped."}]}},"/v1/suppressions":{"get":{"operationId":"listSuppressions","tags":["Suppressions"],"summary":"List suppressed recipients","description":"Required API key scope: `suppressions:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["suppressions:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Suppression"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"Page size; values above 500 are capped."}]},"post":{"operationId":"createSuppression","tags":["Suppressions"],"summary":"Suppress a recipient","description":"Required API key scope: `suppressions:write`.\n\nCreates a MANUAL suppression. Omitting brand_id applies it organization-wide when the key permits that scope.","security":[{"bearerAuth":[]}],"x-required-scopes":["suppressions:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSuppression"}}}}}},"/v1/suppressions/{email}":{"delete":{"operationId":"deleteSuppression","tags":["Suppressions"],"summary":"Remove a recipient suppression","description":"Required API key scope: `suppressions:write`.\n\nURL-encode the email address in the path. Removing a suppression allows future send attempts.","security":[{"bearerAuth":[]}],"x-required-scopes":["suppressions:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"description":"Remove the suppression for this brand. Omit for organization-wide suppression."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/suppressions/check":{"get":{"operationId":"checkSuppression","tags":["Suppressions"],"summary":"Check a recipient's suppression status","description":"Required API key scope: `suppressions:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["suppressions:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionCheck"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"description":"Recipient to check."},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"description":"Include suppressions for this brand as well as organization-wide entries."}]}},"/v1/templates":{"post":{"operationId":"createTemplate","tags":["Templates"],"summary":"Create an email template","description":"Required API key scope: `templates:write`.","security":[{"bearerAuth":[]}],"x-required-scopes":["templates:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplate"}}}}},"get":{"operationId":"listTemplates","tags":["Templates"],"summary":"List email templates","description":"Required API key scope: `templates:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["templates:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}}},"/v1/templates/{slug}":{"get":{"operationId":"getTemplate","tags":["Templates"],"summary":"Read an email template","description":"Required API key scope: `templates:read`.","security":[{"bearerAuth":[]}],"x-required-scopes":["templates:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]},"patch":{"operationId":"updateTemplate","tags":["Templates"],"summary":"Update an email template","description":"Required API key scope: `templates:write`.\n\nProvide the fields to change. At least one body format must remain after applying the patch. The slug and brand cannot be changed.","security":[{"bearerAuth":[]}],"x-required-scopes":["templates:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"subject":{"type":"string","minLength":1,"maxLength":998},"mjml":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"minProperties":1}}}}},"delete":{"operationId":"deleteTemplate","tags":["Templates"],"summary":"Delete an email template","description":"Required API key scope: `templates:write`.","security":[{"bearerAuth":[]}],"x-required-scopes":["templates:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},"required":["deleted"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/templates/{slug}/preview":{"post":{"operationId":"previewTemplate","tags":["Templates"],"summary":"Render a template with variables","description":"Required API key scope: `templates:read`.\n\nThe JSON body is the variables object itself. Liquid substitutions and MJML compilation run without sending an email.","security":[{"bearerAuth":[]}],"x-required-scopes":["templates:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderedTemplate"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/v1/domains/{id}/dns":{"get":{"operationId":"getDomainDns","tags":["Domains"],"summary":"Read DNS setup and ownership proof","description":"Required API key scope: `domains:read`.\n\nPublish ownership.record directly with your DNS provider and keep it published. Domain registration or sending verification alone does not authorize general DNS management.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainDns"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]}},"/v1/domains/ownership":{"get":{"operationId":"getDomainOwnership","tags":["Domains"],"summary":"Get proof before registering a domain","description":"Required API key scope: `domains:write`.\n\nPublish ownership.record directly with your DNS provider before POST /v1/domains. The challenge is bound to this organization and domain and remains valid across re-registration.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"ownership":{"$ref":"#/components/schemas/DomainOwnership"}},"required":["domain","ownership"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","format":"hostname","maxLength":253},"description":"Domain you intend to register."},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"description":"Target brand; required when the API key is pinned to a brand."}]}},"/v1/domains/{id}/dns/records":{"get":{"operationId":"listDnsRecords","tags":["Domains"],"summary":"List managed DNS records","description":"Required API key scope: `domains:read`.\n\nRequires live ownership TXT verification and a configured Cloudflare zone. Records are limited to this domain; the provider may return record types that this API cannot edit. On every DNS record operation, a missing, refusing or unreachable Cloudflare zone returns 400 with requirement publish_dns and retryable false, including a timeout.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ManagedDnsRecord"}},"next_page":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["data","next_page"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10000,"default":1},"description":"Page number; use next_page until null."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"description":"Page size; values above 200 are capped."}]},"post":{"operationId":"createDnsRecord","tags":["Domains"],"summary":"Create a DNS record","description":"Required API key scope: `domains:write`.\n\nRequires live ownership TXT verification. Supports A, AAAA, CNAME, MX and TXT. Platform zones, ownership proof records, and separately registered child domains cannot be changed here.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDnsRecord"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDnsRecord"}}}}}},"/v1/domains/{id}/dns/records/{record_id}":{"patch":{"operationId":"updateDnsRecord","tags":["Domains"],"summary":"Update a DNS record","description":"Required API key scope: `domains:write`.\n\nProvide at least one field. Same ownership and domain restrictions as creation. Names cannot move outside the authorized domain.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDnsRecord"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDnsRecord"}}}}},"delete":{"operationId":"deleteDnsRecord","tags":["Domains"],"summary":"Delete a DNS record","description":"Required API key scope: `domains:write`.\n\nRequires live ownership TXT verification. Ownership proof and protected records cannot be deleted here. Removing mail DNS can interrupt delivery.","security":[{"bearerAuth":[]}],"x-required-scopes":["domains:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/drafts":{"get":{"operationId":"listDrafts","tags":["Drafts"],"summary":"List email drafts","description":"Required API key scope: `email:read`.\n\nRequires an organization-wide key. Returns up to 200 drafts with text truncated to a 200-character preview; retrieve a draft to read its full text.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Draft"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}},"post":{"operationId":"createDraft","tags":["Drafts"],"summary":"Create an email draft","description":"Required API key scope: `email:send`.\n\nRequires an organization-wide key. Linking an inbound message additionally requires inbox:read. Saving a draft does not send it.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInput"}}}}}},"/v1/drafts/{id}":{"get":{"operationId":"getDraft","tags":["Drafts"],"summary":"Read an email draft","description":"Required API key scope: `email:read`.\n\nRequires an organization-wide key. Includes the full draft text.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]},"patch":{"operationId":"updateDraft","tags":["Drafts"],"summary":"Update an email draft","description":"Required API key scope: `email:send`.\n\nRequires an organization-wide key. Omitted fields are retained; null clears a field. Linking an inbound message also requires inbox:read.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInput"}}}}},"delete":{"operationId":"deleteDraft","tags":["Drafts"],"summary":"Delete an email draft","description":"Required API key scope: `email:send`.\n\nRequires an organization-wide key.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/drafts/{id}/send":{"post":{"operationId":"sendDraft","tags":["Drafts"],"summary":"Send a draft","description":"Required API key scope: `email:send`.\n\nRequires an organization-wide key and a valid sender, recipient, subject and text. An inbound-linked draft additionally requires inbox:read. After provider acceptance the draft is deleted. Use an Idempotency-Key to retry safely.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send"],"responses":{"202":{"description":"Accepted for delivery. This does not confirm delivery to the recipient.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAccepted"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"402":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OutboundAttachment"},"maxItems":20,"description":"At most 10 MiB decoded content total. Supply canonical base64 bytes; remote URLs and filesystem paths are not supported."},"headers":{"type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":998},"description":"Custom headers only. Names must be unique ignoring case. Standard addressing, MIME, Message-ID and X-SES-* headers are reserved; values cannot contain line breaks or NUL."}},"required":[],"additionalProperties":false}}}}}},"/v1/emails/{id}/content":{"get":{"operationId":"getEmailContent","tags":["Email"],"summary":"Read a sent email's stored content","description":"Required API key scope: `email:read`.\n\nReturns stored content, including cc and bcc. HTML is sanitized; bodies may be truncated at the storage cap.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailContent"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}}]}},"/v1/inbox/{id}/reply":{"post":{"operationId":"replyToMessage","tags":["Inbox"],"summary":"Reply to a received message","description":"Required API key scope: `email:send`.\n\nAlso requires inbox:read. Sends real email. The recipient comes from the original Reply-To or sender; do not supply to. Replies retain threading headers. Reply-all copies the other original recipients, except the reply's from address, its recipient and this organization's mailbox addresses (only the addresses of the brand it is pinned to, for a key a brand-limited member created); catch-all mailboxes are not excluded.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send","inbox:read"],"responses":{"202":{"description":"Accepted for delivery. This does not confirm delivery to the recipient.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAccepted"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"402":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEmail"}}}}}},"/v1/inbox/{id}/reply-all":{"post":{"operationId":"replyToAll","tags":["Inbox"],"summary":"Reply to sender and recipients","description":"Required API key scope: `email:send`.\n\nAlso requires inbox:read. Sends real email. The recipient comes from the original Reply-To or sender; do not supply to. Replies retain threading headers. Reply-all copies the other original recipients, except the reply's from address, its recipient and this organization's mailbox addresses (only the addresses of the brand it is pinned to, for a key a brand-limited member created); catch-all mailboxes are not excluded.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send","inbox:read"],"responses":{"202":{"description":"Accepted for delivery. This does not confirm delivery to the recipient.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAccepted"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"402":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEmail"}}}}}},"/v1/inbox/{id}/forward":{"post":{"operationId":"forwardMessage","tags":["Inbox"],"summary":"Forward a received message","description":"Required API key scope: `email:send`.\n\nAlso requires inbox:read. Sends real email. Provide to. The original text is quoted automatically; original attachments are not copied.","security":[{"bearerAuth":[]}],"x-required-scopes":["email:send","inbox:read"],"responses":{"202":{"description":"Accepted for delivery. This does not confirm delivery to the recipient.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAccepted"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"402":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardEmail"}}}}}},"/v1/inbox/{id}/restore":{"post":{"operationId":"restoreInboxMessage","tags":["Inbox"],"summary":"Restore a received message to inbox","description":"Required API key scope: `inbox:write`.","security":[{"bearerAuth":[]}],"x-required-scopes":["inbox:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"folder":{"type":"string","const":"inbox"}},"required":["id","folder"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/members":{"get":{"operationId":"listMembers","tags":["Members"],"summary":"List members and their access","description":"Required API key scope: `members:read`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Lists everyone in the organization: owners, admins and organization-wide members with access organization, brand members with their brands and permissions.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}}},"/v1/members/{id}":{"patch":{"operationId":"updateMember","tags":["Members"],"summary":"Change a brand member's brands or permissions","description":"Required API key scope: `members:write`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Changes a developer or viewer; owners, admins and the key's own creator get 403. Omitted fields keep their current values. Send the version from GET /v1/members: if their access changed since, 409 with param version; without version the edit applies to the access as this request reads it. Confining an organization-wide member requires brand_ids; without access or permissions they keep what they can do today — a developer everything but API access, a viewer read-only — and change.permissions_added reports anything more. Widening a member to the whole organization is not possible. Removing a brand revokes their API keys outside the remaining brands and ends their authorship of unsent drafts in this organization; change reports both. Role follows from the permissions: developer when any of them changes something, otherwise viewer.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberUpdated"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMember"}}}}},"delete":{"operationId":"removeMember","tags":["Members"],"summary":"Remove a member","description":"Required API key scope: `members:write`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Removes a developer or viewer and revokes every API key they created in this organization. Owners, admins and the key's own creator get 403.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"deleted":{"type":"boolean","const":true},"email":{"type":"string"},"revoked_keys":{"type":"integer"}},"required":["id","deleted","email","revoked_keys"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/invitations":{"get":{"operationId":"listInvitations","tags":["Members"],"summary":"List open invitations","description":"Required API key scope: `members:read`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Unanswered invitations, expired ones included until revoked. Never includes invitation links.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:read"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}}},"required":["data"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}}},"post":{"operationId":"createInvitation","tags":["Members"],"summary":"Invite someone to brands","description":"Required API key scope: `members:write`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Returns the invitation with its single-use link, which is shown only in this response; no email is sent — deliver the link yourself. The link expires after 7 days. Inviting an address again replaces its open invitation and link, so retrying is safe; an Idempotency-Key is refused with 400 (param Idempotency-Key) because the link must never be stored for replay. Give access as a preset, or permissions alone or with access custom. An address that is already a member gets 409. At most 20 open invitations per organization (400), and at most 100 created through the API per organization per UTC day: beyond that, 429 rate_limited with Retry-After until 00:00 UTC.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:write"],"responses":{"201":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvitation"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitation"}}}}}},"/v1/invitations/{id}":{"patch":{"operationId":"updateInvitation","tags":["Members"],"summary":"Change an open invitation's brands or permissions","description":"Required API key scope: `members:write`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Omitted fields keep the values the invitation holds when the change is made, and the link stays the same: whoever accepts it gets the invitation as it is then. Send the version from GET /v1/invitations: if it changed since, 409 with param version. An invitation already emailed still says what it said. An accepted, revoked or expired invitation gets 409.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvitation"}}}}},"delete":{"operationId":"revokeInvitation","tags":["Members"],"summary":"Revoke an open invitation","description":"Required API key scope: `members:write`.\n\nRequires an organization-wide key created in the dashboard by an owner or admin of this organization, who must still be one when the request is made. A key restricted to a brand, one issued by a brand-scoped member, one created with the operator CLI (no creator) or one whose creator is no longer an owner or admin gets 403. members:read and members:write are opt-in: no default selection includes them. Its link stops working at once. An invitation that is not open gets 404.","security":[{"bearerAuth":[]}],"x-required-scopes":["members:write"],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Idempotent-Replay":{"description":"true when this response was replayed.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"revoked":{"type":"boolean","const":true}},"required":["id","revoked"]}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":255},"description":"Unique key per mutation and organization. Reuse with identical key identity, scopes, brand, method, path, query and body for 24 hours. Successes and uncertain or partial provider-submission errors are replayed to prevent duplicate sends. Keep exact JSON bytes unchanged. Mismatch returns 400; an in-flight duplicate returns 429. Not supported for MCP."}]}},"/v1/mcp":{"post":{"operationId":"callMcp","tags":["MCP"],"summary":"Call the Model Context Protocol endpoint","description":"Authenticated API key required. Tool scopes are checked individually.\n\nJSON-RPC 2.0 over HTTP, protocol version 2025-06-18. Supports initialize, ping, tools/list, tools/call, and notifications/initialized. Available tools: send_email (email:send), list_domains (domains:read), check_suppression (suppressions:read), get_sending_quota (email:read or email:send, organization-wide key only), get_email_status (email:read). Tool failures use result.isError and protocol errors use error; both may have HTTP 200. send_email sends real mail.","security":[{"bearerAuth":[]}],"x-required-scopes":[],"responses":{"200":{"description":"Successful response.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"202":{"description":"Notification accepted; empty body."},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"413":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ApiError"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}}}},"/health":{"get":{"operationId":"health","tags":["Health"],"summary":"Check process health","security":[],"description":"Public liveness check. Does not test database or email-provider connectivity.","responses":{"200":{"description":"Process is serving requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Enter the API key only; Swagger adds Bearer. Create a key in the dashboard. Keys are shown once, can expire or be revoked, and carry operation scopes and an optional brand restriction. Never put a key in a URL or client-side application."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requirement":{"type":"string"},"reason":{"type":"string"},"param":{"type":"string"},"resolution":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message","requirement","retryable"]}},"required":["error"]},"Ok":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"SendEmail":{"type":"object","properties":{"from":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"to":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"minItems":1,"maxItems":50}]},"cc":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"minItems":1,"maxItems":50}]},"bcc":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"minItems":1,"maxItems":50}]},"subject":{"type":"string","minLength":1,"maxLength":998},"html":{"type":"string","minLength":1,"maxLength":2097152},"text":{"type":"string","minLength":1,"maxLength":2097152},"template":{"type":"string","minLength":1},"variables":{"type":"object","additionalProperties":true},"reply_to":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"headers":{"type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":998},"description":"Custom headers only. Names must be unique ignoring case. Standard addressing, MIME, Message-ID and X-SES-* headers are reserved; values cannot contain line breaks or NUL."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OutboundAttachment"},"maxItems":20,"description":"At most 10 MiB decoded content total. Supply canonical base64 bytes; remote URLs and filesystem paths are not supported."}},"required":["from","to"],"anyOf":[{"required":["template"]},{"required":["subject","html"]},{"required":["subject","text"]}],"description":"At most 50 recipients total across to, cc, and bcc. A template supplies subject/body defaults; explicit fields override them. Sender must belong to a verified, accessible sending domain.","examples":[{"from":"hello@mail.example.com","to":"customer@example.net","subject":"Your receipt","text":"Thank you for your order."}]},"SendAccepted":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"provider_message_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"sending_provider":{"type":"string","enum":["smtp2go"]},"status":{"type":"string","enum":["queued","accepted","delivered","bounced","complained","rejected","delivery_delayed","failed"]},"brand_id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"routed_from":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","provider_message_id","sending_provider","status","brand_id","routed_from","created_at"]},"Email":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"provider_message_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"sending_provider":{"type":"string","enum":["smtp2go","ses"],"description":"Legacy history may name ses. New outbound messages always use SMTP2GO."},"status":{"type":"string","enum":["queued","accepted","delivered","bounced","complained","rejected","delivery_delayed","failed"]},"from":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"to":{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."}},"subject":{"type":"string"},"brand_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"terminal_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","provider_message_id","sending_provider","status","from","to","subject","brand_id","error","created_at","accepted_at","delivered_at","terminal_at"]},"EmailEvent":{"type":"object","properties":{"type":{"type":"string"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}]},"bounce_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"bounce_sub_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"outgoing_ip":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"received_at":{"type":"string","format":"date-time"}},"required":["type","recipient","bounce_type","bounce_sub_type","outgoing_ip","occurred_at","received_at"]},"EmailDetail":{"allOf":[{"$ref":"#/components/schemas/Email"},{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/EmailEvent"}}},"required":["events"]}]},"EmailPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Email"}},"next_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["data","next_before"]},"CreateBrand":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$","description":"Letters, digits and single hyphens; stored lowercased."}},"required":["name","slug"],"additionalProperties":false},"UpdateBrand":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$","description":"Letters, digits and single hyphens; stored lowercased."}},"minProperties":1,"additionalProperties":false,"examples":[{"slug":"acme"},{"name":"Acme","slug":"acme"}]},"Brand":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","ready","failed"]},"provisioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","status","provisioned_at","last_error"]},"CreateDomain":{"type":"object","properties":{"brand_id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"domain":{"type":"string","minLength":1,"maxLength":253,"format":"hostname"},"publish_dns":{"type":"boolean","default":true}},"required":["brand_id","domain"],"additionalProperties":false},"Domain":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"domain":{"type":"string"},"brand_id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"sending_provider":{"type":"string","enum":["smtp2go"]},"ready_to_send":{"type":"boolean"},"smtp2go_verified":{"type":"boolean"},"smtp2go_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"smtp2go_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","domain","brand_id","sending_provider","ready_to_send","smtp2go_verified","smtp2go_error","smtp2go_checked_at","created_at"]},"DnsRecord":{"type":"object","properties":{"type":{"type":"string","enum":["TXT","CNAME","MX"]},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer"},"purpose":{"type":"string"},"status":{"type":"string","enum":["pending","success","failed","temporary_failure","not_started","not_checked"]},"dns":{"type":"object","properties":{"state":{"type":"string","enum":["found","mismatch","missing"]},"observed":{"type":"string"},"hint":{"type":"string"}},"required":["state"]}},"required":["type","name","value","purpose","status"]},"DnsPublication":{"type":"object","properties":{"type":{"type":"string","enum":["TXT","CNAME","MX"]},"name":{"type":"string"},"action":{"type":"string","enum":["created","updated","unchanged","failed"]},"detail":{"type":"string"}},"required":["type","name","action"]},"DnsProvider":{"type":"object","properties":{"provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"nameservers":{"type":"array","items":{"type":"string"}}},"required":["provider","dashboardUrl","nameservers"]},"DomainDetails":{"allOf":[{"$ref":"#/components/schemas/Domain"},{"type":"object","properties":{"dns_records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}},"dns_provider":{"anyOf":[{"$ref":"#/components/schemas/DnsProvider"},{"type":"null"}]},"dns_published":{"type":"array","items":{"$ref":"#/components/schemas/DnsPublication"}},"ownership":{"$ref":"#/components/schemas/DomainOwnership"},"receiving":{"$ref":"#/components/schemas/ReceivingReadiness"}},"required":["dns_records"]}]},"DomainReceiving":{"allOf":[{"$ref":"#/components/schemas/Domain"},{"type":"object","properties":{"receiving":{"$ref":"#/components/schemas/ReceivingReadiness"}},"required":["receiving"]}]},"ReceivingReadiness":{"type":"object","properties":{"live":{"type":"boolean","description":"True when every per-domain requirement is met and mail to this domain reaches the inbox."},"next_step":{"anyOf":[{"type":"string","enum":["ownership","identity","mx"]},{"type":"null"}],"description":"The first unmet requirement, in the order to fix them. Publish the MX last: it moves all of the domain's mail."},"ownership":{"type":"object","properties":{"proven":{"type":"boolean","description":"This organization has proven control of this exact domain for receiving."},"conflict":{"type":"boolean","description":"Another workspace holds a proven claim on this domain; receiving cannot be enabled here, contact support. Reported only to a workspace that has proven the domain (its claim, or its ownership TXT published now); otherwise false."},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"record":{"type":"object","properties":{"type":{"const":"TXT","type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"integer","const":300}},"required":["type","name","content","ttl"]}},"required":["proven","conflict","since","record"]},"identity":{"type":"object","properties":{"status":{"type":"string","enum":["verified","pending","failed","missing","not_checked","unknown"],"description":"Whether the receiving service will accept mail for this domain. A verified parent domain covers its subdomains."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The domain whose verification covers this one: itself or a parent."},"dns_records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"purpose":{"type":"string"}},"required":["type","name","value","purpose"]},"description":"Publish these while status is pending or failed."},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["status","name","dns_records","error","checked_at"]},"mx":{"type":"object","properties":{"status":{"type":"string","enum":["found","mismatch","missing","unknown"]},"record":{"type":"object","properties":{"type":{"type":"string","const":"MX"},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer"},"purpose":{"type":"string"}},"required":["type","name","value","priority","purpose"]},"observed":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What DNS returned instead, when the MX points elsewhere."}},"required":["status","record","observed"]}},"required":["live","next_step","ownership","identity","mx"],"description":"Receiving requires a proven ownership claim, a verified receiving identity for the domain or a parent, and the MX record. An address only chooses inbox or Unrouted."},"PublishDns":{"type":"object","properties":{"domain":{"type":"string"},"published":{"type":"array","items":{"$ref":"#/components/schemas/DnsPublication"}}},"required":["domain","published"]},"CreateMailbox":{"type":"object","properties":{"domain_id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"local_part":{"anyOf":[{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9._%+-]{0,62}[a-z0-9])?$"},{"type":"null"}],"description":"Omit or use null for a domain catch-all. Converted to lowercase."},"display_name":{"type":"string"},"retention_days":{"type":"integer","minimum":1,"maximum":3650,"default":90}},"required":["domain_id"]},"Mailbox":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"local_part":{"anyOf":[{"type":"string"},{"type":"null"}]},"catch_all":{"type":"boolean"},"domain_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"brand_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"retention_days":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}},"required":["id","address","local_part","catch_all","domain_id","brand_id","display_name","retention_days","created_at"]},"MailboxCreated":{"allOf":[{"$ref":"#/components/schemas/Mailbox"},{"type":"object","properties":{"receiving_mx":{"type":"object","properties":{"type":{"type":"string","const":"MX"},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer"},"purpose":{"type":"string"}},"required":["type","name","value","priority","purpose"]},"receiving":{"$ref":"#/components/schemas/ReceivingReadiness"}},"required":["receiving_mx","receiving"]}]},"InboxItem":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"from_address":{"type":"string"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"read":{"type":"boolean"},"starred":{"type":"boolean"},"has_attachments":{"type":"boolean"},"received_at":{"type":"string","format":"date-time"}},"required":["id","from_address","from_name","subject","snippet","read","starred","has_attachments","received_at"]},"InboxPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxItem"}},"next_cursor":{"anyOf":[{"type":"object","properties":{"received_at":{"type":"string","format":"date-time"},"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},"required":["received_at","id"]},{"type":"null"}]}},"required":["data","next_cursor"]},"Attachment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"filename":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"av_verdict":{"type":"string","enum":["unscanned","clean","infected","error"]}},"required":["id","filename","content_type","size_bytes","content_id","av_verdict"]},"InboundMessage":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"mailbox_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"folder":{"type":"string","enum":["inbox","spam","archive","trash","quarantine"]},"from_address":{"type":"string"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_addresses":{"type":"array","items":{"type":"string"}},"cc_addresses":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"html_truncated":{"type":"boolean"},"read":{"type":"boolean"},"starred":{"type":"boolean"},"size_bytes":{"type":"integer"},"message_id_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}]},"correlated_message_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"received_at":{"type":"string","format":"date-time"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"delivery_timeline":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"at":{"type":"string","format":"date-time"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","at","detail"]}}},"required":["id","mailbox_id","folder","from_address","from_name","to_addresses","cc_addresses","reply_to","subject","snippet","text","html","html_truncated","read","starred","size_bytes","message_id_header","in_reply_to","correlated_message_id","received_at","attachments","delivery_timeline"]},"ApiRequest":{"type":"object","properties":{"request_id":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer"},"duration_ms":{"type":"integer"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"requirement":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["request_id","method","path","status","duration_ms","error_code","requirement","created_at"]},"CreateSuppression":{"type":"object","properties":{"email":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"brand_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"detail":{"type":"string"}},"required":["email"]},"Suppression":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"organizationId":{"type":"string","minLength":1,"description":"The key's organization. Omitted for keys a brand-scoped member issued."},"brandId":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"email":{"type":"string"},"reason":{"type":"string","enum":["BOUNCE","COMPLAINT","MANUAL"]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"mirroredToSesAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","brandId","email","reason","detail","mirroredToSesAt","createdAt"]},"SuppressionCheck":{"type":"object","properties":{"suppressed":{"type":"boolean"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/Suppression"}}},"required":["suppressed","entries"]},"CreateTemplate":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$","description":"Letters, digits and single hyphens; stored lowercased."},"name":{"type":"string","minLength":1,"maxLength":120},"brand_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"subject":{"type":"string","minLength":1,"maxLength":998},"mjml":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"text":{"type":"string","minLength":1}},"required":["slug","name","subject"],"anyOf":[{"required":["mjml"]},{"required":["html"]},{"required":["text"]}]},"Template":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"organizationId":{"type":"string","minLength":1,"description":"The key's organization. Omitted for keys a brand-scoped member issued."},"brandId":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"slug":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"mjml":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","brandId","slug","name","subject","mjml","html","text","createdAt","updatedAt"]},"RenderedTemplate":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["subject"]},"JsonRpcRequest":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"method":{"type":"string","enum":["initialize","notifications/initialized","ping","tools/list","tools/call"]},"params":{"type":"object","additionalProperties":true}},"required":["jsonrpc","method"]},"JsonRpcResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"result":{"type":"object","additionalProperties":true},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"]}},"required":["jsonrpc","id"]},"OutboundAttachment":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Filename only, without path separators or header control characters."},"content":{"type":"string","contentEncoding":"base64","description":"Canonical base64-encoded bytes."},"content_type":{"type":"string","minLength":1,"maxLength":120,"examples":["application/pdf"]}},"required":["filename","content"],"additionalProperties":false},"DraftInput":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"to":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"cc":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"bcc":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"text":{"anyOf":[{"type":"string","maxLength":2097152},{"type":"null"}]},"reply_to_inbound_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"reply_mode":{"anyOf":[{"type":"string","enum":["reply","reply_all","forward"]},{"type":"null"}]}},"required":[],"additionalProperties":false,"description":"Drafts accept incomplete addresses as comma-separated strings. Null clears a field. NUL bytes are rejected. reply_mode requires reply_to_inbound_id."},"Draft":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"from":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"to":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"cc":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"bcc":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"text":{"anyOf":[{"type":"string","maxLength":2097152},{"type":"null"}]},"reply_to_inbound_id":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque resource identifier."},{"type":"null"}]},"reply_mode":{"anyOf":[{"type":"string","enum":["reply","reply_all","forward"]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","from","to","cc","bcc","subject","text","reply_to_inbound_id","reply_mode","created_at","updated_at"]},"EmailContent":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"bcc":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"type":"string"},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"message_id_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","from","to","cc","bcc","reply_to","subject","text","html","message_id_header","created_at"]},"ReplyEmail":{"type":"object","properties":{"from":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"cc":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"maxItems":50}]},"bcc":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"maxItems":50}]},"subject":{"type":"string","minLength":1,"maxLength":998},"text":{"type":"string","minLength":1,"maxLength":2097152},"html":{"type":"string","minLength":1,"maxLength":2097152},"reply_to":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"headers":{"type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":998},"description":"Custom headers only. Names must be unique ignoring case. Standard addressing, MIME, Message-ID and X-SES-* headers are reserved; values cannot contain line breaks or NUL."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OutboundAttachment"},"maxItems":20,"description":"At most 10 MiB decoded content total. Supply canonical base64 bytes; remote URLs and filesystem paths are not supported."}},"required":["from"],"anyOf":[{"required":["text"]},{"required":["html"]}],"additionalProperties":false},"ForwardEmail":{"type":"object","properties":{"from":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"to":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"minItems":1,"maxItems":50}]},"cc":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"maxItems":50}]},"bcc":{"oneOf":[{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},{"type":"array","items":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"maxItems":50}]},"subject":{"type":"string","minLength":1,"maxLength":998},"text":{"type":"string","maxLength":2097152},"html":{"type":"string","maxLength":2097152},"reply_to":{"type":"string","minLength":1,"description":"Email address, optionally with a display name: Acme <hello@example.com>."},"headers":{"type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":998},"description":"Custom headers only. Names must be unique ignoring case. Standard addressing, MIME, Message-ID and X-SES-* headers are reserved; values cannot contain line breaks or NUL."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/OutboundAttachment"},"maxItems":20,"description":"At most 10 MiB decoded content total. Supply canonical base64 bytes; remote URLs and filesystem paths are not supported."}},"required":["from","to"],"additionalProperties":false},"DomainDns":{"type":"object","properties":{"domain_id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"domain":{"type":"string"},"dns_records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}},"managed_dns_configured":{"type":"boolean"},"ownership":{"$ref":"#/components/schemas/DomainOwnership"}},"required":["domain_id","domain","dns_records","managed_dns_configured","ownership"]},"DomainOwnership":{"type":"object","properties":{"verified":{"type":"boolean"},"instruction":{"type":"string"},"record":{"type":"object","properties":{"type":{"const":"TXT","type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"integer","const":300}},"required":["type","name","content","ttl"]}},"required":["instruction","record"]},"ManagedDnsRecord":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"integer"},"proxied":{"type":"boolean"},"priority":{"type":"integer"}},"required":["id","type","name","content","ttl","proxied"]},"CreateDnsRecord":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT"]},"name":{"type":"string","minLength":1,"description":"Fully qualified name within this domain, or @ for the domain itself."},"content":{"type":"string","minLength":1},"ttl":{"type":"integer","default":300,"anyOf":[{"const":1},{"minimum":60,"maximum":86400}],"description":"1 means automatic TTL."},"proxied":{"type":"boolean","default":false,"description":"Only A and AAAA records may be proxied."},"priority":{"type":"integer","minimum":0,"maximum":65535,"description":"Required for MX records; omitted for other types."}},"required":["type","name","content"],"additionalProperties":false,"allOf":[{"if":{"properties":{"type":{"const":"MX"}},"required":["type"]},"then":{"required":["priority"]}}]},"UpdateDnsRecord":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT"]},"name":{"type":"string","minLength":1,"description":"Fully qualified name within this domain, or @ for the domain itself."},"content":{"type":"string","minLength":1},"ttl":{"type":"integer","default":300,"anyOf":[{"const":1},{"minimum":60,"maximum":86400}],"description":"1 means automatic TTL."},"proxied":{"type":"boolean","default":false,"description":"Only A and AAAA records may be proxied."},"priority":{"type":"integer","minimum":0,"maximum":65535,"description":"Required for MX records; omitted for other types."}},"required":[],"minProperties":1,"additionalProperties":false},"Member":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","developer","viewer"]},"brand_ids":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},{"type":"null"}],"description":"The brands a brand member works on, primary first; null for the whole organization."},"brand_names":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]},"description":"What a brand member may do on every one of their brands; empty for the whole organization."},"access":{"type":"string","enum":["organization","admin","developer","readonly","custom"],"description":"organization for an owner, admin or organization-wide member; otherwise the preset the permissions match, or custom."},"version":{"type":"string","description":"Send back as version on PATCH: an edit made since then returns 409."},"joined_at":{"type":"string","format":"date-time"}},"required":["id","email","name","role","brand_ids","brand_names","permissions","access","version","joined_at"]},"MemberUpdated":{"allOf":[{"$ref":"#/components/schemas/Member"},{"type":"object","properties":{"change":{"type":"object","properties":{"brands_added":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},"brands_removed":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},"permissions_added":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]}},"permissions_removed":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]}},"scope_reduced":{"type":"boolean","description":"True when they covered the whole organization before and now cover brands."},"revoked_keys":{"type":"integer","description":"Their API keys revoked because they no longer reach those keys' brands."},"released_drafts":{"type":"integer","description":"Their drafts in this organization, no longer theirs, when their brands narrowed."}},"required":["brands_added","brands_removed","permissions_added","permissions_removed","scope_reduced","revoked_keys","released_drafts"]}},"required":["change"]}]},"Invitation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"email":{"type":"string"},"brand_ids":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."}},"brand_names":{"type":"array","items":{"type":"string"}},"permissions":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]}},"access":{"type":"string","enum":["admin","developer","readonly","custom"]},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"expired":{"type":"boolean","description":"Expired invitations stay listed until revoked."},"emailed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the dashboard emailed its link. The API never sends email."},"via_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the API key that created it, if one did."},"version":{"type":"string","description":"Send back as version on PATCH: a change made since then returns 409."}},"required":["id","email","brand_ids","brand_names","permissions","access","expires_at","created_at","expired","emailed_at","via_api_key","version"]},"IssuedInvitation":{"allOf":[{"$ref":"#/components/schemas/Invitation"},{"type":"object","properties":{"link":{"type":"string","format":"uri","description":"The single-use invitation link. Shown only in this response and never retrievable again; deliver it to the invitee yourself."}},"required":["link"]}]},"CreateInvitation":{"type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":254,"format":"email"},"brand_ids":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"minItems":1,"maxItems":100,"description":"Brands of this organization. Each brings all of its domains, addresses and mail."},"access":{"type":"string","enum":["admin","developer","readonly","custom"],"description":"A preset permission set, or custom with permissions. Brand presets, unrelated to the organization roles owner and admin."},"permissions":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]},"minItems":1,"description":"Applied to every brand. mail.send and mail.manage bring inbox.read with them."}},"required":["email","brand_ids"],"additionalProperties":false,"anyOf":[{"required":["access"]},{"required":["permissions"]}],"allOf":[{"if":{"properties":{"access":{"const":"custom"}},"required":["access"]},"then":{"required":["permissions"]}},{"if":{"properties":{"access":{"enum":["admin","developer","readonly"]}},"required":["access"]},"then":{"not":{"required":["permissions"]}}}],"examples":[{"email":"dev@example.com","brand_ids":["brand_123"],"access":"developer"},{"email":"support@example.com","brand_ids":["brand_123","brand_456"],"permissions":["inbox.read","mail.send"]}]},"UpdateMember":{"type":"object","properties":{"brand_ids":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"minItems":1,"maxItems":100,"description":"Brands of this organization. Each brings all of its domains, addresses and mail."},"access":{"type":"string","enum":["admin","developer","readonly","custom"],"description":"A preset permission set, or custom with permissions. Brand presets, unrelated to the organization roles owner and admin."},"permissions":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]},"minItems":1,"description":"Applied to every brand. mail.send and mail.manage bring inbox.read with them."},"version":{"type":"string","minLength":1,"maxLength":64,"description":"The member's version as last read. Omitted: the version this request reads."}},"required":[],"minProperties":1,"additionalProperties":false,"anyOf":[{"required":["brand_ids"]},{"required":["access"]},{"required":["permissions"]}],"allOf":[{"if":{"properties":{"access":{"const":"custom"}},"required":["access"]},"then":{"required":["permissions"]}},{"if":{"properties":{"access":{"enum":["admin","developer","readonly"]}},"required":["access"]},"then":{"not":{"required":["permissions"]}}}]},"UpdateInvitation":{"type":"object","properties":{"brand_ids":{"type":"array","items":{"type":"string","minLength":1,"description":"Opaque resource identifier."},"minItems":1,"maxItems":100,"description":"Brands of this organization. Each brings all of its domains, addresses and mail."},"access":{"type":"string","enum":["admin","developer","readonly","custom"],"description":"A preset permission set, or custom with permissions. Brand presets, unrelated to the organization roles owner and admin."},"permissions":{"type":"array","items":{"type":"string","enum":["inbox.read","mail.send","mail.manage","addresses.manage","dns.manage","api.keys"]},"minItems":1,"description":"Applied to every brand. mail.send and mail.manage bring inbox.read with them."},"version":{"type":"string","minLength":1,"maxLength":64,"description":"The invitation's version as last read. Omitted: no check, and omitted fields keep the values the invitation holds when the change is made."}},"required":[],"minProperties":1,"additionalProperties":false,"anyOf":[{"required":["brand_ids"]},{"required":["access"]},{"required":["permissions"]}],"allOf":[{"if":{"properties":{"access":{"const":"custom"}},"required":["access"]},"then":{"required":["permissions"]}},{"if":{"properties":{"access":{"enum":["admin","developer","readonly"]}},"required":["access"]},"then":{"not":{"required":["permissions"]}}}]}},"responses":{"ApiError":{"description":"Request failed. Inspect error.code, error.requirement, and error.retryable.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate or quota limit reached. Retry only when error.retryable is true; respect Retry-After when present.","headers":{"X-Request-Id":{"description":"Identifier to include when contacting support.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this organization on the server process that answered.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time, in seconds, when the current window ends.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying, when available.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}