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_idstringrequiredproviderobjectrequiredtrigger_group_selectionsRecord<string, any>requirednullabletrigger_groupsobject[]requiredcreated_atdaterequiredupdated_atdaterequiredEndpoints
List callbacks
/callbacksReturns a paginated list of callbacks.
Query parameters
idstring or string[]optionalOnly return callbacks with one of these IDs.
integration_idstring or string[]optionalOnly return callbacks for one of these integrations.
integration_provider_idstring or string[]optionalOnly return callbacks for one of these integration providers.
provider_idstring or string[]optionalOnly return callbacks for one of these providers.
searchstringoptionalSearch callbacks by name, description, integration, or provider.
status"active" | "archived" | "deleted" or "active" | "archived" | "deleted"[]optionalOnly return callbacks with one of these statuses. `deleted` callbacks are never listed.
created_atobjectoptionalOnly return results whose callback creation time is in this range. Set `gt`, `lt`, or both.
updated_atobjectoptionalOnly return results whose callback last update time is in this range. Set `gt`, `lt`, or both.
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.
trigger_group_selectionsRecord<string, any>optionalResource selections keyed by trigger group key. Each value must match that group’s selection schema. Limited to 64 groups and 64 KiB of JSON.
Example request
Get callback
/callbacks/:callback_idRetrieves a callback.
Path parameters
callback_idstringrequiredThe unique identifier for the callback
Example request
Update callback
/callbacks/:callback_idUpdates a callback. Omitted fields keep their current value. Changing the selections re-registers the affected triggers. Only an active callback can be updated.
Path parameters
callback_idstringrequiredThe unique identifier for the callback
Request body
namestringoptionalUpdated display name
descriptionstringoptionalnullableUpdated free-text description. `null` clears it.
metadataRecord<string, any>optionalnullableCustom data to identify or organize the callback. Replaces existing metadata. `null` clears it.
trigger_group_selectionsRecord<string, any>optionalnullableResource selections keyed by trigger group key. Each value must match that group’s selection schema. Limited to 64 groups and 64 KiB of JSON.
Example request
Archive callback
/callbacks/:callback_idArchives a callback by disabling callbacks on its integration provider. Callback instances are torn down in the background. Only an active callback can be archived.
Path parameters
callback_idstringrequiredThe unique identifier for the callback