Callbacks
A callback is what receives provider events for an integration provider. Creating one enables callbacks on the integration provider, and Metorial then registers the callback against every matching integration instance. Setting `callbacks.status` on the integration provider itself does the same thing.
The Callback object
object"callback"requiredidstringrequiredstatus"active" | "archived" | "deleted"requirednamestringrequireddescriptionstringrequirednullablemetadataRecord<string, any>requirednullableintegration_idstringrequiredintegration_provider_idstringrequiredproviderobjectrequiredcreated_atdaterequiredupdated_atdaterequiredEndpoints
List callbacks
/callbacksReturns a paginated list of callbacks.
Query parameters
idstring or string[]optionalFilter by callback ID(s)
integration_idstring or string[]optionalFilter by integration ID(s)
integration_provider_idstring or string[]optionalFilter by integration provider ID(s)
provider_idstring or string[]optionalFilter by provider ID(s)
status"active" | "archived" | "deleted" or "active" | "archived" | "deleted"[]optionalFilter by callback lifecycle status
created_atobjectoptionalFilter callback creation time by date range
updated_atobjectoptionalFilter callback last update time by date range
Example request
Create callback
/callbacksEnables callbacks for an integration provider and returns the callback it created. Only providers whose type reports `triggers.status` as `enabled` support this. Callback instances are then registered for every matching integration instance in the background.
Request body
integration_idstringrequiredIntegration the integration provider belongs to
integration_provider_idstringrequiredIntegration provider to enable callbacks for
namestringoptionalDisplay name for the callback. Defaults to the name of the integration provider.
descriptionstringoptionalnullableDescription for the callback. Defaults to the description of the integration provider.
Example request
Get callback
/callbacks/:callback_idRetrieves a specific callback by ID.
Path parameters
callback_idstringrequiredThe unique identifier for the callback
Example request
Update callback
/callbacks/:callback_idUpdates the name, description or metadata of a callback. Everything else about a callback is derived from its integration provider - set `callbacks.status` to `disabled` there to tear it down.
Path parameters
callback_idstringrequiredThe unique identifier for the callback
Request body
namestringoptionalUpdated display name
descriptionstringoptionalnullableUpdated description
metadataRecord<string, any>optionalnullableUpdated custom metadata
Example request
Delete callback
/callbacks/:callback_idDisables callbacks on the underlying integration provider, tearing down this callback and every callback instance registered for it.
Path parameters
callback_idstringrequiredThe unique identifier for the callback