Skip to main content
Instead of stitching together API calls, you can describe a campaign declaratively in a YAML file and create it with ontora campaigns create -c campaign.yaml.

Example

Then:
With a future timeframe_start, --start activates the campaign but holds the invitations until the start date (08:00 in the campaign’s timezone). Without one, invitations go out immediately on launch. The CLI prints the campaign id (--json emits the full created campaign for scripting); if you skipped --start, launch with ontora campaigns start <id> when you’re ready. For larger contact lists, leave contacts out of the YAML and import them after creation:

Contact lists above 5 MB

The contacts of the YAML, listed there or read from a CSV through a file: entry, go to the API in one request, and the API takes a request of up to 5 MB: roughly 30,000 contacts with a name, email, job title and department each, fewer when the rows are longer. ontora campaigns create is not all-or-nothing. It creates the campaign and its topics first and adds the contacts afterwards. With a contact list above the limit, that last step fails with API error (413): Request body is too large:
  • the campaign exists in draft, with its topics and without contacts;
  • the command stops before --start, so nothing is launched;
  • running the command again creates a second campaign.
To avoid it, do one of these:
  • Keep the contacts of the YAML under the limit.
  • Leave contacts out of the YAML, create the campaign, then import the contacts in several files, each under the limit, and launch:
If it has already happened, do not run create again: import the contacts into the campaign that was created (its id is in the line Created campaign <id>, or in ontora campaigns list) and start it.

Field reference

Top-level

Topic

Question

Contact

Email is required for invitations on in_app_chat; Slack campaigns need slack_user_id or email per contact. For bulk lists, prefer ontora contacts import <id> contacts.csv after creating the campaign — see Commands. CSV columns: name,email,phone,job_title,department,seniority_level. Only name is required.