Callback Instances

Attach or detach callback instances for a deployment/config/auth-config combination.

Callback Instances object

Attributes

object

String

String representing the object's type

id

String

Unique callback instance identifier

status

Enum

Whether the callback instance is currently attached to a deployment/config pair

deployment

Object

config

Object

auth_config

ObjectNullable

triggers

Object

Resolved trigger registrations for this callback instance

created_at

Date

Timestamp when the callback instance was created

updated_at

Date

Timestamp when the callback instance was last updated

{
"object": "callback.instance",
"id": "cbi_5gHjKlMnPqRsTuVw",
"status": "attached",
"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"
},
"config": {
"object": "provider.config#preview",
"id": "pcf_7dEfGhJkLmNpQrSt",
"name": "Production Config",
"description": "Configuration for production environment",
"metadata": {},
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
},
"auth_config": {
"object": "provider.auth_config#preview",
"id": "pcf_7dEfGhJkLmNpQrSt",
"name": "Production Config",
"description": "Configuration for production environment",
"metadata": {},
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
},
"triggers": [
{
"object": "callback.instance.trigger",
"id": "ctr_9gHjKlMnPqRsTuVw",
"source": "polling",
"poll_interval_seconds": 60,
"next_poll_at": "2026-01-10T14:45:00.000Z",
"last_polled_at": "2026-01-10T14:44:00.000Z",
"webhook_url": "https://provider.example.com/webhooks/abc123",
"provider_trigger": {
"object": "provider.capabilities.trigger",
"id": "ptr_4nOpQrStUvWxYzAb",
"key": "messages.created",
"name": "Messages Created",
"description": "Fires whenever a new message is created in the provider",
"input_schema": {
"type": "json_schema",
"schema": {}
},
"output_schema": {
"type": "json_schema",
"schema": {}
},
"invocation": {
"type": "polling",
"interval_seconds": 60
},
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"provider_specification_id": "psp_9gHjKlMnPqRsTuVw",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}
},
{
"object": "callback.instance.trigger",
"id": "ctr_9gHjKlMnPqRsTuVw",
"source": "polling",
"poll_interval_seconds": 60,
"next_poll_at": "2026-01-10T14:45:00.000Z",
"last_polled_at": "2026-01-10T14:44:00.000Z",
"webhook_url": "https://provider.example.com/webhooks/abc123",
"provider_trigger": {
"object": "provider.capabilities.trigger",
"id": "ptr_4nOpQrStUvWxYzAb",
"key": "messages.created",
"name": "Messages Created",
"description": "Fires whenever a new message is created in the provider",
"input_schema": {
"type": "json_schema",
"schema": {}
},
"output_schema": {
"type": "json_schema",
"schema": {}
},
"invocation": {
"type": "polling",
"interval_seconds": 60
},
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"provider_specification_id": "psp_9gHjKlMnPqRsTuVw",
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}
}
],
"created_at": "2025-09-15T10:30:00.000Z",
"updated_at": "2026-01-10T14:45:00.000Z"
}

List callback instances

Returns a paginated list of callback instances.

URL Parameters

callback_id

String

The unique identifier for the callback

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

id

UnionOptional

Filter by callback instance ID(s)

status

UnionOptional

Filter by callback instance status

provider_config_id

UnionOptional

Filter by provider config ID(s)

provider_auth_config_id

UnionOptional

Filter by provider auth config ID(s)

created_at

ObjectOptional

Filter callback instance creation time by date range

updated_at

ObjectOptional

Filter callback instance last update time by date range

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

Create callback instance

Attaches a callback to a config and optional auth config.

URL Parameters

callback_id

String

The unique identifier for the callback

Request Body

provider_config_id

String

Provider config to attach to the callback instance

provider_auth_config_id

StringOptional

Optional provider auth config to attach to the callback instance

POSThttp://api.metorial.com/callbacks/:callback_id/instances
curl -X POST "https://api.metorial.com/callbacks/cal_Rm4Mnheq2bfEPhBhP7SY/instances" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"provider_config_id": "example_provider_config_id",
"provider_auth_config_id": "example_provider_auth_config_id"
}'

Delete callback instance

Detaches a callback instance.

URL Parameters

callback_id

String

The unique identifier for the callback

callback_instance_id

String

The unique identifier for the callback_instance

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