Destinations
The destination registry journeys reference by name, so workflow code never hardcodes a URL or a sender. A webhook destination carries a per-destination signing secret (shown once at creation) and payloads follow the Standard Webhooks convention (v: 1 version field, webhook-id / webhook-timestamp / webhook-signature headers). A destination with too many consecutive failures auto-disables and records skipped_disabled until re-enabled. All mutations require org:admin.
POST /v1/destinations
Section titled “POST /v1/destinations”Create a destination
Auth: Clerk session token.
Request body
{ "data": { "name": "string", "environment": "development", "type": "webhook", "config": { "url": "https://example.com/hooks/cowliss" } }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
one of | yes | |
data〈webhook〉 |
object | yes | |
data〈webhook〉.name |
string | yes | length 1–100 |
data〈webhook〉.environment |
“development” | “production” | yes | |
data〈webhook〉.type |
“webhook” | yes | |
data〈webhook〉.config |
object | yes | |
data〈webhook〉.config.url |
string (uri) | yes | |
data〈sender_identity〉 |
object | yes | |
data〈sender_identity〉.name |
string | yes | length 1–100 |
data〈sender_identity〉.environment |
“development” | “production” | yes | |
data〈sender_identity〉.type |
“sender_identity” | yes | |
data〈sender_identity〉.config |
object | yes | |
data〈sender_identity〉.config.fromName |
string | yes | length 1–100 |
data〈sender_identity〉.config.fromEmail |
string (email) | yes |
Response 201
{ "data": { "id": "string", "orgId": "string", "environment": "development", "name": "string", "type": "webhook", "config": "string", "webhookPayloadVersion": 42, "disabledAt": "2026-01-15T09:30:00.000Z", "createdAt": "2026-01-15T09:30:00.000Z", "updatedAt": "2026-01-15T09:30:00.000Z", "signingSecret": "string" }, "meta": { "requestId": "string", "nextCursor": "string", "hasMore": true }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
object | yes | |
data.id |
string | yes | |
data.orgId |
string | yes | |
data.environment |
“development” | “production” | yes | |
data.name |
string | yes | |
data.type |
“webhook” | “sender_identity” | yes | |
data.config |
string | number | boolean | null | record<string, any> | any[] | yes | |
data.webhookPayloadVersion |
integer | yes | -2147483648 ≤ x ≤ 2147483647 |
data.disabledAt |
string (date-time) | null | yes | |
data.createdAt |
string (date-time) | yes | |
data.updatedAt |
string (date-time) | yes | |
data.signingSecret |
string | no | |
meta |
object | no | |
meta.requestId |
string | no | |
meta.nextCursor |
string | null | no | |
meta.hasMore |
boolean | no |
Errors follow the shared envelope and code table.
GET /v1/destinations
Section titled “GET /v1/destinations”List destinations in the selected environment
Auth: Clerk session token.
Query parameters
{ "cursor": "string", "limit": 50, "q": "string"}| Field | Type | Required | Constraints |
|---|---|---|---|
cursor |
string | no | |
limit |
integer | no | default 50; 1 ≤ x ≤ 100 |
q |
string | no | length 0–200 |
Response 200
{ "data": [ { "id": "string", "orgId": "string", "environment": "development", "name": "string", "type": "webhook", "config": "string", "webhookPayloadVersion": 42, "disabledAt": "2026-01-15T09:30:00.000Z", "createdAt": "2026-01-15T09:30:00.000Z", "updatedAt": "2026-01-15T09:30:00.000Z" } ], "meta": { "requestId": "string", "nextCursor": "string", "hasMore": true }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
object[] | yes | |
data[] |
object | yes | |
data[].id |
string | yes | |
data[].orgId |
string | yes | |
data[].environment |
“development” | “production” | yes | |
data[].name |
string | yes | |
data[].type |
“webhook” | “sender_identity” | yes | |
data[].config |
string | number | boolean | null | record<string, any> | any[] | yes | |
data[].webhookPayloadVersion |
integer | yes | -2147483648 ≤ x ≤ 2147483647 |
data[].disabledAt |
string (date-time) | null | yes | |
data[].createdAt |
string (date-time) | yes | |
data[].updatedAt |
string (date-time) | yes | |
meta |
object | no | |
meta.requestId |
string | no | |
meta.nextCursor |
string | null | no | |
meta.hasMore |
boolean | no |
Errors follow the shared envelope and code table.
GET /v1/destinations/{id}
Section titled “GET /v1/destinations/{id}”Fetch one destination
Auth: Clerk session token.
Response 200
{ "data": { "id": "string", "orgId": "string", "environment": "development", "name": "string", "type": "webhook", "config": "string", "webhookPayloadVersion": 42, "disabledAt": "2026-01-15T09:30:00.000Z", "createdAt": "2026-01-15T09:30:00.000Z", "updatedAt": "2026-01-15T09:30:00.000Z" }, "meta": { "requestId": "string", "nextCursor": "string", "hasMore": true }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
object | yes | |
data.id |
string | yes | |
data.orgId |
string | yes | |
data.environment |
“development” | “production” | yes | |
data.name |
string | yes | |
data.type |
“webhook” | “sender_identity” | yes | |
data.config |
string | number | boolean | null | record<string, any> | any[] | yes | |
data.webhookPayloadVersion |
integer | yes | -2147483648 ≤ x ≤ 2147483647 |
data.disabledAt |
string (date-time) | null | yes | |
data.createdAt |
string (date-time) | yes | |
data.updatedAt |
string (date-time) | yes | |
meta |
object | no | |
meta.requestId |
string | no | |
meta.nextCursor |
string | null | no | |
meta.hasMore |
boolean | no |
Errors follow the shared envelope and code table.
PATCH /v1/destinations/{id}
Section titled “PATCH /v1/destinations/{id}”Update a destination
Auth: Clerk session token.
Request body
{ "data": { "name": "string", "config": {}, "enabled": true }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
object | yes | |
data.name |
string | no | length 1–100 |
data.config |
any | no | |
data.enabled |
boolean | no |
Response 200
{ "data": { "id": "string", "orgId": "string", "environment": "development", "name": "string", "type": "webhook", "config": "string", "webhookPayloadVersion": 42, "disabledAt": "2026-01-15T09:30:00.000Z", "createdAt": "2026-01-15T09:30:00.000Z", "updatedAt": "2026-01-15T09:30:00.000Z" }, "meta": { "requestId": "string", "nextCursor": "string", "hasMore": true }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
object | yes | |
data.id |
string | yes | |
data.orgId |
string | yes | |
data.environment |
“development” | “production” | yes | |
data.name |
string | yes | |
data.type |
“webhook” | “sender_identity” | yes | |
data.config |
string | number | boolean | null | record<string, any> | any[] | yes | |
data.webhookPayloadVersion |
integer | yes | -2147483648 ≤ x ≤ 2147483647 |
data.disabledAt |
string (date-time) | null | yes | |
data.createdAt |
string (date-time) | yes | |
data.updatedAt |
string (date-time) | yes | |
meta |
object | no | |
meta.requestId |
string | no | |
meta.nextCursor |
string | null | no | |
meta.hasMore |
boolean | no |
Errors follow the shared envelope and code table.
DELETE /v1/destinations/{id}
Section titled “DELETE /v1/destinations/{id}”Delete a destination
Auth: Clerk session token.
Response 200
{ "data": { "deleted": true }, "meta": { "requestId": "string", "nextCursor": "string", "hasMore": true }}| Field | Type | Required | Constraints |
|---|---|---|---|
data |
object | yes | |
data.deleted |
true | yes | |
meta |
object | no | |
meta.requestId |
string | no | |
meta.nextCursor |
string | null | no | |
meta.hasMore |
boolean | no |
Errors follow the shared envelope and code table.