Skip to main content

Set an automation trigger

Request

Replace the automation's current trigger definition. Only the owner can change the event type or configuration. Owners and org admins can send the current event type and configuration with a new enabled value to enable or disable the trigger.

Security
ApiKey(Required scopes: automations.update)
Path
automationIdstring, non-emptyrequired

Automation ID

Bodyapplication/jsonrequired
eventTypestringrequired

The event that starts a run. Use clock.updated for a trigger that runs on a schedule.

Enum:"recording.created""recording.imported""session.created""event.created""event.updated""clock.updated"
enabledboolean
Default:true
configurationobject

Settings for the trigger's event type. schedule says when a clock.updated trigger runs. It is required for clock.updated and not allowed for other event types.

Payload
{ "eventType": "recording.created", "enabled": true, "configuration": { "schedule": { … }, "eventTypeId": "string" } }

Responses

The current trigger

Bodyapplication/json
idstringrequired
automationIdstringrequired
eventTypestringrequired
Enum:"recording.created""recording.imported""session.created""device.created""device.updated""event.created""event.updated""clock.updated"
enabledbooleanrequired
configurationVersioninteger, >= 1required
configurationobjectrequired
createdAtstring, (date-time)required
updatedAtstring, (date-time)required
deletedAtstring or null, (date-time)required

When the trigger was replaced or removed. The trigger endpoints return only the current trigger, where it is null; a run's trigger can be one deleted since.

Response
{ "id": "string", "automationId": "string", "eventType": "recording.created", "enabled": true, "configurationVersion": 1, "configuration": { "schedule": { … }, "eventTypeId": "string" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z" }