Automations

Enable an automation

Turns the automation on and returns it with changed. Needs the emails.full permission. The change is recorded under the API key or the user of the access token. updated_at moves, and external triggers (Shopify webhooks, segment tracking) are subscribed.

The automation needs a valid trigger, a site that is not suspended and a plan with automations; one that sends e-mails also needs sending enabled for the site and e-mail balance left. An automation already on is returned with changed: false, and nothing is checked or written. To turn it off: disable_automation.

post/v1/sites/{site_id}/automations/{automation_id}/enable

Request

  • Base URL
    https://api.getsitecontrol.com
  • Auth
    HTTP bearer

Path parameters

site_idinteger required
automation_idinteger required

Automation id from list_automations

Headers

Idempotency-Keystring

Makes a retry of a POST safe: a repeat with the same key, body and GSC-Version returns the stored response with Idempotency-Replayed: true instead of running again. The key protects against repeated execution while the key store works. Saving the change and storing the response under the key are not atomic: if the process or the key store fails between them, the change is kept, the key is released after 15 minutes and a retry runs the request again. After a timeout or a 5xx, read the resource to check the result before retrying. 5xx and 429 responses and responses over 256 KB are not stored, so a repeat runs the request again. A key is kept for 24 hours. The same key with another body or version is 422; a repeat while the first request runs is 409.

Response

Successful Response

changedboolean required

false when the automation already was in the requested state; nothing was written then

Changes

No recorded changes to this operation across all 1 revision of this API.