Create a webhook endpoint
On this page
POST
/v1/webhook-endpointscreate_webhook_endpoint| Risk | write |
| Authentication | API key or OAuth access token |
| Scopes | webhooks:write |
| Idempotency | supported: send an Idempotency-Key header to make retries safe |
| Dry run | yes: add dry_run=true to the query |
| Success status | 201 |
| Response type | application/json |
What it does#
- Use when: You want Seemly to call your server when something happens.
- Do not use when: you only poll for changes (call list_events).
- Side effects: Creates an endpoint; Returns its signing secret once.
- Reversible: Yes, call delete_webhook_endpoint.
- Required scope: webhooks:write.
- Idempotency: supported (Idempotency-Key header).
- Typical next step: store the secret, then call send_test_webhook.
Scopes#
webhooks:write: Create, change and delete webhook endpoints.
Side effects#
- Creates an endpoint
- Returns its signing secret once
Request#
Path parameters#
None.
Query parameters#
None.
Every mutation also accepts dry_run=true: it runs every check and returns {"dry_run": true, "would": {...}} without writing anything.
Body (application/json)#
| Field | Type | Required | Description |
|---|---|---|---|
url | string, max 2048 characters | yes | An https address on port 443 with a public DNS name. IP addresses, localhost and private networks are refused. |
description | string, max 200 characters or null | no | |
event_types | array of string, max 60 characters, max 36 items | yes | Event types to receive (see list_event_types), or ["*"] for all. |
Response#
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
url | string | yes | |
description | string or null | yes | |
event_types | array of string | yes | Subscribed event types, or ["*"] for all of them. |
status | one of "active", "paused", "disabled_failing" | yes | disabled_failing means every delivery failed for 5 days or the receiver answered 410 Gone. Update the endpoint to active to resume. |
secret_rotation_ends_at | string or null | yes | While set, deliveries are signed with the new and the previous secret. |
failing_since | string or null | yes | |
created_at | string | yes | RFC 3339 UTC timestamp. |
secret | string | yes | whsec_... The signing secret. Shown only in this response; store it now. |
Examples#
created#
Request:
curl -X POST 'https://api.seemly.com/v1/webhook-endpoints' \
-H "Authorization: Bearer $SEEMLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://hooks.example.com/seemly",
"event_types": [
"subscriber.confirmed"
]
}'const response = await fetch("https://api.seemly.com/v1/webhook-endpoints", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SEEMLY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://hooks.example.com/seemly",
"event_types": [
"subscriber.confirmed"
]
}),
});
const result = await response.json();
console.log(response.status, result);import os
import requests
response = requests.post(
"https://api.seemly.com/v1/webhook-endpoints",
headers={
"Authorization": f"Bearer {os.environ['SEEMLY_API_KEY']}",
},
json={
"url": "https://hooks.example.com/seemly",
"event_types": [
"subscriber.confirmed",
],
},
)
print(response.status_code, response.json())Response: 201:
{
"id": "whe_4d8x2p0q7r3m9k1v5t6w8y0z",
"url": "https://hooks.example.com/seemly",
"description": "Order sync",
"event_types": [
"subscriber.confirmed"
],
"status": "active",
"secret_rotation_ends_at": null,
"failing_since": null,
"created_at": "2026-12-02T09:30:00Z",
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}Errors#
Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.