Callbacks

Manage webhook-style callbacks backed by subspace trigger receivers.

Callbacks object

Attributes

object

String

String representing the object's type

id

String

Unique callback identifier

status

Enum

Callback lifecycle status

name

String

Display name for the callback

description

StringNullable

Optional callback description

metadata

ObjectNullable

Custom key-value pairs for storing additional callback metadata

poll_interval_seconds_override

NumberNullable

Optional polling interval override, in seconds, for polling-capable triggers

provider_deployment

Object

destinations

Object

Destinations currently attached to this callback

provider_triggers

Object

Triggers configured on this callback

created_at

Date

Timestamp when the callback was created

updated_at

Date

Timestamp when the callback was last updated

{
"object": "callback",
"id": "clb_4dEfGhJkLmNpQrSt",
"status": "active",
"name": "Production Webhook Callback",
"description": "Sends provider trigger deliveries to our production webhook endpoint",
"metadata": {},
"poll_interval_seconds_override": 60,
"provider_deployment": {
"object": "provider.deployment#preview",
"id": "pde_1aBcDeFgHjKlMnPq",
"name": "Production",
"description": "Production deployment",
"metadata": {},
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
},
"destinations": [
{
"object": "callback.destination",
"id": "cld_7dEfGhJkLmNpQrSt",
"status": "active",
"name": "Primary Webhook Endpoint",
"description": "Primary production webhook receiver",
"metadata": {},
"url": "https://api.example.com/webhooks/metorial",
"method": "POST",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
},
{
"object": "callback.destination",
"id": "cld_7dEfGhJkLmNpQrSt",
"status": "active",
"name": "Primary Webhook Endpoint",
"description": "Primary production webhook receiver",
"metadata": {},
"url": "https://api.example.com/webhooks/metorial",
"method": "POST",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}
],
"provider_triggers": [
{
"object": "callback.provider_trigger",
"id": "cbt_4dEfGhJkLmNpQrSt",
"provider_trigger": {
"object": "provider.trigger#preview",
"id": "ptr_7dEfGhJkLmNpQrSt",
"key": "messages.created",
"name": "Messages Created"
},
"event_types": [
"message.created",
"message.created"
],
"created_at": "2025-09-15T10:30:00.000Z"
},
{
"object": "callback.provider_trigger",
"id": "cbt_4dEfGhJkLmNpQrSt",
"provider_trigger": {
"object": "provider.trigger#preview",
"id": "ptr_7dEfGhJkLmNpQrSt",
"key": "messages.created",
"name": "Messages Created"
},
"event_types": [
"message.created",
"message.created"
],
"created_at": "2025-09-15T10:30:00.000Z"
}
],
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}

List callbacks

Returns a paginated list of callbacks.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

id

UnionOptional

Filter by callback ID(s)

provider_deployment_id

UnionOptional

Filter by provider deployment ID(s)

status

UnionOptional

Filter by callback lifecycle status

created_at

ObjectOptional

Filter callback creation time by date range

updated_at

ObjectOptional

Filter callback last update time by date range

GEThttp://api.metorial.com/callbacks
curl -X GET "https://api.metorial.com/callbacks" \
-H "Authorization: Bearer metorial_sk_..."

Get callback

Retrieves a specific callback by ID.

URL Parameters

callback_id

String

The unique identifier for the callback

GEThttp://api.metorial.com/callbacks/:callback_id
curl -X GET "https://api.metorial.com/callbacks/cal_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Create callback

Creates a new callback definition.

Request Body

provider_deployment_id

String

Provider deployment that owns the trigger specification for this callback

name

String

Display name for the callback

description

StringOptional

Optional callback description

metadata

ObjectOptional

Custom key-value pairs for storing additional callback metadata

poll_interval_seconds_override

NumberOptionalNullable

Optional polling interval override, in seconds, for polling triggers

destination_ids

Array of StringsOptional

Optional callback destination IDs that should receive deliveries. Destinations can also be attached later.

triggers

ObjectOptional
POSThttp://api.metorial.com/callbacks
curl -X POST "https://api.metorial.com/callbacks" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"provider_deployment_id": "example_provider_deployment_id",
"name": "example_name",
"description": "example_description",
"metadata": {},
"poll_interval_seconds_override": 0,
"destination_ids": [
"example_item"
],
"triggers": {
"trigger_id": "example_trigger_id",
"event_types": [
"example_item"
]
}
}'

Update callback

Updates a callback definition.

URL Parameters

callback_id

String

The unique identifier for the callback

Request Body

name

StringOptional

Updated callback display name

description

StringOptional

Updated callback description

metadata

ObjectOptional

Updated custom metadata for the callback

poll_interval_seconds_override

NumberOptionalNullable

Updated polling interval override, in seconds

destination_ids

Array of StringsOptional

Replacement list of callback destination IDs

triggers

ObjectOptional
PATCHhttp://api.metorial.com/callbacks/:callback_id
curl -X PATCH "https://api.metorial.com/callbacks/cal_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"metadata": {},
"poll_interval_seconds_override": 0,
"destination_ids": [
"example_item"
],
"triggers": {
"trigger_id": "example_trigger_id",
"event_types": [
"example_item"
]
}
}'

Delete callback

Archives a callback definition.

URL Parameters

callback_id

String

The unique identifier for the callback

DELETEhttp://api.metorial.com/callbacks/:callback_id
curl -X DELETE "https://api.metorial.com/callbacks/cal_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."