openapi: 3.0.1 info: title: api version: '' paths: /v0/inboxes: get: description: |- **CLI:** ```bash agentmail inboxes list ``` operationId: inboxes_list tags: - Inboxes parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesListInboxesResponse' summary: List Inboxes servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: &ref_0 - BearerAuth: [] post: description: >- **CLI:** ```bash agentmail inboxes create --display-name "My Agent" --username myagent --domain agentmail.to ``` operationId: inboxes_create tags: - Inboxes parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesInbox' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/inboxesCreateInboxRequest' nullable: true /v0/inboxes/{inbox_id}: get: description: |- **CLI:** ```bash agentmail inboxes get --inbox-id ``` operationId: inboxes_get tags: - Inboxes parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesInbox' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- **CLI:** ```bash agentmail inboxes update --inbox-id --display-name "Updated Name" ``` operationId: inboxes_update tags: - Inboxes parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesInbox' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/inboxesUpdateInboxRequest' delete: description: |- **CLI:** ```bash agentmail inboxes delete --inbox-id ``` operationId: inboxes_delete tags: - Inboxes parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods: get: description: |- **CLI:** ```bash agentmail pods list ``` operationId: pods_list tags: - Pods parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/podsListPodsResponse' summary: List Pods servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: |- **CLI:** ```bash agentmail pods create --client-id my-pod ``` operationId: pods_create tags: - Pods parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/podsPod' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create Pod servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/podsCreatePodRequest' /v0/pods/{pod_id}: get: description: |- **CLI:** ```bash agentmail pods get --pod-id ``` operationId: pods_get tags: - Pods parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/podsPod' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Pod servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 delete: description: |- **CLI:** ```bash agentmail pods delete --pod-id ``` operationId: pods_delete tags: - Pods parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Pod servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/webhooks: get: description: |- **CLI:** ```bash agentmail webhooks list ``` operationId: webhooks_list tags: - Webhooks parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/webhooksListWebhooksResponse' summary: List Webhooks servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: >- **CLI:** ```bash agentmail webhooks create --url https://example.com/webhook --event-type message.received ``` operationId: webhooks_create tags: - Webhooks parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/webhooksWebhook' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create Webhook servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhooksCreateWebhookRequest' /v0/webhooks/{webhook_id}: get: description: |- **CLI:** ```bash agentmail webhooks get --webhook-id ``` operationId: webhooks_get tags: - Webhooks parameters: - name: webhook_id in: path required: true schema: $ref: '#/components/schemas/webhooksWebhookId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/webhooksWebhook' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Webhook servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- **CLI:** ```bash agentmail webhooks update --webhook-id --add-inbox-id ``` operationId: webhooks_update tags: - Webhooks parameters: - name: webhook_id in: path required: true schema: $ref: '#/components/schemas/webhooksWebhookId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/webhooksWebhook' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Webhook servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/webhooksUpdateWebhookRequest' delete: description: |- **CLI:** ```bash agentmail webhooks delete --webhook-id ``` operationId: webhooks_delete tags: - Webhooks parameters: - name: webhook_id in: path required: true schema: $ref: '#/components/schemas/webhooksWebhookId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Webhook servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/agent/sign-up: post: description: >- Create a new agent organization with an inbox and API key. This endpoint is for signing up for the first time. If you've already signed up, you're all set — just use your existing API key. A 6-digit OTP is sent to the human's email for verification. This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired. The returned API key has limited permissions until the organization is verified via the verify endpoint. **CLI:** ```bash agentmail agent sign-up --human-email user@example.com --username my-agent ``` operationId: agent_signUp tags: - Agent parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AgentSignupResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Sign Up servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgentSignupRequest' /v0/agent/verify: post: description: >- Verify an agent organization using the 6-digit OTP sent to the human's email during sign-up. On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied. The OTP expires after 24 hours and allows a maximum of 10 attempts. **CLI:** ```bash agentmail agent verify --otp-code 123456 ``` operationId: agent_verify tags: - Agent parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AgentVerifyResponse' summary: Verify servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgentVerifyRequest' /v0/api-keys: get: description: |- **CLI:** ```bash agentmail api-keys list ``` operationId: apiKeys_list tags: - APIKeys parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListApiKeysResponse' summary: List API Keys servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: |- **CLI:** ```bash agentmail api-keys create --name "My Key" ``` operationId: apiKeys_create tags: - APIKeys parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create API Key servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyRequest' /v0/api-keys/{api_key_id}: delete: description: |- **CLI:** ```bash agentmail api-keys delete --api-key-id ``` operationId: apiKeys_delete tags: - APIKeys parameters: - name: api_key_id in: path required: true schema: $ref: '#/components/schemas/ApiKeyId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete API Key servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/domains: get: description: |- **CLI:** ```bash agentmail domains list ``` operationId: domains_list tags: - Domains parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListDomainsResponse' summary: List Domains servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: |- **CLI:** ```bash agentmail domains create --domain example.com ``` operationId: domains_create tags: - Domains parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Domain' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateDomainRequest' /v0/domains/{domain_id}: get: description: |- **CLI:** ```bash agentmail domains get --domain-id ``` operationId: domains_get tags: - Domains parameters: - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Domain' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: |- **CLI:** ```bash agentmail domains update --domain-id ``` operationId: domains_update tags: - Domains parameters: - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Domain' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDomainRequest' delete: description: |- **CLI:** ```bash agentmail domains delete --domain-id ``` operationId: domains_delete tags: - Domains parameters: - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/domains/{domain_id}/zone-file: get: description: |- **CLI:** ```bash agentmail domains get-zone-file --domain-id ``` operationId: domains_getZoneFile tags: - Domains parameters: - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '200': description: '' content: application/octet-stream: schema: type: string format: binary '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Zone File servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/domains/{domain_id}/verify: post: description: |- **CLI:** ```bash agentmail domains verify --domain-id ``` operationId: domains_verify tags: - Domains parameters: - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Verify Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/drafts: get: description: |- **CLI:** ```bash agentmail drafts list ``` operationId: drafts_list tags: - Drafts parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListDraftsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Drafts servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/drafts/{draft_id}: get: description: |- **CLI:** ```bash agentmail drafts get --draft-id ``` operationId: drafts_get tags: - Drafts parameters: - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Draft' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/drafts/{draft_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail drafts get-attachment --draft-id --attachment-id ``` operationId: drafts_getAttachment tags: - Drafts parameters: - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/api-keys: get: description: |- **CLI:** ```bash agentmail inboxes:api-keys list --inbox-id ``` operationId: inboxes_apiKeys_list tags: - InboxesAPIKeys parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListApiKeysResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List API Keys servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: |- **CLI:** ```bash agentmail inboxes:api-keys create --inbox-id --name "My Key" ``` operationId: inboxes_apiKeys_create tags: - InboxesAPIKeys parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Create API Key servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyRequest' /v0/inboxes/{inbox_id}/api-keys/{api_key_id}: delete: description: >- **CLI:** ```bash agentmail inboxes:api-keys delete --inbox-id --api-key-id ``` operationId: inboxes_apiKeys_delete tags: - InboxesAPIKeys parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: api_key_id in: path required: true schema: $ref: '#/components/schemas/ApiKeyId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete API Key servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/drafts: get: description: |- **CLI:** ```bash agentmail inboxes:drafts list --inbox-id ``` operationId: inboxes_drafts_list tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListDraftsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Drafts servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: >- **CLI:** ```bash agentmail inboxes:drafts create --inbox-id --to recipient@example.com --subject "Draft subject" --text "Draft body" ``` operationId: inboxes_drafts_create tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Draft' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Create Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateDraftRequest' /v0/inboxes/{inbox_id}/drafts/{draft_id}: get: description: |- **CLI:** ```bash agentmail inboxes:drafts get --inbox-id --draft-id ``` operationId: inboxes_drafts_get tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Draft' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- **CLI:** ```bash agentmail inboxes:drafts update --inbox-id --draft-id --subject "Updated subject" ``` operationId: inboxes_drafts_update tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Draft' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDraftRequest' delete: description: >- **CLI:** ```bash agentmail inboxes:drafts delete --inbox-id --draft-id ``` operationId: inboxes_drafts_delete tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail inboxes:drafts get-attachment --inbox-id --draft-id --attachment-id ``` operationId: inboxes_drafts_getAttachment tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/drafts/{draft_id}/send: post: description: >- **CLI:** ```bash agentmail inboxes:drafts send --inbox-id --draft-id ``` operationId: inboxes_drafts_send tags: - InboxesDrafts parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SendMessageResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '403': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Send Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMessageRequest' /v0/inboxes/{inbox_id}/events: get: description: >- List label change events for an inbox. Returns events in reverse chronological order by default. Use for IMAP UID projection or audit logging. **CLI:** ```bash agentmail inboxes:events list --inbox-id ``` operationId: inboxes_events_list tags: - InboxesEvents parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListInboxEventsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Inbox Events servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/lists/{direction}/{type}: get: description: >- **CLI:** ```bash agentmail inboxes:lists list --inbox-id --direction --type ``` operationId: inboxes_lists_list tags: - InboxesLists parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PodListListEntriesResponse' summary: List Entries servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: >- **CLI:** ```bash agentmail inboxes:lists create --inbox-id --direction --type --entry user@example.com ``` operationId: inboxes_lists_create tags: - InboxesLists parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PodListEntry' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateListEntryRequest' /v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}: get: description: >- **CLI:** ```bash agentmail inboxes:lists get --inbox-id --direction --type --entry ``` operationId: inboxes_lists_get tags: - InboxesLists parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: entry in: path description: Email address or domain. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PodListEntry' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 delete: description: >- **CLI:** ```bash agentmail inboxes:lists delete --inbox-id --direction --type --entry ``` operationId: inboxes_lists_delete tags: - InboxesLists parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: entry in: path description: Email address or domain. required: true schema: type: string responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/messages: get: description: |- **CLI:** ```bash agentmail inboxes:messages list --inbox-id ``` operationId: inboxes_messages_list tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true - name: include_spam in: query required: false schema: $ref: '#/components/schemas/IncludeSpam' nullable: true - name: include_blocked in: query required: false schema: $ref: '#/components/schemas/IncludeBlocked' nullable: true - name: include_trash in: query required: false schema: $ref: '#/components/schemas/IncludeTrash' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListMessagesResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Messages servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/messages/{message_id}: get: description: >- **CLI:** ```bash agentmail inboxes:messages get --inbox-id --message-id ``` operationId: inboxes_messages_get tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Message' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- **CLI:** ```bash agentmail inboxes:messages update --inbox-id --message-id --add-label read --remove-label unread ``` operationId: inboxes_messages_update tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateMessageResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMessageRequest' delete: description: >- Permanently deletes a message. **CLI:** ```bash agentmail inboxes:messages delete --inbox-id --message-id ``` operationId: inboxes_messages_delete tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail inboxes:messages get-attachment --inbox-id --message-id --attachment-id ``` operationId: inboxes_messages_getAttachment tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/messages/{message_id}/raw: get: description: >- **CLI:** ```bash agentmail inboxes:messages get-raw --inbox-id --message-id ``` operationId: inboxes_messages_getRaw tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/RawMessageResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Raw Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/messages/send: post: description: >- **CLI:** ```bash agentmail inboxes:messages send --inbox-id --to recipient@example.com --subject "Hello" --text "Body" ``` operationId: inboxes_messages_send tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SendMessageResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '403': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Send Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SendMessageRequest' /v0/inboxes/{inbox_id}/messages/{message_id}/reply: post: description: >- **CLI:** ```bash agentmail inboxes:messages reply --inbox-id --message-id --text "Reply text" ``` operationId: inboxes_messages_reply tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SendMessageResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '403': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Reply To Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReplyToMessageRequest' /v0/inboxes/{inbox_id}/messages/{message_id}/reply-all: post: description: >- **CLI:** ```bash agentmail inboxes:messages reply-all --inbox-id --message-id --text "Reply text" ``` operationId: inboxes_messages_reply-all tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SendMessageResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '403': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Reply All Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReplyAllMessageRequest' /v0/inboxes/{inbox_id}/messages/{message_id}/forward: post: description: >- **CLI:** ```bash agentmail inboxes:messages forward --inbox-id --message-id --to recipient@example.com ``` operationId: inboxes_messages_forward tags: - InboxesMessages parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: message_id in: path required: true schema: $ref: '#/components/schemas/MessageId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/SendMessageResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '403': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Forward Message servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SendMessageRequest' /v0/inboxes/{inbox_id}/metrics: get: description: |- **CLI:** ```bash agentmail inboxes:metrics query --inbox-id ``` operationId: inboxes_metrics_query tags: - InboxesMetrics parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: event_types in: query required: false schema: $ref: '#/components/schemas/MetricEventTypes' nullable: true - name: start in: query required: false schema: $ref: '#/components/schemas/Start' nullable: true - name: end in: query required: false schema: $ref: '#/components/schemas/End' nullable: true - name: period in: query required: false schema: $ref: '#/components/schemas/Period' nullable: true - name: limit in: query required: false schema: $ref: '#/components/schemas/MetricLimit' nullable: true - name: descending in: query required: false schema: $ref: '#/components/schemas/Descending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/QueryMetricsResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Query Metrics servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/threads: get: description: |- **CLI:** ```bash agentmail inboxes:threads list --inbox-id ``` operationId: inboxes_threads_list tags: - InboxesThreads parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true - name: include_spam in: query required: false schema: $ref: '#/components/schemas/IncludeSpam' nullable: true - name: include_blocked in: query required: false schema: $ref: '#/components/schemas/IncludeBlocked' nullable: true - name: include_trash in: query required: false schema: $ref: '#/components/schemas/IncludeTrash' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListThreadsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Threads servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/threads/{thread_id}: get: description: >- **CLI:** ```bash agentmail inboxes:threads get --inbox-id --thread-id ``` operationId: inboxes_threads_get tags: - InboxesThreads parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Thread' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- Updates thread labels. Cannot add or remove system labels (sent, received, bounced, etc.). Rejects requests with a `422` for threads with 100 or more messages. operationId: inboxes_threads_update tags: - InboxesThreads parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateThreadResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateThreadRequest' delete: description: >- Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion. **CLI:** ```bash agentmail inboxes:threads delete --inbox-id --thread-id ``` operationId: inboxes_threads_delete tags: - InboxesThreads parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' - name: permanent in: query description: If true, permanently delete the thread instead of moving to trash. required: false schema: type: boolean nullable: true responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail inboxes:threads get-attachment --inbox-id --thread-id --attachment-id ``` operationId: inboxes_threads_getAttachment tags: - InboxesThreads parameters: - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/lists/{direction}/{type}: get: description: |- **CLI:** ```bash agentmail lists list --direction --type ``` operationId: lists_list tags: - Lists parameters: - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListListEntriesResponse' summary: List Entries servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: >- **CLI:** ```bash agentmail lists create --direction --type --entry user@example.com ``` operationId: lists_create tags: - Lists parameters: - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListEntry' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateListEntryRequest' /v0/lists/{direction}/{type}/{entry}: get: description: >- **CLI:** ```bash agentmail lists get --direction --type --entry ``` operationId: lists_get tags: - Lists parameters: - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: entry in: path description: Email address or domain. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListEntry' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 delete: description: >- **CLI:** ```bash agentmail lists delete --direction --type --entry ``` operationId: lists_delete tags: - Lists parameters: - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: entry in: path description: Email address or domain. required: true schema: type: string responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/metrics: get: description: |- **CLI:** ```bash agentmail metrics list ``` operationId: metrics_query tags: - Metrics parameters: - name: event_types in: query required: false schema: $ref: '#/components/schemas/MetricEventTypes' nullable: true - name: start in: query required: false schema: $ref: '#/components/schemas/Start' nullable: true - name: end in: query required: false schema: $ref: '#/components/schemas/End' nullable: true - name: period in: query required: false schema: $ref: '#/components/schemas/Period' nullable: true - name: limit in: query required: false schema: $ref: '#/components/schemas/MetricLimit' nullable: true - name: descending in: query required: false schema: $ref: '#/components/schemas/Descending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/QueryMetricsResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Query Metrics servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/organizations: get: description: >- Returns the organization for the authenticated API key (usage limits, counts, and billing metadata). **CLI:** ```bash agentmail organizations get ``` operationId: organizations_get tags: - Organizations parameters: [] responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Organization' summary: Get Organization servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/api-keys: get: description: |- **CLI:** ```bash agentmail pods:api-keys list --pod-id ``` operationId: pods_apiKeys_list tags: - PodsAPIKeys parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListApiKeysResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List API Keys servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: |- **CLI:** ```bash agentmail pods:api-keys create --pod-id --name "My Key" ``` operationId: pods_apiKeys_create tags: - PodsAPIKeys parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Create API Key servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyRequest' /v0/pods/{pod_id}/api-keys/{api_key_id}: delete: description: >- **CLI:** ```bash agentmail pods:api-keys delete --pod-id --api-key-id ``` operationId: pods_apiKeys_delete tags: - PodsAPIKeys parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: api_key_id in: path required: true schema: $ref: '#/components/schemas/ApiKeyId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete API Key servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/domains: get: description: |- **CLI:** ```bash agentmail pods:domains list --pod-id ``` operationId: pods_domains_list tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListDomainsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Domains servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: |- **CLI:** ```bash agentmail pods:domains create --pod-id --domain example.com ``` operationId: pods_domains_create tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Domain' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateDomainRequest' /v0/pods/{pod_id}/domains/{domain_id}: get: description: |- **CLI:** ```bash agentmail pods:domains get --pod-id --domain-id ``` operationId: pods_domains_get tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Domain' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: |- **CLI:** ```bash agentmail pods:domains update --pod-id --domain-id ``` operationId: pods_domains_update tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Domain' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDomainRequest' delete: description: |- **CLI:** ```bash agentmail pods:domains delete --pod-id --domain-id ``` operationId: pods_domains_delete tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/domains/{domain_id}/zone-file: get: description: >- **CLI:** ```bash agentmail pods:domains get-zone-file --pod-id --domain-id ``` operationId: pods_domains_getZoneFile tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '200': description: '' content: application/octet-stream: schema: type: string format: binary '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Zone File servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/domains/{domain_id}/verify: post: description: |- **CLI:** ```bash agentmail pods:domains verify --pod-id --domain-id ``` operationId: pods_domains_verify tags: - PodsDomains parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: domain_id in: path required: true schema: $ref: '#/components/schemas/DomainId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Verify Domain servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/drafts: get: description: |- **CLI:** ```bash agentmail pods:drafts list --pod-id ``` operationId: pods_drafts_list tags: - PodsDrafts parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListDraftsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Drafts servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/drafts/{draft_id}: get: description: |- **CLI:** ```bash agentmail pods:drafts get --pod-id --draft-id ``` operationId: pods_drafts_get tags: - PodsDrafts parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Draft' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Draft servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/drafts/{draft_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail pods:drafts get-attachment --pod-id --draft-id --attachment-id ``` operationId: pods_drafts_getAttachment tags: - PodsDrafts parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: draft_id in: path required: true schema: $ref: '#/components/schemas/DraftId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/inboxes: get: description: |- **CLI:** ```bash agentmail pods:inboxes list --pod-id ``` operationId: pods_inboxes_list tags: - PodsInboxes parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesListInboxesResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Inboxes servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: >- **CLI:** ```bash agentmail pods:inboxes create --pod-id --username myagent --domain example.com ``` operationId: pods_inboxes_create tags: - PodsInboxes parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesInbox' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/inboxesCreateInboxRequest' /v0/pods/{pod_id}/inboxes/{inbox_id}: get: description: |- **CLI:** ```bash agentmail pods:inboxes get --pod-id --inbox-id ``` operationId: pods_inboxes_get tags: - PodsInboxes parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesInbox' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: |- **CLI:** ```bash agentmail pods:inboxes update --pod-id --inbox-id ``` operationId: pods_inboxes_update tags: - PodsInboxes parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/inboxesInbox' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/inboxesUpdateInboxRequest' delete: description: |- **CLI:** ```bash agentmail pods:inboxes delete --pod-id --inbox-id ``` operationId: pods_inboxes_delete tags: - PodsInboxes parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: inbox_id in: path required: true schema: $ref: '#/components/schemas/inboxesInboxId' responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Inbox servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/lists/{direction}/{type}: get: description: >- **CLI:** ```bash agentmail pods:lists list --pod-id --direction --type ``` operationId: pods_lists_list tags: - PodsLists parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PodListListEntriesResponse' summary: List Entries servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 post: description: >- **CLI:** ```bash agentmail pods:lists create --pod-id --direction --type --entry user@example.com ``` operationId: pods_lists_create tags: - PodsLists parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PodListEntry' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Create List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateListEntryRequest' /v0/pods/{pod_id}/lists/{direction}/{type}/{entry}: get: description: >- **CLI:** ```bash agentmail pods:lists get --pod-id --direction --type --entry ``` operationId: pods_lists_get tags: - PodsLists parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: entry in: path description: Email address or domain. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PodListEntry' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 delete: description: >- **CLI:** ```bash agentmail pods:lists delete --pod-id --direction --type --entry ``` operationId: pods_lists_delete tags: - PodsLists parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: direction in: path required: true schema: $ref: '#/components/schemas/Direction' - name: type in: path required: true schema: $ref: '#/components/schemas/ListType' - name: entry in: path description: Email address or domain. required: true schema: type: string responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete List Entry servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/metrics: get: description: |- **CLI:** ```bash agentmail pods:metrics query --pod-id ``` operationId: pods_metrics_query tags: - PodsMetrics parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: event_types in: query required: false schema: $ref: '#/components/schemas/MetricEventTypes' nullable: true - name: start in: query required: false schema: $ref: '#/components/schemas/Start' nullable: true - name: end in: query required: false schema: $ref: '#/components/schemas/End' nullable: true - name: period in: query required: false schema: $ref: '#/components/schemas/Period' nullable: true - name: limit in: query required: false schema: $ref: '#/components/schemas/MetricLimit' nullable: true - name: descending in: query required: false schema: $ref: '#/components/schemas/Descending' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/QueryMetricsResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' summary: Query Metrics servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/threads: get: description: |- **CLI:** ```bash agentmail pods:threads list --pod-id ``` operationId: pods_threads_list tags: - PodsThreads parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true - name: include_spam in: query required: false schema: $ref: '#/components/schemas/IncludeSpam' nullable: true - name: include_blocked in: query required: false schema: $ref: '#/components/schemas/IncludeBlocked' nullable: true - name: include_trash in: query required: false schema: $ref: '#/components/schemas/IncludeTrash' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListThreadsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Threads servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/threads/{thread_id}: get: description: |- **CLI:** ```bash agentmail pods:threads get --pod-id --thread-id ``` operationId: pods_threads_get tags: - PodsThreads parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Thread' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- Updates thread labels. Cannot add or remove system labels (sent, received, bounced, etc.). Rejects requests with a `422` for threads with 100 or more messages. operationId: pods_threads_update tags: - PodsThreads parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateThreadResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateThreadRequest' delete: description: >- Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion. **CLI:** ```bash agentmail pods:threads delete --pod-id --thread-id ``` operationId: pods_threads_delete tags: - PodsThreads parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' - name: permanent in: query description: If true, permanently delete the thread instead of moving to trash. required: false schema: type: boolean nullable: true responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail pods:threads get-attachment --pod-id --thread-id --attachment-id ``` operationId: pods_threads_getAttachment tags: - PodsThreads parameters: - name: pod_id in: path required: true schema: $ref: '#/components/schemas/podsPodId' - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/threads: get: description: |- **CLI:** ```bash agentmail threads list ``` operationId: threads_list tags: - Threads parameters: - name: limit in: query required: false schema: $ref: '#/components/schemas/Limit' nullable: true - name: page_token in: query required: false schema: $ref: '#/components/schemas/PageToken' nullable: true - name: labels in: query required: false schema: $ref: '#/components/schemas/Labels' nullable: true - name: before in: query required: false schema: $ref: '#/components/schemas/Before' nullable: true - name: after in: query required: false schema: $ref: '#/components/schemas/After' nullable: true - name: ascending in: query required: false schema: $ref: '#/components/schemas/Ascending' nullable: true - name: include_spam in: query required: false schema: $ref: '#/components/schemas/IncludeSpam' nullable: true - name: include_blocked in: query required: false schema: $ref: '#/components/schemas/IncludeBlocked' nullable: true - name: include_trash in: query required: false schema: $ref: '#/components/schemas/IncludeTrash' nullable: true responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ListThreadsResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: List Threads servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/threads/{thread_id}: get: description: |- **CLI:** ```bash agentmail threads get --thread-id ``` operationId: threads_get tags: - Threads parameters: - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Thread' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 patch: description: >- Updates thread labels. Cannot add or remove system labels (sent, received, bounced, etc.). Rejects requests with a `422` for threads with 100 or more messages. operationId: threads_update tags: - Threads parameters: - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/UpdateThreadResponse' '400': description: '' content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Update Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateThreadRequest' delete: description: >- Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion. **CLI:** ```bash agentmail threads delete --thread-id ``` operationId: threads_delete tags: - Threads parameters: - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' - name: permanent in: query description: If true, permanently delete the thread instead of moving to trash. required: false schema: type: boolean nullable: true responses: '204': description: '' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Delete Thread servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 /v0/threads/{thread_id}/attachments/{attachment_id}: get: description: >- **CLI:** ```bash agentmail threads get-attachment --thread-id --attachment-id ``` operationId: threads_getAttachment tags: - Threads parameters: - name: thread_id in: path required: true schema: $ref: '#/components/schemas/ThreadId' - name: attachment_id in: path required: true schema: $ref: '#/components/schemas/AttachmentId' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AttachmentResponse' '404': description: '' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' summary: Get Attachment servers: - url: https://api.agentmail.to - url: https://x402.api.agentmail.to - url: https://mpp.api.agentmail.to - url: https://api.agentmail.eu security: *ref_0 components: schemas: Limit: title: Limit type: integer description: Limit of number of items returned. Count: title: Count type: integer description: Number of items returned. PageToken: title: PageToken type: string description: Page token for pagination. Labels: title: Labels type: array items: type: string description: Labels to filter by. Before: title: Before type: string format: date-time description: Timestamp before which to filter by. After: title: After type: string format: date-time description: Timestamp after which to filter by. Ascending: title: Ascending type: boolean description: Sort in ascending temporal order. IncludeSpam: title: IncludeSpam type: boolean description: Include spam in results. IncludeBlocked: title: IncludeBlocked type: boolean description: Include blocked in results. IncludeTrash: title: IncludeTrash type: boolean description: Include trash in results. OrganizationId: title: OrganizationId type: string description: ID of organization. ErrorName: title: ErrorName type: string description: Name of error. ErrorMessage: title: ErrorMessage type: string description: Error message. ErrorResponse: title: ErrorResponse type: object properties: name: $ref: '#/components/schemas/ErrorName' message: $ref: '#/components/schemas/ErrorMessage' required: - name - message ValidationErrorResponse: title: ValidationErrorResponse type: object properties: name: $ref: '#/components/schemas/ErrorName' errors: description: Validation errors. required: - name - errors inboxesInboxId: title: inboxesInboxId type: string description: The ID of the inbox. inboxesEmail: title: inboxesEmail type: string description: Email address of the inbox. inboxesDisplayName: title: inboxesDisplayName type: string description: 'Display name: `Display Name `.' inboxesClientId: title: inboxesClientId type: string description: Client ID of inbox. inboxesInbox: title: inboxesInbox type: object properties: pod_id: $ref: '#/components/schemas/podsPodId' inbox_id: $ref: '#/components/schemas/inboxesInboxId' email: $ref: '#/components/schemas/inboxesEmail' display_name: $ref: '#/components/schemas/inboxesDisplayName' nullable: true client_id: $ref: '#/components/schemas/inboxesClientId' nullable: true updated_at: type: string format: date-time description: Time at which inbox was last updated. created_at: type: string format: date-time description: Time at which inbox was created. required: - pod_id - inbox_id - email - updated_at - created_at inboxesListInboxesResponse: title: inboxesListInboxesResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true inboxes: type: array items: $ref: '#/components/schemas/inboxesInbox' description: Ordered by `created_at` descending. required: - count - inboxes inboxesCreateInboxRequest: title: inboxesCreateInboxRequest type: object properties: username: type: string nullable: true description: Username of address. Randomly generated if not specified. domain: type: string nullable: true description: >- Domain of address. Must be verified domain. Defaults to `agentmail.to`. display_name: $ref: '#/components/schemas/inboxesDisplayName' nullable: true client_id: $ref: '#/components/schemas/inboxesClientId' nullable: true inboxesUpdateInboxRequest: title: inboxesUpdateInboxRequest type: object properties: display_name: $ref: '#/components/schemas/inboxesDisplayName' required: - display_name podsPodId: title: podsPodId type: string description: ID of pod. podsName: title: podsName type: string description: Name of pod. podsClientId: title: podsClientId type: string description: Client ID of pod. podsPod: title: podsPod type: object properties: pod_id: $ref: '#/components/schemas/podsPodId' name: $ref: '#/components/schemas/podsName' updated_at: type: string format: date-time description: Time at which pod was last updated. created_at: type: string format: date-time description: Time at which pod was created. client_id: $ref: '#/components/schemas/podsClientId' nullable: true required: - pod_id - name - updated_at - created_at podsListPodsResponse: title: podsListPodsResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true pods: type: array items: $ref: '#/components/schemas/podsPod' description: Ordered by `created_at` descending. required: - count - pods podsCreatePodRequest: title: podsCreatePodRequest type: object properties: name: $ref: '#/components/schemas/podsName' nullable: true client_id: $ref: '#/components/schemas/podsClientId' nullable: true webhooksWebhookId: title: webhooksWebhookId type: string description: ID of webhook. webhooksClientId: title: webhooksClientId type: string description: Client ID of webhook. webhooksUrl: title: webhooksUrl type: string description: URL of webhook endpoint. webhooksWebhook: title: webhooksWebhook type: object properties: webhook_id: $ref: '#/components/schemas/webhooksWebhookId' url: $ref: '#/components/schemas/webhooksUrl' event_types: $ref: '#/components/schemas/EventTypes' nullable: true pod_ids: $ref: '#/components/schemas/PodIds' nullable: true inbox_ids: $ref: '#/components/schemas/InboxIds' nullable: true secret: type: string description: Secret for webhook signature verification. enabled: type: boolean description: Webhook is enabled. updated_at: type: string format: date-time description: Time at which webhook was last updated. created_at: type: string format: date-time description: Time at which webhook was created. client_id: $ref: '#/components/schemas/webhooksClientId' nullable: true required: - webhook_id - url - secret - enabled - updated_at - created_at webhooksListWebhooksResponse: title: webhooksListWebhooksResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true webhooks: type: array items: $ref: '#/components/schemas/webhooksWebhook' description: Ordered by `created_at` descending. required: - count - webhooks webhooksCreateWebhookRequest: title: webhooksCreateWebhookRequest type: object properties: url: $ref: '#/components/schemas/webhooksUrl' event_types: $ref: '#/components/schemas/EventTypes' pod_ids: $ref: '#/components/schemas/PodIds' nullable: true inbox_ids: $ref: '#/components/schemas/InboxIds' nullable: true client_id: $ref: '#/components/schemas/webhooksClientId' nullable: true required: - url - event_types webhooksUpdateWebhookRequest: title: webhooksUpdateWebhookRequest type: object properties: add_inbox_ids: $ref: '#/components/schemas/InboxIds' nullable: true description: Inbox IDs to subscribe to the webhook. remove_inbox_ids: $ref: '#/components/schemas/InboxIds' nullable: true description: Inbox IDs to unsubscribe from the webhook. add_pod_ids: $ref: '#/components/schemas/PodIds' nullable: true description: Pod IDs to subscribe to the webhook. remove_pod_ids: $ref: '#/components/schemas/PodIds' nullable: true description: Pod IDs to unsubscribe from the webhook. AgentSignupRequest: title: AgentSignupRequest type: object description: Request body to sign up an agent. properties: human_email: type: string description: >- Email address of the human who owns the agent. A 6-digit OTP will be sent to this address. username: type: string description: >- Username for the auto-created inbox (e.g. "my-agent" creates my-agent@agentmail.to). required: - human_email - username AgentSignupResponse: title: AgentSignupResponse type: object description: Response after successful agent sign-up. properties: organization_id: type: string description: ID of the created organization. inbox_id: type: string description: ID of the auto-created inbox. api_key: type: string description: >- API key for authenticating subsequent requests. Store this securely, it cannot be retrieved again. required: - organization_id - inbox_id - api_key AgentVerifyRequest: title: AgentVerifyRequest type: object description: Request body to verify an agent with an OTP code. properties: otp_code: type: string description: 6-digit verification code sent to the human's email address. required: - otp_code AgentVerifyResponse: title: AgentVerifyResponse type: object description: Response after successful agent verification. properties: verified: type: boolean description: Whether the organization was verified. required: - verified ApiKeyId: title: ApiKeyId type: string description: ID of api key. Prefix: title: Prefix type: string description: Prefix of api key. Name: title: Name type: string description: Name of api key. CreatedAt: title: CreatedAt type: string format: date-time description: Time at which api key was created. ApiKeyPermissions: title: ApiKeyPermissions type: object description: >- Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted. properties: inbox_read: type: boolean nullable: true description: Read inbox details. inbox_create: type: boolean nullable: true description: Create new inboxes. inbox_update: type: boolean nullable: true description: Update inbox settings. inbox_delete: type: boolean nullable: true description: Delete inboxes. thread_read: type: boolean nullable: true description: Read threads. thread_delete: type: boolean nullable: true description: Delete threads. message_read: type: boolean nullable: true description: Read messages. message_send: type: boolean nullable: true description: Send messages. message_update: type: boolean nullable: true description: Update message labels. label_spam_read: type: boolean nullable: true description: Access messages labeled spam. label_blocked_read: type: boolean nullable: true description: Access messages labeled blocked. label_trash_read: type: boolean nullable: true description: Access messages labeled trash. draft_read: type: boolean nullable: true description: Read drafts. draft_create: type: boolean nullable: true description: Create drafts. draft_update: type: boolean nullable: true description: Update drafts. draft_delete: type: boolean nullable: true description: Delete drafts. draft_send: type: boolean nullable: true description: Send drafts. webhook_read: type: boolean nullable: true description: Read webhook configurations. webhook_create: type: boolean nullable: true description: Create webhooks. webhook_update: type: boolean nullable: true description: Update webhooks. webhook_delete: type: boolean nullable: true description: Delete webhooks. domain_read: type: boolean nullable: true description: Read domain details. domain_create: type: boolean nullable: true description: Create domains. domain_update: type: boolean nullable: true description: Update domains. domain_delete: type: boolean nullable: true description: Delete domains. list_entry_read: type: boolean nullable: true description: Read list entries. list_entry_create: type: boolean nullable: true description: Create list entries. list_entry_delete: type: boolean nullable: true description: Delete list entries. metrics_read: type: boolean nullable: true description: Read metrics. api_key_read: type: boolean nullable: true description: Read API keys. api_key_create: type: boolean nullable: true description: Create API keys. api_key_delete: type: boolean nullable: true description: Delete API keys. pod_read: type: boolean nullable: true description: Read pods. pod_create: type: boolean nullable: true description: Create pods. pod_delete: type: boolean nullable: true description: Delete pods. ApiKey: title: ApiKey type: object properties: api_key_id: $ref: '#/components/schemas/ApiKeyId' prefix: $ref: '#/components/schemas/Prefix' name: $ref: '#/components/schemas/Name' pod_id: type: string nullable: true description: >- Pod ID the api key is scoped to. If set, the key can only access resources within this pod. inbox_id: type: string nullable: true description: >- Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox. used_at: type: string format: date-time nullable: true description: Time at which api key was last used. permissions: $ref: '#/components/schemas/ApiKeyPermissions' nullable: true created_at: $ref: '#/components/schemas/CreatedAt' required: - api_key_id - prefix - name - created_at CreateApiKeyResponse: title: CreateApiKeyResponse type: object properties: api_key_id: $ref: '#/components/schemas/ApiKeyId' api_key: type: string description: API key. prefix: $ref: '#/components/schemas/Prefix' name: $ref: '#/components/schemas/Name' pod_id: type: string nullable: true description: Pod ID the api key is scoped to. inbox_id: type: string nullable: true description: Inbox ID the api key is scoped to. permissions: $ref: '#/components/schemas/ApiKeyPermissions' nullable: true created_at: $ref: '#/components/schemas/CreatedAt' required: - api_key_id - api_key - prefix - name - created_at ListApiKeysResponse: title: ListApiKeysResponse type: object properties: count: $ref: '#/components/schemas/Count' next_page_token: $ref: '#/components/schemas/PageToken' nullable: true api_keys: type: array items: $ref: '#/components/schemas/ApiKey' description: Ordered by `created_at` descending. required: - count - api_keys CreateApiKeyRequest: title: CreateApiKeyRequest type: object properties: name: $ref: '#/components/schemas/Name' nullable: true permissions: $ref: '#/components/schemas/ApiKeyPermissions' nullable: true AttachmentId: title: AttachmentId type: string description: ID of attachment. AttachmentFilename: title: AttachmentFilename type: string description: Filename of attachment. AttachmentSize: title: AttachmentSize type: integer description: Size of attachment in bytes. AttachmentContentType: title: AttachmentContentType type: string description: Content type of attachment. AttachmentContentDisposition: title: AttachmentContentDisposition type: string enum: - inline - attachment description: Content disposition of attachment. AttachmentContentId: title: AttachmentContentId type: string description: Content ID of attachment. Attachment: title: Attachment type: object properties: attachment_id: $ref: '#/components/schemas/AttachmentId' filename: $ref: '#/components/schemas/AttachmentFilename' nullable: true size: $ref: '#/components/schemas/AttachmentSize' content_type: $ref: '#/components/schemas/AttachmentContentType' nullable: true content_disposition: $ref: '#/components/schemas/AttachmentContentDisposition' nullable: true content_id: $ref: '#/components/schemas/AttachmentContentId' nullable: true required: - attachment_id - size AttachmentResponse: title: AttachmentResponse type: object properties: attachment_id: $ref: '#/components/schemas/AttachmentId' filename: $ref: '#/components/schemas/AttachmentFilename' nullable: true size: $ref: '#/components/schemas/AttachmentSize' content_type: $ref: '#/components/schemas/AttachmentContentType' nullable: true content_disposition: $ref: '#/components/schemas/AttachmentContentDisposition' nullable: true content_id: $ref: '#/components/schemas/AttachmentContentId' nullable: true download_url: type: string description: URL to download the attachment. expires_at: type: string format: date-time description: Time at which the download URL expires. required: - attachment_id - size - download_url - expires_at SendAttachment: title: SendAttachment type: object properties: filename: $ref: '#/components/schemas/AttachmentFilename' nullable: true content_type: $ref: '#/components/schemas/AttachmentContentType' nullable: true content_disposition: $ref: '#/components/schemas/AttachmentContentDisposition' nullable: true content_id: $ref: '#/components/schemas/AttachmentContentId' nullable: true content: type: string nullable: true description: Base64 encoded content of attachment. url: type: string nullable: true description: URL to the attachment. DomainId: title: DomainId type: string description: The ID of the domain. DomainName: title: DomainName type: string description: The name of the domain (e.g., `example.com`). RecordType: title: RecordType type: string enum: - TXT - CNAME - MX VerificationStatus: title: VerificationStatus type: string enum: - NOT_STARTED - PENDING - INVALID - FAILED - VERIFYING - VERIFIED RecordStatus: title: RecordStatus type: string enum: - MISSING - INVALID - VALID VerificationRecord: title: VerificationRecord type: object properties: type: $ref: '#/components/schemas/RecordType' description: The type of the DNS record. name: type: string description: The name or host of the record. value: type: string description: The value of the record. status: $ref: '#/components/schemas/RecordStatus' description: The verification status of this specific record. priority: type: integer nullable: true description: The priority of the MX record. required: - type - name - value - status Status: title: Status $ref: '#/components/schemas/VerificationStatus' description: The verification status of the domain. FeedbackEnabled: title: FeedbackEnabled type: boolean description: Bounce and complaint notifications are sent to your inboxes. ClientId: title: ClientId type: string description: Client ID of domain. Domain: title: Domain type: object properties: pod_id: $ref: '#/components/schemas/podsPodId' nullable: true domain_id: $ref: '#/components/schemas/DomainId' domain: $ref: '#/components/schemas/DomainName' status: $ref: '#/components/schemas/Status' feedback_enabled: $ref: '#/components/schemas/FeedbackEnabled' records: type: array items: $ref: '#/components/schemas/VerificationRecord' description: A list of DNS records required to verify the domain. client_id: $ref: '#/components/schemas/ClientId' nullable: true updated_at: type: string format: date-time description: Time at which the domain was last updated. created_at: type: string format: date-time description: Time at which the domain was created. required: - domain_id - domain - status - feedback_enabled - records - updated_at - created_at DomainItem: title: DomainItem type: object properties: pod_id: $ref: '#/components/schemas/podsPodId' nullable: true domain_id: $ref: '#/components/schemas/DomainId' domain: $ref: '#/components/schemas/DomainName' feedback_enabled: $ref: '#/components/schemas/FeedbackEnabled' client_id: $ref: '#/components/schemas/ClientId' nullable: true updated_at: type: string format: date-time description: Time at which the domain was last updated. created_at: type: string format: date-time description: Time at which the domain was created. required: - domain_id - domain - feedback_enabled - updated_at - created_at ListDomainsResponse: title: ListDomainsResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true domains: type: array items: $ref: '#/components/schemas/DomainItem' description: Ordered by `created_at` descending. required: - count - domains CreateDomainRequest: title: CreateDomainRequest type: object properties: domain: $ref: '#/components/schemas/DomainName' feedback_enabled: $ref: '#/components/schemas/FeedbackEnabled' required: - domain - feedback_enabled UpdateDomainRequest: title: UpdateDomainRequest type: object properties: feedback_enabled: $ref: '#/components/schemas/FeedbackEnabled' nullable: true DraftId: title: DraftId type: string description: ID of draft. DraftClientId: title: DraftClientId type: string description: Client ID of draft. DraftLabels: title: DraftLabels type: array items: type: string description: Labels of draft. DraftReplyTo: title: DraftReplyTo type: array items: type: string description: >- Reply-to addresses. In format `username@domain.com` or `Display Name `. DraftTo: title: DraftTo type: array items: type: string description: >- Addresses of recipients. In format `username@domain.com` or `Display Name `. DraftCc: title: DraftCc type: array items: type: string description: >- Addresses of CC recipients. In format `username@domain.com` or `Display Name `. DraftBcc: title: DraftBcc type: array items: type: string description: >- Addresses of BCC recipients. In format `username@domain.com` or `Display Name `. DraftSubject: title: DraftSubject type: string description: Subject of draft. DraftPreview: title: DraftPreview type: string description: Text preview of draft. DraftText: title: DraftText type: string description: Plain text body of draft. DraftHtml: title: DraftHtml type: string description: HTML body of draft. DraftAttachments: title: DraftAttachments type: array items: $ref: '#/components/schemas/Attachment' description: Attachments in draft. DraftInReplyTo: title: DraftInReplyTo type: string description: ID of message being replied to. DraftSendStatus: title: DraftSendStatus type: string enum: - scheduled - sending - failed description: Schedule send status of draft. DraftSendAt: title: DraftSendAt type: string format: date-time description: Time at which to schedule send draft. DraftUpdatedAt: title: DraftUpdatedAt type: string format: date-time description: Time at which draft was last updated. DraftItem: title: DraftItem type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' draft_id: $ref: '#/components/schemas/DraftId' labels: $ref: '#/components/schemas/DraftLabels' to: $ref: '#/components/schemas/DraftTo' nullable: true cc: $ref: '#/components/schemas/DraftCc' nullable: true bcc: $ref: '#/components/schemas/DraftBcc' nullable: true subject: $ref: '#/components/schemas/DraftSubject' nullable: true preview: $ref: '#/components/schemas/DraftPreview' nullable: true attachments: $ref: '#/components/schemas/DraftAttachments' nullable: true in_reply_to: $ref: '#/components/schemas/DraftInReplyTo' nullable: true send_status: $ref: '#/components/schemas/DraftSendStatus' nullable: true send_at: $ref: '#/components/schemas/DraftSendAt' nullable: true updated_at: $ref: '#/components/schemas/DraftUpdatedAt' required: - inbox_id - draft_id - labels - updated_at Draft: title: Draft type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' draft_id: $ref: '#/components/schemas/DraftId' client_id: $ref: '#/components/schemas/DraftClientId' nullable: true labels: $ref: '#/components/schemas/DraftLabels' reply_to: $ref: '#/components/schemas/DraftReplyTo' nullable: true to: $ref: '#/components/schemas/DraftTo' nullable: true cc: $ref: '#/components/schemas/DraftCc' nullable: true bcc: $ref: '#/components/schemas/DraftBcc' nullable: true subject: $ref: '#/components/schemas/DraftSubject' nullable: true preview: $ref: '#/components/schemas/DraftPreview' nullable: true text: $ref: '#/components/schemas/DraftText' nullable: true html: $ref: '#/components/schemas/DraftHtml' nullable: true attachments: $ref: '#/components/schemas/DraftAttachments' nullable: true in_reply_to: $ref: '#/components/schemas/DraftInReplyTo' nullable: true references: type: array items: type: string nullable: true description: IDs of previous messages in thread. send_status: $ref: '#/components/schemas/DraftSendStatus' nullable: true send_at: $ref: '#/components/schemas/DraftSendAt' nullable: true updated_at: $ref: '#/components/schemas/DraftUpdatedAt' created_at: type: string format: date-time description: Time at which draft was created. required: - inbox_id - draft_id - labels - updated_at - created_at ListDraftsResponse: title: ListDraftsResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true drafts: type: array items: $ref: '#/components/schemas/DraftItem' description: Ordered by `updated_at` descending. required: - count - drafts CreateDraftRequest: title: CreateDraftRequest type: object properties: labels: $ref: '#/components/schemas/DraftLabels' nullable: true reply_to: $ref: '#/components/schemas/DraftReplyTo' nullable: true to: $ref: '#/components/schemas/DraftTo' nullable: true cc: $ref: '#/components/schemas/DraftCc' nullable: true bcc: $ref: '#/components/schemas/DraftBcc' nullable: true subject: $ref: '#/components/schemas/DraftSubject' nullable: true text: $ref: '#/components/schemas/DraftText' nullable: true html: $ref: '#/components/schemas/DraftHtml' nullable: true attachments: type: array items: $ref: '#/components/schemas/SendAttachment' nullable: true description: Attachments to include in draft. in_reply_to: $ref: '#/components/schemas/DraftInReplyTo' nullable: true send_at: $ref: '#/components/schemas/DraftSendAt' nullable: true client_id: $ref: '#/components/schemas/DraftClientId' nullable: true UpdateDraftRequest: title: UpdateDraftRequest type: object properties: reply_to: $ref: '#/components/schemas/DraftReplyTo' nullable: true to: $ref: '#/components/schemas/DraftTo' nullable: true cc: $ref: '#/components/schemas/DraftCc' nullable: true bcc: $ref: '#/components/schemas/DraftBcc' nullable: true subject: $ref: '#/components/schemas/DraftSubject' nullable: true text: $ref: '#/components/schemas/DraftText' nullable: true html: $ref: '#/components/schemas/DraftHtml' nullable: true send_at: $ref: '#/components/schemas/DraftSendAt' nullable: true EventType: title: EventType type: string enum: - message.received - message.received.spam - message.received.blocked - message.sent - message.delivered - message.bounced - message.complained - message.rejected - domain.verified EventTypes: title: EventTypes type: array items: $ref: '#/components/schemas/EventType' description: Event types for which to send events. PodIds: title: PodIds type: array items: type: string description: Pods for which to send events. Maximum 10 per webhook. InboxIds: title: InboxIds type: array items: type: string description: Inboxes for which to send events. Maximum 10 per webhook. EventId: title: EventId type: string description: ID of event. Timestamp: title: Timestamp type: string format: date-time description: Timestamp of event. Recipient: title: Recipient type: object properties: address: type: string description: Recipient address. status: type: string description: Recipient status. required: - address - status Send: title: Send type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' timestamp: $ref: '#/components/schemas/Timestamp' recipients: type: array items: type: string description: Sent recipients. required: - inbox_id - thread_id - message_id - timestamp - recipients Delivery: title: Delivery type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' timestamp: $ref: '#/components/schemas/Timestamp' recipients: type: array items: type: string description: Delivered recipients. required: - inbox_id - thread_id - message_id - timestamp - recipients Bounce: title: Bounce type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' timestamp: $ref: '#/components/schemas/Timestamp' type: type: string description: Bounce type. sub_type: type: string description: Bounce sub-type. recipients: type: array items: $ref: '#/components/schemas/Recipient' description: Bounced recipients. required: - inbox_id - thread_id - message_id - timestamp - type - sub_type - recipients Complaint: title: Complaint type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' timestamp: $ref: '#/components/schemas/Timestamp' type: type: string description: Complaint type. sub_type: type: string description: Complaint sub-type. recipients: type: array items: type: string description: Complained recipients. required: - inbox_id - thread_id - message_id - timestamp - type - sub_type - recipients Reject: title: Reject type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' timestamp: $ref: '#/components/schemas/Timestamp' reason: type: string description: Reject reason. required: - inbox_id - thread_id - message_id - timestamp - reason MessageReceivedEvent: title: MessageReceivedEvent type: object properties: type: type: string const: event event_type: type: string const: message.received event_id: $ref: '#/components/schemas/EventId' message: $ref: '#/components/schemas/Message' thread: $ref: '#/components/schemas/ThreadItem' required: - type - event_type - event_id - message - thread MessageReceivedSpamEvent: title: MessageReceivedSpamEvent type: object description: >- A message was received and classified as spam. Requires `label_spam_read` permission. properties: type: type: string const: event event_type: type: string const: message.received.spam event_id: $ref: '#/components/schemas/EventId' message: $ref: '#/components/schemas/Message' thread: $ref: '#/components/schemas/ThreadItem' required: - type - event_type - event_id - message - thread MessageReceivedBlockedEvent: title: MessageReceivedBlockedEvent type: object description: >- A message was received and matched a block list entry. Requires `label_blocked_read` permission. properties: type: type: string const: event event_type: type: string const: message.received.blocked event_id: $ref: '#/components/schemas/EventId' message: $ref: '#/components/schemas/Message' thread: $ref: '#/components/schemas/ThreadItem' required: - type - event_type - event_id - message - thread MessageSentEvent: title: MessageSentEvent type: object properties: type: type: string const: event event_type: type: string const: message.sent event_id: $ref: '#/components/schemas/EventId' send: $ref: '#/components/schemas/Send' required: - type - event_type - event_id - send MessageDeliveredEvent: title: MessageDeliveredEvent type: object properties: type: type: string const: event event_type: type: string const: message.delivered event_id: $ref: '#/components/schemas/EventId' delivery: $ref: '#/components/schemas/Delivery' required: - type - event_type - event_id - delivery MessageBouncedEvent: title: MessageBouncedEvent type: object properties: type: type: string const: event event_type: type: string const: message.bounced event_id: $ref: '#/components/schemas/EventId' bounce: $ref: '#/components/schemas/Bounce' required: - type - event_type - event_id - bounce MessageComplainedEvent: title: MessageComplainedEvent type: object properties: type: type: string const: event event_type: type: string const: message.complained event_id: $ref: '#/components/schemas/EventId' complaint: $ref: '#/components/schemas/Complaint' required: - type - event_type - event_id - complaint MessageRejectedEvent: title: MessageRejectedEvent type: object properties: type: type: string const: event event_type: type: string const: message.rejected event_id: $ref: '#/components/schemas/EventId' reject: $ref: '#/components/schemas/Reject' required: - type - event_type - event_id - reject DomainVerifiedEvent: title: DomainVerifiedEvent type: object properties: type: type: string const: event event_type: type: string const: domain.verified event_id: $ref: '#/components/schemas/EventId' domain: $ref: '#/components/schemas/Domain' required: - type - event_type - event_id - domain InboxEventId: title: InboxEventId type: string description: ID of event. InboxEventType: title: InboxEventType type: string enum: - label_added - label_removed description: Type of inbox event. InboxEvent: title: InboxEvent type: object properties: organization_id: $ref: '#/components/schemas/OrganizationId' pod_id: type: string description: ID of pod. inbox_id: $ref: '#/components/schemas/inboxesInboxId' event_id: $ref: '#/components/schemas/InboxEventId' event_type: $ref: '#/components/schemas/InboxEventType' message_id: type: string description: ID of message. label: type: string description: Label added or removed. event_at: type: string format: date-time description: Time at which the event occurred. created_at: type: string format: date-time description: Time at which the event was recorded. required: - organization_id - pod_id - inbox_id - event_id - event_type - message_id - label - event_at - created_at ListInboxEventsResponse: title: ListInboxEventsResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true events: type: array items: $ref: '#/components/schemas/InboxEvent' description: Ordered by `event_id` descending. required: - count - events Direction: title: Direction type: string enum: - send - receive - reply description: Direction of list entry. ListType: title: ListType type: string enum: - allow - block description: Type of list entry. EntryType: title: EntryType type: string enum: - email - domain description: Whether the entry is an email address or domain. ListEntryBase: title: ListEntryBase type: object properties: entry: type: string description: Email address or domain of list entry. organization_id: $ref: '#/components/schemas/OrganizationId' reason: type: string nullable: true description: Reason for adding the entry. direction: $ref: '#/components/schemas/Direction' list_type: $ref: '#/components/schemas/ListType' entry_type: $ref: '#/components/schemas/EntryType' created_at: type: string format: date-time description: Time at which entry was created. required: - entry - organization_id - direction - list_type - entry_type - created_at ListEntry: title: ListEntry type: object properties: {} allOf: - $ref: '#/components/schemas/ListEntryBase' PodListEntry: title: PodListEntry type: object properties: pod_id: type: string description: ID of pod. inbox_id: type: string nullable: true description: ID of inbox, if entry is inbox-scoped. required: - pod_id allOf: - $ref: '#/components/schemas/ListEntryBase' PodListListEntriesResponse: title: PodListListEntriesResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true entries: type: array items: $ref: '#/components/schemas/PodListEntry' description: Ordered by entry ascending. required: - count - entries ListListEntriesResponse: title: ListListEntriesResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true entries: type: array items: $ref: '#/components/schemas/ListEntry' description: Ordered by entry ascending. required: - count - entries CreateListEntryRequest: title: CreateListEntryRequest type: object properties: entry: type: string description: Email address or domain to add. reason: type: string nullable: true description: Reason for adding the entry. required: - entry MessageId: title: MessageId type: string description: ID of message. MessageLabels: title: MessageLabels type: array items: type: string description: Labels of message. MessageTimestamp: title: MessageTimestamp type: string format: date-time description: Time at which message was sent or drafted. MessageFrom: title: MessageFrom type: string description: >- Address of sender. In format `username@domain.com` or `Display Name `. MessageReplyTo: title: MessageReplyTo type: array items: type: string description: >- Addresses of reply-to recipients. In format `username@domain.com` or `Display Name `. MessageTo: title: MessageTo type: array items: type: string description: >- Addresses of recipients. In format `username@domain.com` or `Display Name `. MessageCc: title: MessageCc type: array items: type: string description: >- Addresses of CC recipients. In format `username@domain.com` or `Display Name `. MessageBcc: title: MessageBcc type: array items: type: string description: >- Addresses of BCC recipients. In format `username@domain.com` or `Display Name `. MessageSubject: title: MessageSubject type: string description: Subject of message. MessagePreview: title: MessagePreview type: string description: Text preview of message. MessageText: title: MessageText type: string description: Plain text body of message. MessageHtml: title: MessageHtml type: string description: HTML body of message. MessageAttachments: title: MessageAttachments type: array items: $ref: '#/components/schemas/Attachment' description: Attachments in message. MessageInReplyTo: title: MessageInReplyTo type: string description: ID of message being replied to. MessageReferences: title: MessageReferences type: array items: type: string description: IDs of previous messages in thread. MessageHeaders: title: MessageHeaders type: object additionalProperties: type: string description: Headers in message. MessageSize: title: MessageSize type: integer description: Size of message in bytes. MessageUpdatedAt: title: MessageUpdatedAt type: string format: date-time description: Time at which message was last updated. MessageCreatedAt: title: MessageCreatedAt type: string format: date-time description: Time at which message was created. MessageItem: title: MessageItem type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' labels: $ref: '#/components/schemas/MessageLabels' timestamp: $ref: '#/components/schemas/MessageTimestamp' from: $ref: '#/components/schemas/MessageFrom' to: $ref: '#/components/schemas/MessageTo' cc: $ref: '#/components/schemas/MessageCc' nullable: true bcc: $ref: '#/components/schemas/MessageBcc' nullable: true subject: $ref: '#/components/schemas/MessageSubject' nullable: true preview: $ref: '#/components/schemas/MessagePreview' nullable: true attachments: $ref: '#/components/schemas/MessageAttachments' nullable: true in_reply_to: $ref: '#/components/schemas/MessageInReplyTo' nullable: true references: $ref: '#/components/schemas/MessageReferences' nullable: true headers: $ref: '#/components/schemas/MessageHeaders' nullable: true size: $ref: '#/components/schemas/MessageSize' updated_at: $ref: '#/components/schemas/MessageUpdatedAt' created_at: $ref: '#/components/schemas/MessageCreatedAt' required: - inbox_id - thread_id - message_id - labels - timestamp - from - to - size - updated_at - created_at Message: title: Message type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' message_id: $ref: '#/components/schemas/MessageId' labels: $ref: '#/components/schemas/MessageLabels' timestamp: $ref: '#/components/schemas/MessageTimestamp' from: $ref: '#/components/schemas/MessageFrom' reply_to: type: array items: type: string nullable: true description: >- Reply-to addresses. In format `username@domain.com` or `Display Name `. to: $ref: '#/components/schemas/MessageTo' cc: $ref: '#/components/schemas/MessageCc' nullable: true bcc: $ref: '#/components/schemas/MessageBcc' nullable: true subject: $ref: '#/components/schemas/MessageSubject' nullable: true preview: $ref: '#/components/schemas/MessagePreview' nullable: true text: $ref: '#/components/schemas/MessageText' nullable: true html: $ref: '#/components/schemas/MessageHtml' nullable: true extracted_text: type: string nullable: true description: Extracted new text content. extracted_html: type: string nullable: true description: Extracted new HTML content. attachments: $ref: '#/components/schemas/MessageAttachments' nullable: true in_reply_to: $ref: '#/components/schemas/MessageInReplyTo' nullable: true references: $ref: '#/components/schemas/MessageReferences' nullable: true headers: $ref: '#/components/schemas/MessageHeaders' nullable: true size: $ref: '#/components/schemas/MessageSize' updated_at: $ref: '#/components/schemas/MessageUpdatedAt' created_at: $ref: '#/components/schemas/MessageCreatedAt' required: - inbox_id - thread_id - message_id - labels - timestamp - from - to - size - updated_at - created_at ListMessagesResponse: title: ListMessagesResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true messages: type: array items: $ref: '#/components/schemas/MessageItem' description: Ordered by `timestamp` descending. required: - count - messages RawMessageResponse: title: RawMessageResponse type: object description: S3 presigned URL to download the raw .eml file. properties: message_id: $ref: '#/components/schemas/MessageId' description: ID of the message. size: $ref: '#/components/schemas/MessageSize' description: Size of the raw message in bytes. download_url: type: string description: S3 presigned URL to download the raw message. Expires at expires_at. expires_at: type: string format: date-time description: Time at which the download URL expires. required: - message_id - size - download_url - expires_at Addresses: title: Addresses oneOf: - type: string - type: array items: type: string SendMessageReplyTo: title: SendMessageReplyTo $ref: '#/components/schemas/Addresses' description: Reply-to address or addresses. SendMessageTo: title: SendMessageTo $ref: '#/components/schemas/Addresses' description: Recipient address or addresses. SendMessageCc: title: SendMessageCc $ref: '#/components/schemas/Addresses' description: CC recipient address or addresses. SendMessageBcc: title: SendMessageBcc $ref: '#/components/schemas/Addresses' description: BCC recipient address or addresses. SendMessageAttachments: title: SendMessageAttachments type: array items: $ref: '#/components/schemas/SendAttachment' description: Attachments to include in message. SendMessageHeaders: title: SendMessageHeaders type: object additionalProperties: type: string description: Headers to include in message. SendMessageRequest: title: SendMessageRequest type: object properties: labels: $ref: '#/components/schemas/MessageLabels' nullable: true reply_to: $ref: '#/components/schemas/SendMessageReplyTo' nullable: true to: $ref: '#/components/schemas/SendMessageTo' nullable: true cc: $ref: '#/components/schemas/SendMessageCc' nullable: true bcc: $ref: '#/components/schemas/SendMessageBcc' nullable: true subject: $ref: '#/components/schemas/MessageSubject' nullable: true text: $ref: '#/components/schemas/MessageText' nullable: true html: $ref: '#/components/schemas/MessageHtml' nullable: true attachments: $ref: '#/components/schemas/SendMessageAttachments' nullable: true headers: $ref: '#/components/schemas/SendMessageHeaders' nullable: true SendMessageResponse: title: SendMessageResponse type: object properties: message_id: $ref: '#/components/schemas/MessageId' thread_id: $ref: '#/components/schemas/ThreadId' required: - message_id - thread_id UpdateMessageResponse: title: UpdateMessageResponse type: object properties: message_id: $ref: '#/components/schemas/MessageId' labels: $ref: '#/components/schemas/MessageLabels' required: - message_id - labels ReplyAll: title: ReplyAll type: boolean description: Reply to all recipients of the original message. ReplyToMessageRequest: title: ReplyToMessageRequest type: object properties: labels: $ref: '#/components/schemas/MessageLabels' nullable: true reply_to: $ref: '#/components/schemas/SendMessageReplyTo' nullable: true to: $ref: '#/components/schemas/SendMessageTo' nullable: true cc: $ref: '#/components/schemas/SendMessageCc' nullable: true bcc: $ref: '#/components/schemas/SendMessageBcc' nullable: true reply_all: $ref: '#/components/schemas/ReplyAll' nullable: true text: $ref: '#/components/schemas/MessageText' nullable: true html: $ref: '#/components/schemas/MessageHtml' nullable: true attachments: $ref: '#/components/schemas/SendMessageAttachments' nullable: true headers: $ref: '#/components/schemas/SendMessageHeaders' nullable: true ReplyAllMessageRequest: title: ReplyAllMessageRequest type: object properties: labels: $ref: '#/components/schemas/MessageLabels' nullable: true reply_to: $ref: '#/components/schemas/SendMessageReplyTo' nullable: true text: $ref: '#/components/schemas/MessageText' nullable: true html: $ref: '#/components/schemas/MessageHtml' nullable: true attachments: $ref: '#/components/schemas/SendMessageAttachments' nullable: true headers: $ref: '#/components/schemas/SendMessageHeaders' nullable: true UpdateMessageLabels: title: UpdateMessageLabels oneOf: - type: string - type: array items: type: string description: Label or list of labels. UpdateMessageRequest: title: UpdateMessageRequest type: object properties: add_labels: $ref: '#/components/schemas/UpdateMessageLabels' nullable: true description: Label or labels to add to message. remove_labels: $ref: '#/components/schemas/UpdateMessageLabels' nullable: true description: Label or labels to remove from message. MetricEventType: title: MetricEventType type: string enum: - message.sent - message.delivered - message.bounced - message.delayed - message.rejected - message.complained - message.received description: Type of metric event. MetricEventTypes: title: MetricEventTypes type: array items: $ref: '#/components/schemas/MetricEventType' description: List of metric event types to query. Start: title: Start type: string format: date-time description: Start timestamp for the query. End: title: End type: string format: date-time description: End timestamp for the query. Period: title: Period type: string description: Period in number of seconds for the query. MetricLimit: title: MetricLimit type: integer description: Limit on number of buckets to return. Descending: title: Descending type: boolean description: Sort in descending order. MetricBucket: title: MetricBucket type: object properties: timestamp: type: string format: date-time description: Timestamp of the bucket. count: type: integer description: Count of events in the bucket. required: - timestamp - count QueryMetricsResponse: title: QueryMetricsResponse type: object additionalProperties: type: array items: $ref: '#/components/schemas/MetricBucket' description: Metrics grouped by event type. Organization: title: Organization type: object description: Organization details with usage limits and counts. properties: organization_id: $ref: '#/components/schemas/OrganizationId' inbox_count: type: integer description: Current number of inboxes. domain_count: type: integer description: Current number of domains. inbox_limit: type: integer nullable: true description: Maximum number of inboxes allowed. domain_limit: type: integer nullable: true description: Maximum number of domains allowed. billing_id: type: string nullable: true description: Provider-agnostic billing customer ID. billing_type: type: string nullable: true description: Billing provider type (e.g. "stripe"). billing_subscription_id: type: string nullable: true description: Active billing subscription ID. authentication_id: type: string nullable: true description: Provider-agnostic authentication ID. authentication_type: type: string nullable: true description: Authentication provider type. updated_at: type: string format: date-time description: Time at which organization was last updated. created_at: type: string format: date-time description: Time at which organization was created. required: - organization_id - inbox_count - domain_count - updated_at - created_at ThreadId: title: ThreadId type: string description: ID of thread. ThreadLabels: title: ThreadLabels type: array items: type: string description: Labels of thread. ThreadTimestamp: title: ThreadTimestamp type: string format: date-time description: Timestamp of last sent or received message. ThreadReceivedTimestamp: title: ThreadReceivedTimestamp type: string format: date-time description: Timestamp of last received message. ThreadSentTimestamp: title: ThreadSentTimestamp type: string format: date-time description: Timestamp of last sent message. ThreadSenders: title: ThreadSenders type: array items: type: string description: >- Senders in thread. In format `username@domain.com` or `Display Name `. ThreadRecipients: title: ThreadRecipients type: array items: type: string description: >- Recipients in thread. In format `username@domain.com` or `Display Name `. ThreadSubject: title: ThreadSubject type: string description: Subject of thread. ThreadPreview: title: ThreadPreview type: string description: Text preview of last message in thread. ThreadAttachments: title: ThreadAttachments type: array items: $ref: '#/components/schemas/Attachment' description: Attachments in thread. ThreadLastMessageId: title: ThreadLastMessageId type: string description: ID of last message in thread. ThreadMessageCount: title: ThreadMessageCount type: integer description: Number of messages in thread. ThreadSize: title: ThreadSize type: integer description: Size of thread in bytes. ThreadUpdatedAt: title: ThreadUpdatedAt type: string format: date-time description: Time at which thread was last updated. ThreadCreatedAt: title: ThreadCreatedAt type: string format: date-time description: Time at which thread was created. ThreadItem: title: ThreadItem type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' labels: $ref: '#/components/schemas/ThreadLabels' timestamp: $ref: '#/components/schemas/ThreadTimestamp' received_timestamp: $ref: '#/components/schemas/ThreadReceivedTimestamp' nullable: true sent_timestamp: $ref: '#/components/schemas/ThreadSentTimestamp' nullable: true senders: $ref: '#/components/schemas/ThreadSenders' recipients: $ref: '#/components/schemas/ThreadRecipients' subject: $ref: '#/components/schemas/ThreadSubject' nullable: true preview: $ref: '#/components/schemas/ThreadPreview' nullable: true attachments: $ref: '#/components/schemas/ThreadAttachments' nullable: true last_message_id: $ref: '#/components/schemas/ThreadLastMessageId' message_count: $ref: '#/components/schemas/ThreadMessageCount' size: $ref: '#/components/schemas/ThreadSize' updated_at: $ref: '#/components/schemas/ThreadUpdatedAt' created_at: $ref: '#/components/schemas/ThreadCreatedAt' required: - inbox_id - thread_id - labels - timestamp - senders - recipients - last_message_id - message_count - size - updated_at - created_at Thread: title: Thread type: object properties: inbox_id: $ref: '#/components/schemas/inboxesInboxId' thread_id: $ref: '#/components/schemas/ThreadId' labels: $ref: '#/components/schemas/ThreadLabels' timestamp: $ref: '#/components/schemas/ThreadTimestamp' received_timestamp: $ref: '#/components/schemas/ThreadReceivedTimestamp' nullable: true sent_timestamp: $ref: '#/components/schemas/ThreadSentTimestamp' nullable: true senders: $ref: '#/components/schemas/ThreadSenders' recipients: $ref: '#/components/schemas/ThreadRecipients' subject: $ref: '#/components/schemas/ThreadSubject' nullable: true preview: $ref: '#/components/schemas/ThreadPreview' nullable: true attachments: $ref: '#/components/schemas/ThreadAttachments' nullable: true last_message_id: $ref: '#/components/schemas/ThreadLastMessageId' message_count: $ref: '#/components/schemas/ThreadMessageCount' size: $ref: '#/components/schemas/ThreadSize' updated_at: $ref: '#/components/schemas/ThreadUpdatedAt' created_at: $ref: '#/components/schemas/ThreadCreatedAt' messages: type: array items: $ref: '#/components/schemas/Message' description: Messages in thread. Ordered by `timestamp` ascending. required: - inbox_id - thread_id - labels - timestamp - senders - recipients - last_message_id - message_count - size - updated_at - created_at - messages UpdateThreadRequest: title: UpdateThreadRequest type: object properties: add_labels: type: array items: type: string nullable: true description: Labels to add to thread. Cannot be system labels. remove_labels: type: array items: type: string nullable: true description: >- Labels to remove from thread. Cannot be system labels. Takes priority over `add_labels` (in the event of duplicate labels passed in). UpdateThreadResponse: title: UpdateThreadResponse type: object properties: thread_id: $ref: '#/components/schemas/ThreadId' labels: $ref: '#/components/schemas/ThreadLabels' required: - thread_id - labels ListThreadsResponse: title: ListThreadsResponse type: object properties: count: $ref: '#/components/schemas/Count' limit: $ref: '#/components/schemas/Limit' nullable: true next_page_token: $ref: '#/components/schemas/PageToken' nullable: true threads: type: array items: $ref: '#/components/schemas/ThreadItem' description: Ordered by `timestamp` descending. required: - count - threads webhooksSvixId: title: webhooksSvixId type: string description: ID of webhook message. webhooksSvixTimestamp: title: webhooksSvixTimestamp type: string format: date-time description: Timestamp of webhook message. webhooksSvixSignature: title: webhooksSvixSignature type: string description: Signature of webhook message. Subscribe: title: Subscribe type: object properties: type: type: string const: subscribe event_types: $ref: '#/components/schemas/EventTypes' nullable: true inbox_ids: $ref: '#/components/schemas/InboxIds' nullable: true pod_ids: $ref: '#/components/schemas/PodIds' nullable: true required: - type Subscribed: title: Subscribed type: object properties: type: type: string const: subscribed event_types: $ref: '#/components/schemas/EventTypes' nullable: true inbox_ids: $ref: '#/components/schemas/InboxIds' nullable: true pod_ids: $ref: '#/components/schemas/PodIds' nullable: true required: - type Error: title: Error type: object properties: type: type: string const: error name: $ref: '#/components/schemas/ErrorName' message: $ref: '#/components/schemas/ErrorMessage' required: - type - name - message securitySchemes: BearerAuth: type: http scheme: bearer