{"openapi":"3.0.0","paths":{"/v1/me":{"get":{"operationId":"MeMe","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Account"]}},"/v1/api-keys":{"post":{"operationId":"ApiKeysCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKeyResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["API keys"]},"get":{"operationId":"ApiKeysList","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["API keys"]}},"/v1/api-keys/{apiKeyId}/rotate":{"post":{"operationId":"ApiKeysRotate","parameters":[{"name":"apiKeyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateApiKeyRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKeyResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["API keys"]}},"/v1/api-keys/{apiKeyId}":{"delete":{"operationId":"ApiKeysRevoke","parameters":[{"name":"apiKeyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["API keys"]}},"/v1/inboxes":{"post":{"operationId":"InboxesCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInboxRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inboxes"]},"get":{"operationId":"InboxesList","parameters":[{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inboxes"]}},"/v1/inboxes/availability":{"get":{"operationId":"InboxesAvailability","parameters":[{"name":"local_part","required":true,"in":"query","description":"The part before the @.","schema":{"example":"research","type":"string"}},{"name":"domain_id","required":false,"in":"query","description":"A verified custom domain. Omit it for letterport.dev.","schema":{"example":"dom_0192…","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inboxes"]}},"/v1/inboxes/{inboxId}":{"get":{"operationId":"InboxesGet","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inboxes"]},"patch":{"operationId":"InboxesUpdate","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInboxRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inboxes"]},"delete":{"operationId":"InboxesDelete","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Inboxes"]}},"/v1/domains":{"post":{"operationId":"DomainsAdd","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDomainRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Domains"]},"get":{"operationId":"DomainsList","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainListResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Domains"]}},"/v1/domains/{domainId}":{"get":{"operationId":"DomainsGet","parameters":[{"name":"domainId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Domains"]},"delete":{"operationId":"DomainsRemove","parameters":[{"name":"domainId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Domains"]}},"/v1/domains/{domainId}/check":{"post":{"operationId":"DomainsCheck","parameters":[{"name":"domainId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Domains"]}},"/v1/inboxes/{inboxId}/messages":{"get":{"operationId":"MessagesList","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Exact sender address.","schema":{"type":"string"}},{"name":"subject","required":false,"in":"query","description":"Subject contains this (case-insensitive).","schema":{"type":"string"}},{"name":"after","required":false,"in":"query","description":"Received at or after (ISO 8601).","schema":{"format":"date-time","type":"string"}},{"name":"before","required":false,"in":"query","description":"Received before (ISO 8601).","schema":{"format":"date-time","type":"string"}},{"name":"thread_id","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Messages"]},"post":{"operationId":"SendingSend","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Send the same key again (with the same request) and you get the same message back: no second email.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Sending"]}},"/v1/inboxes/{inboxId}/messages/{messageId}":{"get":{"operationId":"MessagesGet","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"messageId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Messages"]},"delete":{"operationId":"MessagesDelete","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"messageId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Messages"]}},"/v1/inboxes/{inboxId}/messages/{messageId}/attachments/{attachmentId}":{"get":{"operationId":"MessagesAttachment","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"messageId","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentDownloadResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Messages"]}},"/v1/inboxes/{inboxId}/threads":{"get":{"operationId":"MessagesThreads","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Messages"]}},"/v1/inboxes/{inboxId}/threads/{threadId}":{"get":{"operationId":"MessagesThread","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDetailResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Messages"]}},"/v1/inboxes/{inboxId}/messages/{messageId}/reply":{"post":{"operationId":"SendingReply","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"messageId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Send the same key again (with the same request) and you get the same message back: no second email.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyRequest"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Sending"]}},"/v1/inboxes/{inboxId}/messages/{messageId}/forward":{"post":{"operationId":"SendingForward","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}},{"name":"messageId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Send the same key again (with the same request) and you get the same message back: no second email.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardRequest"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Sending"]}},"/v1/inboxes/{inboxId}/recipient-confirmations":{"post":{"operationId":"RecipientConfirmationsRequest","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestConfirmationRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientConfirmationResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Recipient confirmations"]},"get":{"operationId":"RecipientConfirmationsList","parameters":[{"name":"inboxId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientConfirmationListResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Recipient confirmations"]}},"/v1/webhooks":{"post":{"operationId":"WebhooksCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebhookResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]},"get":{"operationId":"WebhooksList","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}":{"get":{"operationId":"WebhooksGet","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]},"patch":{"operationId":"WebhooksUpdate","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]},"delete":{"operationId":"WebhooksDelete","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}/secret":{"get":{"operationId":"WebhooksSecret","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}/secret/rotate":{"post":{"operationId":"WebhooksRotate","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}/test":{"post":{"operationId":"WebhooksTest","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}/deliveries":{"get":{"operationId":"WebhooksDeliveries","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}/deliveries/{deliveryId}/retry":{"post":{"operationId":"WebhooksRetry","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}},{"name":"deliveryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{webhookId}/attempts":{"get":{"operationId":"WebhooksAttempts","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAttemptPageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/connected-apps":{"get":{"operationId":"ConnectedAppsList","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAppListResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Connected apps"]}},"/v1/connected-apps/{connectedAppId}":{"delete":{"operationId":"ConnectedAppsRevoke","parameters":[{"name":"connectedAppId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Connected apps"]}},"/v1/usage":{"get":{"operationId":"UsageGet","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Usage"]}},"/v1/billing":{"get":{"operationId":"BillingGet","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Billing"]}},"/v1/billing/checkout":{"post":{"operationId":"BillingCheckout","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Billing"]}},"/v1/billing/portal":{"post":{"operationId":"BillingPortal","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"400":{"description":"invalid_request: the request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"unauthenticated or invalid_token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"insufficient_scope, account_suspended, sending_paused, recipient_not_confirmed, plan_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"resource_not_found: no such resource, or not yours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"invalid_address, invalid_domain, invalid_url, recipient_suppressed and other validation failures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"quota_exceeded: the plan’s per-recipient sending quota. rate_limit_exceeded: a per-minute burst limit (600 requests, 20 recipients); Retry-After says when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer":[]}],"tags":["Billing"]}}},"info":{"title":"letterport API","description":"Email inboxes for AI agents: real addresses that receive and send mail, over this API, webhooks and a hosted MCP server.\n\n**Authentication.** `Authorization: Bearer lp_…` with an API key. Keys carry permissions (`read`, `send`, `manage`) and can be limited to one inbox. MCP clients (`https://api.letterport.dev/mcp`) sign in through the browser instead (OAuth) and choose the same permissions, or send an API key.\n\n**Errors.** Every failure is `{ \"error\": { \"code\", \"message\", \"hint\" } }`. Branch on `code`; `hint` says what to do. Another account's resources answer 404, never 403.\n\n**Sending.** `POST /v1/inboxes/{inboxId}/messages` (and `/reply`, `/forward`) answers 202: the message is queued. Its `send_status` and each recipient's `deliveries` entry tell what happened (sent ≠ delivered). Send an `Idempotency-Key` header to retry safely. New accounts may write only to people who wrote to the inbox, or who confirmed it (`POST /v1/inboxes/{inboxId}/recipient-confirmations`). Quotas are counted per recipient.\n\n**Webhooks.** We POST events to your HTTPS endpoint, signed with the Standard Webhooks scheme (`webhook-id`, `webhook-timestamp`, `webhook-signature`): verify with your endpoint's `whsec_` secret, dedupe on `webhook-id`, answer 2xx quickly. Payloads carry ids and metadata; fetch bodies over this API. Clients without webhooks poll `GET /v1/inboxes/{inboxId}/messages`.\n\n**For agents.** The letterport skill teaches coding agents all of this: https://letterport.dev/skill/SKILL.md","version":"v1","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ErrorDetails":{"type":"object","properties":{"addresses":{"description":"The addresses the refusal is about.","type":"array","items":{"type":"string"}}},"required":["addresses"]},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string","description":"Stable and machine-readable: branch on this.","example":"recipient_not_confirmed"},"message":{"type":"string","description":"What happened, for a person."},"hint":{"type":"string","description":"What to do about it."},"details":{"description":"Specifics to act on, e.g. which recipients must confirm (recipient_not_confirmed).","allOf":[{"$ref":"#/components/schemas/ErrorDetails"}]}},"required":["code","message"]},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"]},"AccountResponse":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string","enum":["free","developer","growth"]},"status":{"type":"string","enum":["active","suspended","closed"]},"email_verified":{"type":"boolean","description":"Whether someone on the account has verified their email address: nothing is sent until then."},"created_at":{"format":"date-time","type":"string"}},"required":["id","plan","status","email_verified","created_at"]},"CredentialResponse":{"type":"object","properties":{"kind":{"type":"string","enum":["user","api_key"]},"permissions":{"type":"array","items":{"type":"string","enum":["read","send","manage"]}},"inbox_id":{"type":"string","nullable":true,"description":"Set when the credential reaches one inbox only."}},"required":["kind","permissions","inbox_id"]},"LimitsResponse":{"type":"object","properties":{"inboxes":{"type":"number"},"custom_domains":{"type":"number","description":"How many custom domains the account may have; 0 until they are turned on for it."}},"required":["inboxes","custom_domains"]},"MeResponse":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/AccountResponse"},"credential":{"$ref":"#/components/schemas/CredentialResponse"},"limits":{"$ref":"#/components/schemas/LimitsResponse"}},"required":["account","credential","limits"]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","example":"support agent"},"permissions":{"type":"array","example":["read","send"],"items":{"type":"string","enum":["read","send","manage"]}},"inbox_id":{"type":"string","description":"Limit the key to this inbox."},"expires_at":{"format":"date-time","type":"string","description":"When the key stops working (ISO 8601). Leave it out for a key that works until revoked."}},"required":["name","permissions"]},"CreatedApiKeyResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","description":"The first characters of the key, to tell keys apart."},"permissions":{"type":"array","items":{"type":"string","enum":["read","send","manage"]}},"inbox_id":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"},"last_used_at":{"format":"date-time","type":"string","nullable":true},"expires_at":{"format":"date-time","type":"string","nullable":true,"description":"When it stops working; null: until revoked."},"previous_secret_expires_at":{"format":"date-time","type":"string","nullable":true,"description":"After a rotation: until when the secret before it still works."},"secret":{"type":"string","description":"The key. Shown this once: store it now (an environment variable, not source code)."}},"required":["id","name","prefix","permissions","inbox_id","created_at","last_used_at","expires_at","previous_secret_expires_at","secret"]},"RotateApiKeyRequest":{"type":"object","properties":{"expire_previous_now":{"type":"boolean","description":"End the old secret at once (a leaked key). By default it keeps working for 24 hours, so running agents can switch."}}},"ApiKeyResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","description":"The first characters of the key, to tell keys apart."},"permissions":{"type":"array","items":{"type":"string","enum":["read","send","manage"]}},"inbox_id":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"},"last_used_at":{"format":"date-time","type":"string","nullable":true},"expires_at":{"format":"date-time","type":"string","nullable":true,"description":"When it stops working; null: until revoked."},"previous_secret_expires_at":{"format":"date-time","type":"string","nullable":true,"description":"After a rotation: until when the secret before it still works."}},"required":["id","name","prefix","permissions","inbox_id","created_at","last_used_at","expires_at","previous_secret_expires_at"]},"ApiKeyListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"}}},"required":["data"]},"CreateInboxRequest":{"type":"object","properties":{"local_part":{"type":"string","example":"research","description":"The part before the @. Omit it for a generated one."},"display_name":{"type":"string","example":"Research Agent"},"domain_id":{"type":"string","example":"dom_0192…","description":"One of your verified custom domains (GET /v1/domains). Omit it for letterport.dev."}}},"InboxResponse":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string","example":"research@letterport.dev"},"display_name":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","paused"]},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","address","display_name","status","created_at","updated_at"]},"InboxPageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxResponse"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]},"AvailabilityResponse":{"type":"object","properties":{"address":{"type":"string","example":"research@letterport.dev"},"available":{"type":"boolean"},"reason":{"type":"string","enum":["invalid","reserved","taken"],"nullable":true,"description":"Why not: not a valid address, a name letterport keeps, or someone has it (or had it: never reused)."},"alternatives":{"description":"Free addresses close to it, when it is taken or reserved.","type":"array","items":{"type":"string"}}},"required":["address","available","reason","alternatives"]},"UpdateInboxRequest":{"type":"object","properties":{"display_name":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","paused"],"description":"Paused: still receives mail, sends nothing."}}},"AddDomainRequest":{"type":"object","properties":{"name":{"type":"string","example":"agents.example.com","description":"A domain you control. A subdomain keeps your company mail where it is."}},"required":["name"]},"DnsRecordResponse":{"type":"object","properties":{"purpose":{"type":"string","enum":["verification","bounces","receiving","dmarc"],"description":"verification: proves the domain is yours and lets it send (required). bounces: a MAIL FROM of your own. receiving: mail to the domain comes to letterport. dmarc: tells receivers what to do with mail that fails."},"type":{"type":"string","enum":["CNAME","MX","TXT"]},"name":{"type":"string","example":"abc123._domainkey.agents.example.com"},"value":{"type":"string","example":"abc123.dkim.amazonses.com"},"priority":{"type":"number","nullable":true,"description":"MX records only."},"required":{"type":"boolean"},"status":{"type":"string","enum":["found","pending","failed","not_found"],"description":"pending: still being checked. failed: not found for 3 days; remove the domain and add it again."}},"required":["purpose","type","name","value","priority","required","status"]},"DomainResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","example":"agents.example.com"},"sending_status":{"type":"string","enum":["pending","ready","failed"],"description":"ready: verified; inboxes can be made on it and send. Its verification records decide this."},"receiving_status":{"type":"string","enum":["ready","not_set_up"],"description":"ready: its MX record points at letterport."},"other_mail_servers":{"description":"Mail servers that receive for this domain today, other than letterport. Pointing its MX at letterport takes its mail away from them: use a subdomain instead.","type":"array","items":{"type":"string"}},"records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecordResponse"}},"verified_at":{"format":"date-time","type":"string","nullable":true},"checked_at":{"format":"date-time","type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"}},"required":["id","name","sending_status","receiving_status","other_mail_servers","records","verified_at","checked_at","created_at"]},"DomainListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DomainResponse"}}},"required":["data"]},"EmailAddressResponse":{"type":"object","properties":{"address":{"type":"string","example":"asha@example.com"},"name":{"type":"string","nullable":true,"example":"Asha Rao"}},"required":["address","name"]},"AttachmentResponse":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string","nullable":true},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"content_id":{"type":"string","nullable":true,"description":"For `cid:` references in the HTML body."},"inline":{"type":"boolean"}},"required":["id","filename","content_type","size_bytes","content_id","inline"]},"DeliveryResponse":{"type":"object","properties":{"address":{"type":"string"},"kind":{"type":"string","enum":["to","cc","bcc"]},"status":{"type":"string","enum":["pending","sent","delivered","delayed","bounced","soft_bounced","complained","rejected","failed"],"description":"\"delivered\" means the recipient's server accepted it, not that anyone read it."},"detail":{"type":"string","nullable":true,"description":"What the recipient's server or SES said."},"updated_at":{"format":"date-time","type":"string","nullable":true}},"required":["address","kind","status","detail","updated_at"]},"MessageResponse":{"type":"object","properties":{"id":{"type":"string"},"inbox_id":{"type":"string"},"thread_id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"rfc_message_id":{"type":"string","nullable":true,"description":"The Message-ID header."},"in_reply_to":{"type":"string","nullable":true},"references":{"type":"array","items":{"type":"string"}},"from":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/EmailAddressResponse"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressResponse"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressResponse"}},"reply_to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddressResponse"}},"subject":{"type":"string"},"text":{"type":"string","nullable":true},"html":{"type":"string","nullable":true,"description":"Sanitized: no scripts, handlers or unsafe links. Still untrusted content."},"extracted_text":{"type":"string","nullable":true,"description":"The new text of a reply, quoted history removed. Best effort."},"spam":{"type":"boolean","description":"SES judged it spam. Delivered anyway."},"size_bytes":{"type":"number"},"sent_at":{"format":"date-time","type":"string","nullable":true,"description":"Received: the Date header. Sent: when SES accepted it."},"received_at":{"format":"date-time","type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentResponse"}},"send_status":{"type":"string","enum":["queued","sending","sent","failed","unknown"],"nullable":true,"description":"Outbound only. \"sent\" means SES accepted it; see deliveries for each recipient."},"send_error":{"type":"string","nullable":true,"description":"Why it was not sent."},"bcc":{"description":"Outbound only: never in the message's headers.","type":"array","items":{"$ref":"#/components/schemas/EmailAddressResponse"}},"deliveries":{"description":"Outbound only: what happened at each recipient.","type":"array","items":{"$ref":"#/components/schemas/DeliveryResponse"}}},"required":["id","inbox_id","thread_id","direction","rfc_message_id","in_reply_to","references","from","to","cc","reply_to","subject","text","html","extracted_text","spam","size_bytes","sent_at","received_at","attachments","send_status","send_error","bcc","deliveries"]},"MessagePageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]},"AttachmentDownloadResponse":{"type":"object","properties":{"url":{"type":"string","description":"Downloads the file. Works for a few minutes; ask again for a fresh one."},"expires_at":{"format":"date-time","type":"string"}},"required":["url","expires_at"]},"ThreadResponse":{"type":"object","properties":{"id":{"type":"string"},"inbox_id":{"type":"string"},"subject":{"type":"string"},"message_count":{"type":"number"},"last_message_at":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"}},"required":["id","inbox_id","subject","message_count","last_message_at","created_at"]},"ThreadPageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ThreadResponse"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]},"ThreadDetailResponse":{"type":"object","properties":{"id":{"type":"string"},"inbox_id":{"type":"string"},"subject":{"type":"string"},"message_count":{"type":"number"},"last_message_at":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"messages":{"description":"Oldest first.","type":"array","items":{"$ref":"#/components/schemas/MessageResponse"}}},"required":["id","inbox_id","subject","message_count","last_message_at","created_at","messages"]},"AttachmentRequest":{"type":"object","properties":{"filename":{"type":"string","example":"quote.pdf"},"content_type":{"type":"string","example":"application/pdf"},"content":{"type":"string","description":"The file, base64-encoded."}},"required":["filename","content_type","content"]},"SendMessageRequest":{"type":"object","properties":{"to":{"example":["maya@example.com"],"type":"array","items":{"type":"string"}},"cc":{"example":["maya@example.com"],"type":"array","items":{"type":"string"}},"bcc":{"example":["maya@example.com"],"description":"Never shown to the other recipients.","type":"array","items":{"type":"string"}},"reply_to":{"example":["maya@example.com"],"type":"array","items":{"type":"string"}},"subject":{"type":"string","example":"Supplier quote for Q4"},"text":{"type":"string"},"html":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentRequest"}}},"required":["to","subject"]},"ReplyRequest":{"type":"object","properties":{"text":{"type":"string"},"html":{"type":"string"},"reply_all":{"type":"boolean","description":"Also to everyone else the message was addressed to (never its Bcc)."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentRequest"}}}},"ForwardRequest":{"type":"object","properties":{"to":{"example":["maya@example.com"],"type":"array","items":{"type":"string"}},"cc":{"example":["maya@example.com"],"type":"array","items":{"type":"string"}},"bcc":{"example":["maya@example.com"],"type":"array","items":{"type":"string"}},"text":{"type":"string","description":"A note above the forwarded message."}},"required":["to"]},"RequestConfirmationRequest":{"type":"object","properties":{"address":{"type":"string","example":"maya@example.com"}},"required":["address"]},"RecipientConfirmationResponse":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed"]},"last_sent_at":{"format":"date-time","type":"string","nullable":true,"description":"When the last request email was queued (at most one a day)."},"confirmed_at":{"format":"date-time","type":"string","nullable":true}},"required":["id","address","status","last_sent_at","confirmed_at"]},"RecipientConfirmationListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecipientConfirmationResponse"}}},"required":["data"]},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","example":"https://agent.example.com/hooks/letterport"},"event_types":{"type":"array","example":["message.received"],"items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.bounced","message.complained","message.failed","domain.verified","domain.failed"]}},"description":{"type":"string","example":"support agent"},"inbox_id":{"type":"string","description":"Only this inbox's events."}},"required":["url","event_types"]},"CreatedWebhookResponse":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":"string","nullable":true},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.bounced","message.complained","message.failed","domain.verified","domain.failed","webhook.test"]}},"inbox_id":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"secret":{"type":"string","description":"The signing secret; also at GET /v1/webhooks/{id}/secret."}},"required":["id","url","description","event_types","inbox_id","enabled","created_at","updated_at","secret"]},"WebhookResponse":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"type":"string","nullable":true},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.bounced","message.complained","message.failed","domain.verified","domain.failed","webhook.test"]}},"inbox_id":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","url","description","event_types","inbox_id","enabled","created_at","updated_at"]},"WebhookListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}}},"required":["data"]},"UpdateWebhookRequest":{"type":"object","properties":{"url":{"type":"string"},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.bounced","message.complained","message.failed","domain.verified","domain.failed"]}},"description":{"type":"string"},"enabled":{"type":"boolean","description":"Off: no new deliveries; pending ones fail."}}},"WebhookSecretResponse":{"type":"object","properties":{"secret":{"type":"string","description":"Verify each request's `webhook-signature` with it (Standard Webhooks). Keep it server-side.","example":"whsec_…"}},"required":["secret"]},"WebhookDeliveryResponse":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string","enum":["message.received","message.sent","message.delivered","message.bounced","message.complained","message.failed","domain.verified","domain.failed","webhook.test"]},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"number"},"last_attempt_at":{"format":"date-time","type":"string","nullable":true},"last_status_code":{"type":"number","nullable":true},"last_error":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"}},"required":["id","event_id","event_type","status","attempts","last_attempt_at","last_status_code","last_error","created_at"]},"WebhookDeliveryPageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]},"WebhookAttemptResponse":{"type":"object","properties":{"id":{"type":"string"},"delivery_id":{"type":"string"},"status_code":{"type":"number","nullable":true,"description":"Null: no answer (timeout, refused, blocked address)."},"duration_ms":{"type":"number"},"error":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"}},"required":["id","delivery_id","status_code","duration_ms","error","created_at"]},"WebhookAttemptPageResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookAttemptResponse"}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]},"ConnectedAppResponse":{"type":"object","properties":{"id":{"type":"string"},"client_name":{"type":"string","example":"Claude Code"},"client_id":{"type":"string","description":"The client's id: its metadata document URL, or the id it registered."},"permissions":{"type":"array","items":{"type":"string","enum":["read","send","manage"]}},"inbox_id":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"},"last_used_at":{"format":"date-time","type":"string","nullable":true}},"required":["id","client_name","client_id","permissions","inbox_id","created_at","last_used_at"]},"ConnectedAppListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedAppResponse"}}},"required":["data"]},"PauseResponse":{"type":"object","properties":{"at":{"format":"date-time","type":"string"},"reason":{"type":"string","nullable":true}},"required":["at","reason"]},"CountResponse":{"type":"object","properties":{"used":{"type":"number"},"limit":{"type":"number"}},"required":["used","limit"]},"WindowResponse":{"type":"object","properties":{"used":{"type":"number"},"limit":{"type":"number"},"resets_at":{"format":"date-time","type":"string","description":"When this window resets (UTC)."}},"required":["used","limit","resets_at"]},"UsageResponse":{"type":"object","properties":{"plan":{"type":"string","enum":["free","developer","growth"]},"sending_tier":{"type":"string","enum":["restricted","trusted"],"description":"restricted: may write only to people who wrote to the inbox or confirmed it."},"sending_paused":{"nullable":true,"description":"Set while bounces or complaints paused sending.","type":"object","allOf":[{"$ref":"#/components/schemas/PauseResponse"}]},"inboxes":{"description":"Inboxes that count against the plan (every one not deleted).","allOf":[{"$ref":"#/components/schemas/CountResponse"}]},"recipients_today":{"description":"Recipients sent to today (UTC); one email to 3 people is 3.","allOf":[{"$ref":"#/components/schemas/WindowResponse"}]},"recipients_this_month":{"description":"Recipients sent to this month (UTC).","allOf":[{"$ref":"#/components/schemas/WindowResponse"}]},"received_this_month":{"description":"Emails received this month (UTC), each once however many inboxes it reached. Past the limit plus 10%, new mail is refused, not kept.","allOf":[{"$ref":"#/components/schemas/WindowResponse"}]},"stored_bytes":{"type":"number","description":"The mail the account holds, in bytes: raw messages, attachments included; a received email counts once."},"storage_limit_bytes":{"type":"number","description":"The plan's storage limit in bytes. Past it plus 10%, new mail is refused (not kept) and sends are refused until mail is deleted."}},"required":["plan","sending_tier","sending_paused","inboxes","recipients_today","recipients_this_month","received_this_month","stored_bytes","storage_limit_bytes"]},"PlanLimitsResponse":{"type":"object","properties":{"inboxes":{"type":"number"},"recipients_per_day":{"type":"number"},"recipients_per_month":{"type":"number"},"custom_domains":{"type":"number"},"inbound_per_month":{"type":"number"},"storage_bytes":{"type":"number"}},"required":["inboxes","recipients_per_day","recipients_per_month","custom_domains","inbound_per_month","storage_bytes"]},"SubscriptionResponse":{"type":"object","properties":{"status":{"type":"string","description":"Stripe's status: active, past_due, canceled…"},"period_end":{"format":"date-time","type":"string","nullable":true,"description":"When the current period ends (it renews then)."},"cancels_at_period_end":{"type":"boolean","description":"Cancelled: the plan lasts until period_end, then the account is on Free."}},"required":["status","period_end","cancels_at_period_end"]},"OverLimitResponse":{"type":"object","properties":{"active":{"type":"number"},"limit":{"type":"number"},"pauses_at":{"format":"date-time","type":"string","description":"The newest active inboxes beyond the limit pause then, unless some are paused first."}},"required":["active","limit","pauses_at"]},"PlanResponse":{"type":"object","properties":{"id":{"type":"string","enum":["free","developer","growth"]},"name":{"type":"string"},"usd_per_month":{"type":"number"},"limits":{"$ref":"#/components/schemas/PlanLimitsResponse"}},"required":["id","name","usd_per_month","limits"]},"BillingResponse":{"type":"object","properties":{"plan":{"type":"string","enum":["free","developer","growth"]},"limits":{"$ref":"#/components/schemas/PlanLimitsResponse"},"subscription":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/SubscriptionResponse"}]},"payment_grace_ends_at":{"format":"date-time","type":"string","nullable":true,"description":"A payment is failing: the paid plan lasts until then, then the account moves to Free."},"inboxes_over_limit":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/OverLimitResponse"}]},"has_billing_account":{"type":"boolean","description":"A billing account exists: Manage billing (the Stripe Customer Portal) can open."},"available":{"type":"boolean","description":"Billing is set up: plans can be bought."},"plans":{"description":"Every plan, with its price and limits.","type":"array","items":{"$ref":"#/components/schemas/PlanResponse"}}},"required":["plan","limits","subscription","payment_grace_ends_at","inboxes_over_limit","has_billing_account","available","plans"]},"CheckoutRequest":{"type":"object","properties":{"plan":{"type":"string","enum":["developer","growth"]}},"required":["plan"]},"LinkResponse":{"type":"object","properties":{"url":{"type":"string","description":"Stripe's page: open it in the browser."}},"required":["url"]}}}}