Sequences
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
Sequences of the account, newest first.
application/json- response
items*array<>curl -X GET 'https://app.groupilot.com/api/v1/sequences'{ "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "message_count": 0, "created_at": "2019-08-24T14:15:22Z" } ]}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
application/json- body
name*string1 <= length <= 120external_id?string1 <= length <= 200Created, empty.
application/json- response
id*stringuuidexternal_id?string|nullname*stringmessage_count*integercreated_at*stringISO 8601 date-time with offset.
date-timecurl -X POST 'https://app.groupilot.com/api/v1/sequences' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "message_count": 0, "created_at": "2019-08-24T14:15:22Z"}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidThe sequence, its messages in order and the events using it.
application/json- response
id*stringuuidexternal_id?string|nullname*stringmessages*array<>linked_events*array<>created_at*stringISO 8601 date-time with offset.
date-timecurl -X GET 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "messages": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "order": 0, "timing": "string", "type": "text", "text": "string", "media_url": "string", "poll": { "question": "string", "options": [ "string", "string" ], "select_count": 0 }, "ghost_mention": true, "link_preview": true, "community_update": { "name_template": "string", "description_template": "string", "restore_name": true, "restore_description": true }, "created_at": "2019-08-24T14:15:22Z" } ], "linked_events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "string" } ], "created_at": "2019-08-24T14:15:22Z"}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidapplication/json- body
name?string1 <= length <= 120external_id?|1 <= length <= 200Updated.
application/json- response
id*stringuuidexternal_id?string|nullname*stringmessage_count*integercreated_at*stringISO 8601 date-time with offset.
date-timecurl -X PATCH 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "message_count": 0, "created_at": "2019-08-24T14:15:22Z"}Refused (409) while an active or paused event uses it, unless force=true: the events are then unlinked and their pending sends canceled.
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidforce?|"false"Deleted.
curl -X DELETE 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08'By default the pending sends of the linked events are resynchronised (resync: false to batch several changes, then POST /sequences/{id}/resync).
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidapplication/json- body
external_id?string1 <= length <= 200timing?|When the message is sent, relative to the live. J-1 10:00: the day before at 10:00 (event timezone). J0 18:30: the day of the live. J+1 09:00: the day after. H-1: exactly one hour before the live; H+2: two hours after.
^(J[+-]?\d{1,2} \d{2}:\d{2}|H[+-]\d{1,3})$type*MessageTypetext, image, video, voice, document, poll: a message posted in the community. community_update: a step that changes the community's name and/or description at its time (nothing is posted; WhatsApp shows a system line).
"text""image""video""voice""document""poll""community_update"text?stringlength <= 10000media_url?|urilength <= 2000poll?|nullghost_mention?booleanlink_preview?booleanText messages only, default true. false sends the text without the preview card of its link (the link stays clickable). Ignored (stored true) on other types.
community_update?|Payload of a community_update step; required when type is community_update, refused on any other type (such a step has no text, media_url, poll or ghost_mention). Give at least one change: a name (name_template or restore_name) and/or a description (description_template or restore_description).
resync?booleantrueAdded.
application/json- response
sequence*resync*curl -X POST 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages' \ -H 'Content-Type: application/json' \ -d '{ "type": "text"}'{ "sequence": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "messages": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "order": 0, "timing": "string", "type": "text", "text": "string", "media_url": "string", "poll": { "question": "string", "options": [ "string", "string" ], "select_count": 0 }, "ghost_mention": true, "link_preview": true, "community_update": { "name_template": "string", "description_template": "string", "restore_name": true, "restore_description": true }, "created_at": "2019-08-24T14:15:22Z" } ], "linked_events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "string" } ], "created_at": "2019-08-24T14:15:22Z" }, "resync": { "events_resynced": 0, "canceled_jobs": 0, "created_jobs": 0, "overrides_kept": 0, "locked_skipped": 0 }}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidmessage_id*stringuuidapplication/json- body
external_id?string1 <= length <= 200timing?|When the message is sent, relative to the live. J-1 10:00: the day before at 10:00 (event timezone). J0 18:30: the day of the live. J+1 09:00: the day after. H-1: exactly one hour before the live; H+2: two hours after.
^(J[+-]?\d{1,2} \d{2}:\d{2}|H[+-]\d{1,3})$type?MessageTypetext, image, video, voice, document, poll: a message posted in the community. community_update: a step that changes the community's name and/or description at its time (nothing is posted; WhatsApp shows a system line).
"text""image""video""voice""document""poll""community_update"text?stringlength <= 10000media_url?|urilength <= 2000poll?|nullghost_mention?booleanlink_preview?booleanText messages only, default true. false sends the text without the preview card of its link (the link stays clickable). Ignored (stored true) on other types.
community_update?|Payload of a community_update step; required when type is community_update, refused on any other type (such a step has no text, media_url, poll or ghost_mention). Give at least one change: a name (name_template or restore_name) and/or a description (description_template or restore_description).
resync?booleantrueChanged.
application/json- response
sequence*resync*curl -X PATCH 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "sequence": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "messages": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "order": 0, "timing": "string", "type": "text", "text": "string", "media_url": "string", "poll": { "question": "string", "options": [ "string", "string" ], "select_count": 0 }, "ghost_mention": true, "link_preview": true, "community_update": { "name_template": "string", "description_template": "string", "restore_name": true, "restore_description": true }, "created_at": "2019-08-24T14:15:22Z" } ], "linked_events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "string" } ], "created_at": "2019-08-24T14:15:22Z" }, "resync": { "events_resynced": 0, "canceled_jobs": 0, "created_jobs": 0, "overrides_kept": 0, "locked_skipped": 0 }}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidmessage_id*stringuuidresync?|"true"Removed.
application/json- response
sequence*resync*curl -X DELETE 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "sequence": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "messages": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "order": 0, "timing": "string", "type": "text", "text": "string", "media_url": "string", "poll": { "question": "string", "options": [ "string", "string" ], "select_count": 0 }, "ghost_mention": true, "link_preview": true, "community_update": { "name_template": "string", "description_template": "string", "restore_name": true, "restore_description": true }, "created_at": "2019-08-24T14:15:22Z" } ], "linked_events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "string" } ], "created_at": "2019-08-24T14:15:22Z" }, "resync": { "events_resynced": 0, "canceled_jobs": 0, "created_jobs": 0, "overrides_kept": 0, "locked_skipped": 0 }}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidapplication/json- body
ids*array<>Every message id of the sequence, in the new order (at most 200).
1 <= items <= 200resync?booleantrueReordered.
application/json- response
sequence*resync*curl -X PUT 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages/order' \ -H 'Content-Type: application/json' \ -d '{ "ids": [ "6e0346a3-e54d-40e3-9779-4ba1e707e35b" ]}'{ "sequence": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "messages": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "order": 0, "timing": "string", "type": "text", "text": "string", "media_url": "string", "poll": { "question": "string", "options": [ "string", "string" ], "select_count": 0 }, "ghost_mention": true, "link_preview": true, "community_update": { "name_template": "string", "description_template": "string", "restore_name": true, "restore_description": true }, "created_at": "2019-08-24T14:15:22Z" } ], "linked_events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "string" } ], "created_at": "2019-08-24T14:15:22Z" }, "resync": { "events_resynced": 0, "canceled_jobs": 0, "created_jobs": 0, "overrides_kept": 0, "locked_skipped": 0 }}bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidWhat a resync would change, per linked event.
application/json- response
linked_events*array<>curl -X GET 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08/resync'{ "linked_events": [ { "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7", "name": "string", "eligible": true, "reason": "string", "future_occurrences": 0, "jobs_to_resync": 0, "overrides_kept": 0, "locked_skipped": 0 } ]}Refused with 409 conflict, before anything changes, when it would schedule more than 20,000 sends in one call: pass fewer event_ids.
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidapplication/json- body
event_ids?array<>Defaults to every event linked to the sequence.
1 <= items <= 50Done.
application/json- response
events_resynced*integercanceled_jobs*integercreated_jobs*integeroverrides_kept*integerPending sends edited by hand in the app, left as they are.
locked_skipped*integerSends already sent, in progress or frozen, left as they are.
curl -X POST 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08/resync' \ -H 'Content-Type: application/json' \ -d '{}'{ "events_resynced": 0, "canceled_jobs": 0, "created_jobs": 0, "overrides_kept": 0, "locked_skipped": 0}Idempotent: send the whole sequence each time your platform saves it. Messages are matched by external_id; missing ones are removed. With apply_to_pending_jobs (default) the pending sends of the linked events are resynchronised; sends already sent, in progress or edited by hand are left untouched. At most 2 calls per minute per sequence. Size: The texts, poll questions and options, and community update templates of one call add up to at most 3 MiB (3,145,728 bytes, counted in UTF-8); a larger payload is refused with 400 validation_error (field messages) before anything is written: split the content across several sequences or shorten the texts. Send the JSON as UTF-8: a request body above 4 MiB is refused with HTTP 413 (escaping every non-ASCII character as \uXXXX can double the size of texts written in non-Latin scripts). Work: when the resync would schedule more than 20,000 sends (upcoming occurrences of the linked events × messages), the call is refused with 409 conflict before anything is written; link fewer events, or pass apply_to_pending_jobs: false and resync event by event (POST /sequences/{id}/resync with event_ids).
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
application/json- body
external_id*string1 <= length <= 200name*string1 <= length <= 120messages*array<>The full list of steps, at most 200. The texts, poll questions and options, and community update templates of one call add up to at most 3 MiB (3,145,728 bytes, counted in UTF-8); a larger payload is refused with 400 validation_error (field messages) before anything is written: split the content across several sequences or shorten the texts. Send the JSON as UTF-8: a request body above 4 MiB is refused with HTTP 413 (escaping every non-ASCII character as \uXXXX can double the size of texts written in non-Latin scripts).
items <= 200apply_to_pending_jobs?booleantrueSynchronised.
application/json- response
sequence*created*booleanmessages*resync*curl -X PUT 'https://app.groupilot.com/api/v1/sequences/sync' \ -H 'Content-Type: application/json' \ -d '{ "external_id": "string", "name": "string", "messages": [ { "type": "text" } ]}'{ "sequence": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "name": "string", "messages": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_id": "string", "order": 0, "timing": "string", "type": "text", "text": "string", "media_url": "string", "poll": { "question": "string", "options": [ "string", "string" ], "select_count": 0 }, "ghost_mention": true, "link_preview": true, "community_update": { "name_template": "string", "description_template": "string", "restore_name": true, "restore_description": true }, "created_at": "2019-08-24T14:15:22Z" } ], "linked_events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "string" } ], "created_at": "2019-08-24T14:15:22Z" }, "created": true, "messages": { "created": 0, "updated": 0, "deleted": 0, "unchanged": 0 }, "resync": { "events_resynced": 0, "canceled_jobs": 0, "created_jobs": 0, "overrides_kept": 0, "locked_skipped": 0 }}