Groupilot Docs

Sequences

List sequences

GET
/sequences

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Response Body

Sequences of the account, newest first.

application/json
  1. 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"    }  ]}

Create a sequence

POST
/sequences

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Request Body

application/json
  1. body
name*string
Length1 <= length <= 120
external_id?string
Length1 <= length <= 200

Response Body

Created, empty.

application/json
  1. response
id*string
Formatuuid
external_id?string|null
name*string
message_count*integer
created_at*string

ISO 8601 date-time with offset.

Formatdate-time
curl -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"}
GET
/sequences/{id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Response Body

The sequence, its messages in order and the events using it.

application/json
  1. response
id*string
Formatuuid
external_id?string|null
name*string
messages*array<>
linked_events*array<>
created_at*string

ISO 8601 date-time with offset.

Formatdate-time
curl -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"}

Rename a sequence

PATCH
/sequences/{id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
name?string
Length1 <= length <= 120
external_id?|
Length1 <= length <= 200

Response Body

Updated.

application/json
  1. response
id*string
Formatuuid
external_id?string|null
name*string
message_count*integer
created_at*string

ISO 8601 date-time with offset.

Formatdate-time
curl -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"}

Delete a sequence

DELETE
/sequences/{id}

Refused (409) while an active or paused event uses it, unless force=true: the events are then unlinked and their pending sends canceled.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Query Parameters

force?|
Default"false"

Response Body

Deleted.

curl -X DELETE 'https://app.groupilot.com/api/v1/sequences/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Empty

Add a message

POST
/sequences/{id}/messages

By default the pending sends of the linked events are resynchronised (resync: false to batch several changes, then POST /sequences/{id}/resync).

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
external_id?string
Length1 <= length <= 200
timing?|

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.

Match^(J[+-]?\d{1,2} \d{2}:\d{2}|H[+-]\d{1,3})$
type*MessageType

text, 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).

Value in"text""image""video""voice""document""poll""community_update"
text?string
Lengthlength <= 10000
media_url?|
Formaturi
Lengthlength <= 2000
poll?|null
ghost_mention?boolean
link_preview?boolean

Text 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?boolean
Defaulttrue

Response Body

Added.

application/json
  1. 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  }}

Change a message

PATCH
/sequences/{id}/messages/{message_id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid
message_id*string
Formatuuid

Request Body

application/json
  1. body
external_id?string
Length1 <= length <= 200
timing?|

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.

Match^(J[+-]?\d{1,2} \d{2}:\d{2}|H[+-]\d{1,3})$
type?MessageType

text, 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).

Value in"text""image""video""voice""document""poll""community_update"
text?string
Lengthlength <= 10000
media_url?|
Formaturi
Lengthlength <= 2000
poll?|null
ghost_mention?boolean
link_preview?boolean

Text 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?boolean
Defaulttrue

Response Body

Changed.

application/json
  1. 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  }}

Remove a message

DELETE
/sequences/{id}/messages/{message_id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid
message_id*string
Formatuuid

Query Parameters

resync?|
Default"true"

Response Body

Removed.

application/json
  1. 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  }}

Reorder the messages

PUT
/sequences/{id}/messages/order

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
ids*array<>

Every message id of the sequence, in the new order (at most 200).

Items1 <= items <= 200
resync?boolean
Defaulttrue

Response Body

Reordered.

application/json
  1. 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  }}
GET
/sequences/{id}/resync

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Response Body

What a resync would change, per linked event.

application/json
  1. 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    }  ]}
POST
/sequences/{id}/resync

Refused with 409 conflict, before anything changes, when it would schedule more than 20,000 sends in one call: pass fewer event_ids.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
event_ids?array<>

Defaults to every event linked to the sequence.

Items1 <= items <= 50

Response Body

Done.

application/json
  1. response
events_resynced*integer
canceled_jobs*integer
created_jobs*integer
overrides_kept*integer

Pending sends edited by hand in the app, left as they are.

locked_skipped*integer

Sends 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}
PUT
/sequences/sync

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).

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.

Request Body

application/json
  1. body
external_id*string
Length1 <= length <= 200
name*string
Length1 <= length <= 120
messages*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).

Itemsitems <= 200
apply_to_pending_jobs?boolean
Defaulttrue

Response Body

Synchronised.

application/json
  1. response
sequence*
created*boolean
messages*
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  }}