Create a studio automation
const url = 'https://api.caller9.app/v1/studios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/automations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"action":"busy_all","action_value":true,"label":"example","days_mask":1,"trigger_minute":1,"timezone":"example","enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.caller9.app/v1/studios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/automations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "action": "busy_all", "action_value": true, "label": "example", "days_mask": 1, "trigger_minute": 1, "timezone": "example", "enabled": true }'Creates a recurring automation. Requires a full-access key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Studio ID (UUID).
Request Bodyrequired
Section titled “Request Bodyrequired”object
Studio toggle to set — Busy/DND or AI Screen All.
Value to set the toggle to when the automation fires.
Bitmask of weekdays the automation fires on (bit 0 = Sunday … bit 6 = Saturday).
Local time of day, in minutes after midnight.
IANA timezone name, e.g. America/New_York.
Defaults to true on create.
Responses
Section titled “Responses”The created automation.
object
A recurring studio automation. action_value and enabled are integers (0 / 1). Create and
update responses also include the additional columns marked optional below (always null for
studio automations, except last_fired_at).
object
Weekday bitmask (bit 0 = Sunday … bit 6 = Saturday).
Local minutes after midnight.
IANA timezone name.
When the automation last fired (create/update responses only).
Example
{ "automation": { "action": "busy_all", "action_value": 0, "enabled": 0 }}The request was invalid.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Missing, invalid, expired or revoked API key.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}The key isn’t allowed to do this (e.g. a read-only key making a change).
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Not found, or belongs to another organization.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Too many requests for this API key. Retry after Retry-After seconds.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Headers
Section titled “Headers”Seconds until the rate-limit window resets.