Automations

Create DM automation

Create a Direct Message automation. The mode field selects between 4 variants: vanilla (text-only), with_image, with_product_card, spark_code (collect TikTok spark codes via form). Each mode has specific addon and config requirements — see model schema.

post/automations/dm

Headers

Idempotency-Keystring nullable
X-Dry-Runstring nullable
X-Created-Viastring nullable

Request body

automation_namestring required
mode'vanilla' | 'with_image' | 'with_product_card' | 'spark_code'
ai_enabledboolean
end_datestring date nullable
is_evergreenboolean

When true, the automation continuously re-evaluates its creators_to_include.filters for new qualifying creators on each run. No effect when creators_to_include.crm_group_id is set (CRM groups are inherently evergreen). Maps to top-level Automations.is_evergreen column.

business_hours_timezonestring nullable

When set, the runtime restricts outbound message delivery (initial outreach + follow-ups) to 9am–9pm in this IANA timezone (e.g. America/Los_Angeles). Null disables the restriction. The 9–9 window is fixed; only the timezone is configurable. Distinct from schedule.timezone.

Response

Successful Response

dry_runboolean
side_effectsobject nullable

Backend side-effects, e.g. {'crm_group_created': 'uuid-...'} for sample_request creates.

Changes

No recorded changes to this endpoint across all 2 revisions of this API.