---
title: "Create Webhook"
method: POST
path: "/api/v1/webhooks"
tags: ["webhooks"]
---

# Create Webhook

`POST /api/v1/webhooks`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/v1/webhooks`
- Auth: HTTP bearer

## Request body

- WebhookCreate
  - `url` string, required: HTTPS endpoint that will receive POSTed events (public hosts only)
  - `events` string[]: Events to receive (subset of ['agent.deployed', 'agent.error', 'agent.restarted', 'agent.sleeping', 'agent.stopped', 'agent.woken', 'exec.finished', 'message.failed', 'message.reply']). Empty = all.

## Response `201`

Successful Response

- WebhookCreated
  - `id` string, required
  - `url` string, required
  - `events` string[], required
  - `isActive` boolean, required
  - `lastDeliveredAt` string, date-time, nullable, required
  - `lastStatusCode` integer, nullable, required
  - `consecutiveFailures` integer, required
  - `createdAt` string, date-time, required
  - `secret` string, required: Signing secret, shown once. Verify X-Maritime-Signature with it.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/maritime/apis/maritime-api.md) - [All operations](https://skmtc.dev/maritime/apis/maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maritime/apis/maritime-api/revisions/acd712090ad6?raw)
