---
title: "Create Webhook"
method: POST
path: "/v0/webhooks"
tags: ["Webhooks"]
---

# Create Webhook

`POST /v0/webhooks`

## Request

- Base URL: `https://api.agentmail.to`
- URL: `https://api.agentmail.to/v0/webhooks`
- Auth: HTTP bearer

**CLI:**
```bash
agentmail webhooks create --url https://example.com/webhook --event-type message.received
```

## Request body

- WebhooksCreateWebhookRequest
  - `url` string, required: URL of webhook endpoint.
  - `event_types` EventType[], required: Event types for which to send events.
  - `pod_ids` string[]: Pods for which to send events. Maximum 10 per webhook.
  - `inbox_ids` string[]: Inboxes for which to send events. Maximum 10 per webhook.
  - `client_id` string: Client ID of webhook.

## Response `200`

- WebhooksWebhook
  - `webhook_id` string, required: ID of webhook.
  - `url` string, required: URL of webhook endpoint.
  - `event_types` EventType[]: Event types for which to send events.
  - `pod_ids` string[]: Pods for which to send events. Maximum 10 per webhook.
  - `inbox_ids` string[]: Inboxes for which to send events. Maximum 10 per webhook.
  - `secret` string, required: Secret for webhook signature verification.
  - `enabled` boolean, required: Webhook is enabled.
  - `updated_at` string, date-time, required: Time at which webhook was last updated.
  - `created_at` string, date-time, required: Time at which webhook was created.
  - `client_id` string: Client ID of webhook.

## Other responses

- `400`

---

[API](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/revisions/869b7f1c360c?raw)
