# AgentMail Update Message

> AgentMail Update Message is a free API for AI agents from AgentMail at mpp.api.agentmail.to, Free, status unknown (last checked 2026-10-11).

Updates labels on a specific email message within an AgentMail inbox

## Facts

- Endpoint: PATCH https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/messages/:message_id?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Provider: AgentMail
- Docs: https://docs.agentmail.to
- Website: https://agentmail.to
- Tags: email, inboxes, domains, drafts, threads, webhooks, messaging, ai, social
- Canonical page: https://www.zero.xyz/c/agentmail-message-id-d71981dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tl0ZXo_aLrqeGJKNZcEf0

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentmail-message-id-d71981dc -d '<json body>'
```

Example prompt: In my AgentMail inbox 'support-bot', add the label 'urgent' and remove the label 'unread' from message ID 'msg_abc123'.

## When to prefer this

Use this endpoint when you need to programmatically update the labels on a specific email message in an AgentMail inbox — for example, to mark messages as processed, flagged, read, or categorized as part of an automated AI agent email workflow. Prefer this over recreating or deleting messages when only metadata/labeling changes are needed.

## Known failure modes

- 404 Not Found if inbox_id or message_id does not exist
- 401 Unauthorized if Bearer token is missing or invalid
- 400 Bad Request if add_labels or remove_labels contain invalid values
- 409 Conflict if attempting to add a label that already exists or remove one that is not present
- 500 Internal Server Error if the AgentMail service is unavailable

## How this service works

Update Message

## Output

Returns the full updated Message object including inbox_id, thread_id, message_id, updated labels array, from/to/cc/bcc addresses, subject, plain text and HTML body, preview, headers, size in bytes, and created_at/updated_at timestamps.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "UpdateMessageRequest",
 "properties": {
  "add_labels": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Labels to add to message."
  },
  "remove_labels": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Labels to remove from message."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "Message",
 "required": [
  "inbox_id",
  "thread_id",
  "message_id",
  "labels",
  "timestamp",
  "from",
  "to",
  "size",
  "updated_at",
  "created_at"
 ],
 "properties": {
  "cc": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "title": "MessageCc",
   "description": "Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`."
  },
  "to": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "title": "MessageTo",
   "description": "Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`."
  },
  "bcc": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "title": "MessageBcc",
   "description": "Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`."
  },
  "from": {
   "type": "string",
   "title": "MessageFrom",
   "description": "Address of sender. In format `username@domain.com` or `Display Name <username@domain.com>`."
  },
  "html": {
   "type": "string",
   "title": "MessageHtml",
   "description": "HTML body of message."
  },
  "size": {
   "type": "integer",
   "title": "MessageSize",
   "description": "Size of message in bytes."
  },
  "text": {
   "type": "string",
   "title": "MessageText",
   "description": "Plain text body of message."
  },
  "labels": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "title": "MessageLabels",
   "description": "Labels of message."
  },
  "headers": {
   "type": "object",
   "title": "MessageHeaders",
   "description": "Headers in message.",
   "additionalProperties": {
    "type": "string"
   }
  },
  "preview": {
   "type": "string",
   "title": "MessagePreview",
   "description": "Text preview of message."
  },
  "subject": {
   "type": "string",
   "title": "MessageSubject",
   "description": "Subject of message."
  },
  "inbox_id": {
   "type": "string",
   "title": "InboxId",
   "description": "The ID of the inbox."
  },
  "reply_to": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`."
  },
  "thread_id": {
   "type": "string",
   "title": "ThreadId",
   "description": "ID of thread."
  },
  "timestamp": {
   "type": "string",
   "title": "MessageTimestamp",
   "format": "date-time",
   "description": "Time at which message was sent or drafted."
  },
  "creat
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentmail-message-id-d71981dc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mpp.api.agentmail.to](https://www.zero.xyz/host/mpp.api.agentmail.to/llms.txt)
