Callback Instances
Attach or detach callback instances for a deployment/config/auth-config combination.
Callback Instances object
Attributes
object
StringString representing the object's type
id
StringUnique callback instance identifier
status
EnumWhether the callback instance is currently attached to a deployment/config pair
deployment
Objectconfig
Objectauth_config
ObjectNullabletriggers
ObjectResolved trigger registrations for this callback instance
created_at
DateTimestamp when the callback instance was created
updated_at
DateTimestamp 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
StringThe unique identifier for the callback
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalid
UnionOptionalFilter by callback instance ID(s)
status
UnionOptionalFilter by callback instance status
provider_config_id
UnionOptionalFilter by provider config ID(s)
provider_auth_config_id
UnionOptionalFilter by provider auth config ID(s)
created_at
ObjectOptionalFilter callback instance creation time by date range
updated_at
ObjectOptionalFilter callback instance last update time by date range
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
StringThe unique identifier for the callback
Request Body
provider_config_id
StringProvider config to attach to the callback instance
provider_auth_config_id
StringOptionalOptional provider auth config to attach to the callback instance
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
StringThe unique identifier for the callback
callback_instance_id
StringThe unique identifier for the callback_instance
curl -X DELETE "https://api.metorial.com/callbacks/cal_Rm4Mnheq2bfEPhBhP7SY/instances/cal_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."