> ## Documentation Index
> Fetch the complete documentation index at: https://agentmail.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://agentmail.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://agentmail.manicule.dev/api/mcp.
> Every agent surface: https://agentmail.manicule.dev/.well-known/llms-manifest.json

# Message Received (/api-reference/message-received)

<!-- agent-signals: reading_time_min: 5 · est_tokens: 4083 · updated: 2026-09-29 -->
Related: [Sign Up](/api-reference/sign-up.md), [Attach Human](/api-reference/attach-human.md), [Verify](/api-reference/verify.md), [List Inboxes](/api-reference/list-inboxes.md), [Create Inbox](/api-reference/create-inbox.md), [Search Inboxes](/api-reference/search-inboxes.md)

# Message Received

`POST` webhook `webhooks_events_messageReceived`

> Message Received

Base URL: `https://api.agentmail.to`

Base URL: `https://x402.api.agentmail.to`

Base URL: `https://mpp.api.agentmail.to`

Base URL: `https://api.agentmail.eu`

## OpenAPI

```json
{
  "servers": [
    {
      "url": "https://api.agentmail.to",
      "description": "prod"
    },
    {
      "url": "https://x402.api.agentmail.to",
      "description": "prod-x402"
    },
    {
      "url": "https://mpp.api.agentmail.to",
      "description": "prod-mpp"
    },
    {
      "url": "https://api.agentmail.eu",
      "description": "eu-prod"
    }
  ],
  "parameters": [
    {
      "name": "svix-id",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "description": "ID of webhook message.",
        "title": "SvixId"
      }
    },
    {
      "name": "svix-signature",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "description": "Signature of webhook message.",
        "title": "SvixSignature"
      }
    },
    {
      "name": "svix-timestamp",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of webhook message.",
        "title": "SvixTimestamp"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "event"
              ]
            },
            "event_type": {
              "type": "string",
              "enum": [
                "message.received",
                "message.received.spam",
                "message.received.blocked",
                "message.received.unauthenticated"
              ],
              "title": "MessageReceivedEventType"
            },
            "event_id": {
              "type": "string",
              "description": "ID of event.",
              "title": "EventId"
            },
            "message": {
              "type": "object",
              "properties": {
                "inbox_id": {
                  "type": "string",
                  "description": "The ID of the inbox.",
                  "title": "InboxId"
                },
                "thread_id": {
                  "type": "string",
                  "description": "ID of thread.",
                  "title": "ThreadId"
                },
                "message_id": {
                  "type": "string",
                  "description": "ID of message.",
                  "title": "MessageId"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Labels of message.",
                  "title": "MessageLabels"
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time at which message was sent or drafted.",
                  "title": "MessageTimestamp"
                },
                "from": {
                  "type": "string",
                  "description": "Address of sender. In format `username@domain.com` or `Display Name <username@domain.com>`.",
                  "title": "MessageFrom"
                },
                "reply_to": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`."
                },
                "to": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.",
                  "title": "MessageTo"
                },
                "cc": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.",
                  "title": "MessageCc"
                },
                "bcc": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.",
                  "title": "MessageBcc"
                },
                "subject": {
                  "type": "string",
                  "description": "Subject of message.",
                  "title": "MessageSubject"
                },
                "preview": {
                  "type": "string",
                  "description": "Text preview of message.",
                  "title": "MessagePreview"
                },
                "text": {
                  "type": "string",
                  "description": "Plain text body of message.",
                  "title": "MessageText"
                },
                "html": {
                  "type": "string",
                  "description": "HTML body of message.",
                  "title": "MessageHtml"
                },
                "extracted_text": {
                  "type": "string",
                  "description": "Extracted new text content."
                },
                "extracted_html": {
                  "type": "string",
                  "description": "Extracted new HTML content."
                },
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "attachment_id": {
                        "type": "string",
                        "description": "ID of attachment.",
                        "title": "AttachmentId"
                      },
                      "filename": {
                        "type": "string",
                        "description": "Filename of attachment.",
                        "title": "AttachmentFilename"
                      },
                      "size": {
                        "type": "integer",
                        "description": "Size of attachment in bytes.",
                        "title": "AttachmentSize"
                      },
                      "content_type": {
                        "type": "string",
                        "description": "Content type of attachment.",
                        "title": "AttachmentContentType"
                      },
                      "content_disposition": {
                        "type": "string",
                        "enum": [
                          "inline",
                          "attachment"
                        ],
                        "description": "Content disposition of attachment.",
                        "title": "AttachmentContentDisposition"
                      },
                      "content_id": {
                        "type": "string",
                        "description": "Content ID of attachment.",
                        "title": "AttachmentContentId"
                      }
                    },
                    "required": [
                      "attachment_id",
                      "size"
                    ],
                    "title": "Attachment"
                  },
                  "description": "Attachments in message.",
                  "title": "MessageAttachments"
                },
                "in_reply_to": {
                  "type": "string",
                  "description": "ID of message being replied to.",
                  "title": "MessageInReplyTo"
                },
                "references": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "IDs of previous messages in thread.",
                  "title": "MessageReferences"
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Headers in message.",
                  "title": "MessageHeaders"
                },
                "size": {
                  "type": "integer",
                  "description": "Size of message in bytes.",
                  "title": "MessageSize"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time at which message was last updated.",
                  "title": "MessageUpdatedAt"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time at which message was created.",
                  "title": "MessageCreatedAt"
                }
              },
              "required": [
                "inbox_id",
                "thread_id",
                "message_id",
                "labels",
                "timestamp",
                "from",
                "to",
                "size",
                "updated_at",
                "created_at"
              ],
              "title": "Message"
            },
            "thread": {
              "type": "object",
              "properties": {
                "inbox_id": {
                  "type": "string",
                  "description": "The ID of the inbox.",
                  "title": "InboxId"
                },
                "thread_id": {
                  "type": "string",
                  "description": "ID of thread.",
                  "title": "ThreadId"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Labels of thread.",
                  "title": "ThreadLabels"
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp of last sent or received message.",
                  "title": "ThreadTimestamp"
                },
                "received_timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp of last received message.",
                  "title": "ThreadReceivedTimestamp"
                },
                "sent_timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp of last sent message.",
                  "title": "ThreadSentTimestamp"
                },
                "senders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Senders in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.",
                  "title": "ThreadSenders"
                },
                "recipients": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Recipients in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.",
                  "title": "ThreadRecipients"
                },
                "subject": {
                  "type": "string",
                  "description": "Subject of thread.",
                  "title": "ThreadSubject"
                },
                "preview": {
                  "type": "string",
                  "description": "Text preview of last message in thread.",
                  "title": "ThreadPreview"
                },
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "attachment_id": {
                        "type": "string",
                        "description": "ID of attachment.",
                        "title": "AttachmentId"
                      },
                      "filename": {
                        "type": "string",
                        "description": "Filename of attachment.",
                        "title": "AttachmentFilename"
                      },
                      "size": {
                        "type": "integer",
                        "description": "Size of attachment in bytes.",
                        "title": "AttachmentSize"
                      },
                      "content_type": {
                        "type": "string",
                        "description": "Content type of attachment.",
                        "title": "AttachmentContentType"
                      },
                      "content_disposition": {
                        "type": "string",
                        "enum": [
                          "inline",
                          "attachment"
                        ],
                        "description": "Content disposition of attachment.",
                        "title": "AttachmentContentDisposition"
                      },
                      "content_id": {
                        "type": "string",
                        "description": "Content ID of attachment.",
                        "title": "AttachmentContentId"
                      }
                    },
                    "required": [
                      "attachment_id",
                      "size"
                    ],
                    "title": "Attachment"
                  },
                  "description": "Attachments in thread.",
                  "title": "ThreadAttachments"
                },
                "last_message_id": {
                  "type": "string",
                  "description": "ID of last message in thread.",
                  "title": "ThreadLastMessageId"
                },
                "message_count": {
                  "type": "integer",
                  "description": "Number of messages in thread.",
                  "title": "ThreadMessageCount"
                },
                "size": {
                  "type": "integer",
                  "description": "Size of thread in bytes.",
                  "title": "ThreadSize"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time at which thread was last updated.",
                  "title": "ThreadUpdatedAt"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time at which thread was created.",
                  "title": "ThreadCreatedAt"
                }
              },
              "required": [
                "inbox_id",
                "thread_id",
                "labels",
                "timestamp",
                "senders",
                "recipients",
                "last_message_id",
                "message_count",
                "size",
                "updated_at",
                "created_at"
              ],
              "title": "ThreadItem"
            }
          },
          "required": [
            "type",
            "event_type",
            "event_id",
            "message",
            "thread"
          ],
          "description": "A message was received. Spam, blocked, and unauthenticated received-message events use the same payload shape with different `event_type` values.",
          "title": "MessageReceivedEvent"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Webhook received successfully"
    }
  }
}
```
