Callbacks
Manage webhook-style callbacks backed by subspace trigger receivers.
Callbacks object
Attributes
object
StringString representing the object's type
id
StringUnique callback identifier
status
EnumCallback lifecycle status
name
StringDisplay name for the callback
description
StringNullableOptional callback description
metadata
ObjectNullableCustom key-value pairs for storing additional callback metadata
poll_interval_seconds_override
NumberNullableOptional polling interval override, in seconds, for polling-capable triggers
provider_deployment
Objectdestinations
ObjectDestinations currently attached to this callback
provider_triggers
ObjectTriggers configured on this callback
created_at
DateTimestamp when the callback was created
updated_at
DateTimestamp 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
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalid
UnionOptionalFilter by callback ID(s)
provider_deployment_id
UnionOptionalFilter by provider deployment ID(s)
status
UnionOptionalFilter by callback lifecycle status
created_at
ObjectOptionalFilter callback creation time by date range
updated_at
ObjectOptionalFilter callback last update time by date range
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
StringThe unique identifier for the callback
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
StringProvider deployment that owns the trigger specification for this callback
name
StringDisplay name for the callback
description
StringOptionalOptional callback description
metadata
ObjectOptionalCustom key-value pairs for storing additional callback metadata
poll_interval_seconds_override
NumberOptionalNullableOptional polling interval override, in seconds, for polling triggers
destination_ids
Array of StringsOptionalOptional callback destination IDs that should receive deliveries. Destinations can also be attached later.
triggers
ObjectOptionalcurl -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
StringThe unique identifier for the callback
Request Body
name
StringOptionalUpdated callback display name
description
StringOptionalUpdated callback description
metadata
ObjectOptionalUpdated custom metadata for the callback
poll_interval_seconds_override
NumberOptionalNullableUpdated polling interval override, in seconds
destination_ids
Array of StringsOptionalReplacement list of callback destination IDs
triggers
ObjectOptionalcurl -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
StringThe unique identifier for the callback
curl -X DELETE "https://api.metorial.com/callbacks/cal_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."