API: Automations & segments
The cleanest way to send multi-step WhatsApp sequences from external events: keep the flow logic in Nybero’s automation editor, and use the API only to say “this contact, this flow, now”. See the API overview for authentication and errors.
List automations — GET /v1/automations
curl -s https://app.nybero.com/api/v1/automations \ -H "Authorization: Bearer $NYBERO_KEY"[ { "id": "91c2…", "name": "Webinar funnel", "active": true }, { "id": "5aa0…", "name": "Welcome sequence", "active": false }]Grab the id of the flow you want to enrol into. Only active automations accept enrolments.
Enrol a contact — POST /v1/automations/{id}/enroll
Identify the contact by contact_id or phone:
curl -s https://app.nybero.com/api/v1/automations/91c2…/enroll \ -H "Authorization: Bearer $NYBERO_KEY" \ -H "Content-Type: application/json" \ -d '{"phone": "+4915112345678"}'{ "run_id": "c44d…", "automation_id": "91c2…", "contact_id": "0d9f…" }This is the Manual / API enrolment path — it works regardless of the automation’s own trigger, so you can enrol into a keyword- or tag-triggered flow too. Enrolment is idempotent per automation version: enrolling the same contact twice returns 409 Conflict instead of running the flow twice.
The run then behaves like any other: steps execute in order, the 24-hour window rules apply to message steps, and the run is visible on the automation’s page in the app.
Segments
Segments are dynamic contact lists defined in the app (Segments); the API reads them:
# All segmentscurl -s https://app.nybero.com/api/v1/segments \ -H "Authorization: Bearer $NYBERO_KEY"
# Who matches right now? (paginated: limit/offset)curl -s "https://app.nybero.com/api/v1/segments/{id}/contacts?limit=100&offset=0" \ -H "Authorization: Bearer $NYBERO_KEY"Membership is evaluated live at request time, so the answer always reflects the current data — useful for syncing an audience into another tool or counting a funnel stage from your own dashboard.
Worked example: webinar platform → Nybero funnel
Your webinar tool fires a “registration” event; Nybero runs the whole reminder funnel:
- On registration, your backend upserts the contact (
POST /v1/contacts) withopt_in: trueandattributes: {"webinar_date": "2026-08-01T18:00:00Z"}. - The same handler calls
POST /v1/automations/{id}/enrollfor the Webinar funnel automation. - The flow (built once in the editor, see the webinar recipe) sends the confirmation immediately and the template reminders 24 h and 1 h before start.
- After the webinar, your platform tags attendees
attendedvia the API — a Tag is added automation sends the replay to everyone else.