{"openapi":"3.1.0","info":{"title":"InboxNest API","version":"1.0.0","description":"Read and answer support conversations, manage addresses and webhooks, and send app email. Authenticate with an API key: `Authorization: Bearer inbx_live_…`. Docs: https://tryinboxnest.com/docs/api"},"servers":[{"url":"https://tryinboxnest.com/api/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/me":{"get":{"summary":"The account, this key and usage against limits","description":"Any valid API key.","responses":{"200":{"description":"Account, key and usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/domains":{"get":{"summary":"List domains","description":"Scope: `inbox:read`.","responses":{"200":{"description":"Domains","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}]}},"/domains/{id}":{"get":{"summary":"Get a domain","description":"Scope: `inbox:read`.","responses":{"200":{"description":"Domain","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Domain"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]}},"/addresses":{"get":{"summary":"List addresses","description":"Scope: `inbox:read`.","responses":{"200":{"description":"Addresses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"domain_id","in":"query","schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}]},"post":{"summary":"Create an address","description":"Scope: `addresses:write`.","responses":{"201":{"description":"Created. On forwarding domains status is pending_forwarding with instructions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressCreated"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}]}},"/addresses/{id}":{"delete":{"summary":"Remove an address (not the primary one)","description":"Scope: `addresses:write`.","responses":{"204":{"description":"Removed"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]}},"/conversations":{"get":{"summary":"List conversations, newest activity first","description":"Scope: `inbox:read`.","responses":{"200":{"description":"Conversations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"folder","in":"query","schema":{"type":"string","enum":["inbox","sent","spam","trash"],"default":"inbox"}},{"name":"domain_id","in":"query","schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"address_id","in":"query","schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"unread","in":"query","schema":{"type":"boolean"}},{"name":"follow_up","in":"query","schema":{"type":"boolean"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"q","in":"query","schema":{"type":"string","minLength":2,"maxLength":200},"description":"Search subject, customer and message text. Search results are one page."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}]},"post":{"summary":"Start a new conversation (one recipient; needs approval)","description":"Scope: `mail:send_new`.","responses":{"201":{"description":"Sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStarted"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"$ref":"#/components/responses/Unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewConversationInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Required on sends. Same key and body within 24 hours returns the original response; a different body returns 409."}]}},"/conversations/{id}":{"get":{"summary":"Get a conversation with its messages","description":"Scope: `inbox:read`.","responses":{"200":{"description":"Conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]},"patch":{"summary":"Mark read, flag for follow-up, or move folder","description":"Scope: `inbox:write`.","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPatch"}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]}},"/conversations/{id}/reply":{"post":{"summary":"Reply to the customer","description":"Scope: `mail:send`.","responses":{"201":{"description":"Sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSent"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"$ref":"#/components/responses/Unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyInput"}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Required on sends. Same key and body within 24 hours returns the original response; a different body returns 409."}]}},"/drafts":{"get":{"summary":"List drafts","description":"Scope: `inbox:read`.","responses":{"200":{"description":"Drafts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Draft"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}]},"post":{"summary":"Save a draft (replaces the conversation's draft)","description":"Scope: `drafts:write`.","responses":{"201":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Draft"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}]}},"/drafts/{id}":{"delete":{"summary":"Delete a draft","description":"Scope: `drafts:write`.","responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]}},"/drafts/{id}/send":{"post":{"summary":"Send a draft as the reply","description":"Scope: `mail:send`.","responses":{"201":{"description":"Sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSent"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"$ref":"#/components/responses/Unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Required on sends. Same key and body within 24 hours returns the original response; a different body returns 409."}]}},"/webhooks":{"get":{"summary":"List webhook endpoints","description":"Scope: `webhooks:write`.","responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}]},"post":{"summary":"Create a webhook endpoint (returns the secret once)","description":"Scope: `webhooks:write`.","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}]}},"/webhooks/{id}":{"get":{"summary":"Get a webhook endpoint","description":"Scope: `webhooks:write`.","responses":{"200":{"description":"Endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]},"patch":{"summary":"Update a webhook endpoint","description":"Scope: `webhooks:write`.","responses":{"200":{"description":"Endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]},"delete":{"summary":"Delete a webhook endpoint","description":"Scope: `webhooks:write`.","responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}}]}},"/webhooks/{id}/test":{"post":{"summary":"Send a test event now","description":"Scope: `webhooks:write`.","responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}]}},"/webhooks/{id}/roll-secret":{"post":{"summary":"Replace the signing secret (returned once)","description":"Scope: `webhooks:write`.","responses":{"200":{"description":"New secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}]}},"/emails":{"get":{"summary":"List transactional emails","description":"Scope: `mail:transactional`.","responses":{"200":{"description":"Emails","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Email"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["queued","sent","delivered","bounced","complained","failed","suppressed"]}},{"name":"domain_id","in":"query","schema":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},{"name":"to","in":"query","schema":{"type":"string","format":"email"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."}]},"post":{"summary":"Send a transactional email","description":"Scope: `mail:transactional`.","responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSent"}}}},"200":{"description":"Every recipient was suppressed; nothing was sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSent"}}}},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Invalid"},"503":{"$ref":"#/components/responses/Unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Required on sends. Same key and body within 24 hours returns the original response; a different body returns 409."}]}},"/emails/batch":{"post":{"summary":"Send up to 100 transactional emails (partial success)","description":"Scope: `mail:transactional`.","responses":{"200":{"description":"One result per email, in order","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmailSent"},{"$ref":"#/components/schemas/ErrorItem"}]}}}}}}},"422":{"$ref":"#/components/responses/Invalid"},"503":{"$ref":"#/components/responses/Unavailable"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/EmailInput"}}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255},"description":"Required on sends. Same key and body within 24 hours returns the original response; a different body returns 409."}]}},"/emails/{id}":{"get":{"summary":"Get a transactional email's status and events","description":"Scope: `mail:transactional`.","responses":{"200":{"description":"Email","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Email"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^eml_[A-Za-z0-9]{24}$"}}]}},"/openapi.json":{"get":{"summary":"This OpenAPI document","security":[],"responses":{"200":{"description":"OpenAPI 3.1"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An InboxNest API key (inbx_live_…)."}},"responses":{"BadRequest":{"description":"Bad request (invalid JSON, missing Idempotency-Key, bad cursor)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid, expired or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"insufficient_scope, sending_disabled, key_sending_paused, not approved, account_inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not found, including anything outside the key's domain restriction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Idempotency conflict or a state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Invalid":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate or sending limit; see Retry-After and error.scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"A sending stream is not configured, or a dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retry_after":{"type":"integer"},"scope":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"ErrorItem":{"type":"object","properties":{"index":{"type":"integer"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Me":{"type":"object","properties":{"account":{"type":"object"},"key":{"type":"object"},"usage":{"type":"object"}}},"Domain":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"name":{"type":"string"},"display_name":{"type":["string","null"]},"inbound_mode":{"type":"string","enum":["direct_mx","forwarding"]},"status":{"type":"string"},"verification":{"type":"object"},"can_send":{"type":"boolean"},"can_receive":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Address":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"domain_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"email":{"type":"string"},"local_part":{"type":"string"},"sender_name":{"type":["string","null"]},"primary":{"type":"boolean"},"status":{"type":"string","enum":["active","pending","pending_forwarding","removed"]},"created_at":{"type":"string","format":"date-time"}}},"AddressInput":{"type":"object","properties":{"domain_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"local_part":{"type":"string","maxLength":64},"sender_name":{"type":"string","maxLength":120}},"required":["domain_id","local_part"]},"AddressCreated":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Address"},"status":{"type":"string"},"forwarding":{"type":"object","properties":{"forward_to":{"type":"string"},"instructions":{"type":"string"}}}}},"Conversation":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"subject":{"type":"string"},"folder":{"type":"string","enum":["inbox","spam","trash"]},"unread":{"type":"boolean"},"follow_up":{"type":"boolean"},"follow_up_at":{"type":["string","null"],"format":"date-time"},"source":{"type":"string"},"domain":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"name":{"type":"string"}}},"address":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"email":{"type":"string"}}},"customer":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]}}},"latest_message_from":{"type":"string","enum":["customer","you"]},"customer_preview":{"type":"string"},"reply_preview":{"type":"string"},"last_message_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"Message":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"conversation_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"customer_from_name":{"type":["string","null"]},"customer_text_body":{"type":["string","null"]},"customer_html_body":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time"},"spam":{"type":"boolean"},"from_name":{"type":["string","null"]},"text_body":{"type":["string","null"]},"html_body":{"type":["string","null"]},"sent_at":{"type":"string","format":"date-time"},"delivery_status":{"type":"string"},"sent_via":{"type":["string","null"]}}},"ConversationDetail":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Conversation"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"earlier_messages_omitted":{"type":"integer"}}}]},"content_notice":{"type":"string"}}},"ConversationPatch":{"type":"object","properties":{"read":{"type":"boolean"},"follow_up_at":{"type":["string","null"],"format":"date-time","description":"Any timestamp flags the conversation for follow-up; null clears it."},"folder":{"type":"string","enum":["inbox","spam","trash"]}}},"ReplyInput":{"type":"object","properties":{"body_text":{"type":"string","maxLength":102400},"body_html":{"type":"string","maxLength":102400}},"required":["body_text"]},"MessageSent":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"},"delivery_status":{"type":"string"}}},"NewConversationInput":{"type":"object","properties":{"from_address_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"to":{"type":"string","format":"email"},"subject":{"type":"string","maxLength":255},"body_text":{"type":"string","maxLength":102400},"body_html":{"type":"string","maxLength":102400}},"required":["from_address_id","to","subject","body_text"]},"ConversationStarted":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"},"message":{"$ref":"#/components/schemas/Message"}}},"Draft":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"conversation_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"body":{"type":"string"},"source":{"type":"string"},"created_by":{"type":["string","null"]},"subject":{"type":["string","null"]},"domain":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"DraftInput":{"type":"object","properties":{"conversation_id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"body":{"type":"string","maxLength":102400}},"required":["conversation_id","body"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivery_failed","message.complained","conversation.updated","address.created","address.removed","draft.created","email.sent","email.delivered","email.bounced","email.complained","email.failed"]}},"domain_ids":{"type":["array","null"],"items":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},"enabled":{"type":"boolean"},"disabled_reason":{"type":["string","null"]},"consecutive_failures":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}},"WebhookInput":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivery_failed","message.complained","conversation.updated","address.created","address.removed","draft.created","email.sent","email.delivered","email.bounced","email.complained","email.failed"]}},"domain_ids":{"type":["array","null"],"items":{"type":"string","pattern":"^[0-9]+$","description":"Numeric id as a string."}},"description":{"type":"string","maxLength":120},"enabled":{"type":"boolean"}},"required":["url","events"]},"WebhookWithSecret":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"secret":{"type":"string","description":"whsec_… Shown only now."}}}]}}},"EmailInput":{"type":"object","properties":{"from":{"type":"string","description":"\"Name <local@yourdomain>\" on a domain verified for sending."},"to":{"oneOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"}}]},"cc":{"oneOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"}}]},"bcc":{"oneOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"}}]},"reply_to":{"oneOf":[{"type":"string","format":"email"},{"type":"array","items":{"type":"string","format":"email"}}]},"subject":{"type":"string","maxLength":255},"html":{"type":"string"},"text":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"List-Unsubscribe, List-Unsubscribe-Post, X-Entity-Ref-ID and X-* only."},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string","contentEncoding":"base64"},"content_type":{"type":"string"}},"required":["filename","content"]}},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["from","to","subject"]},"EmailSent":{"type":"object","properties":{"id":{"type":"string","pattern":"^eml_"},"status":{"type":"string"},"recipients":{"type":"integer"},"suppressed":{"type":"array","items":{"type":"string"}}}},"Email":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","sent","delivered","bounced","complained","failed","suppressed"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"tags":{"type":"array"},"metadata":{"type":"object"},"recipients":{"type":"array"},"created_at":{"type":"string","format":"date-time"},"last_event_at":{"type":["string","null"],"format":"date-time"},"events":{"type":"array"}}}}}}