Groupilot Docs

Messages

GET
/events/{id}/jobs

Every message instance (one per occurrence and sequence message, plus ad hoc messages), with its delivery state. Cursor pagination; the cursor is only valid with the same order.

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

limit?integer
Range1 <= value <= 500
Default100
cursor?string
Length1 <= length <= 512
status?|array<>
occurrence_id?string
Formatuuid
community_id?string

WhatsApp community id (see /communities).

Length1 <= length <= 200
content_type?string

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"
from?string
Formatdate-time
to?string
Formatdate-time
order?string
Default"asc"
Value in"asc""desc"

Response Body

One page of messages.

application/json
  1. response
items*array<>
next_cursor*string|null
curl -X GET 'https://app.groupilot.com/api/v1/events/497f6eca-6276-4993-bfeb-53cbbbba6f08/jobs'
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",      "send_at": "2019-08-24T14:15:22Z",      "status": "scheduled",      "source": "sequence",      "label": "string",      "identity_label": "string",      "delivery": {        "sent": 0,        "failed": 0,        "total": 0,        "certain_failed": 0,        "uncertain": 0      },      "content": {        "source": "snapshot",        "type": "text",        "text": "string",        "media_url": "string",        "poll": {          "question": "string",          "options": [            "string",            "string"          ],          "select_count": 0        },        "community_update": {          "name_template": "string",          "description_template": "string",          "restore_name": true,          "restore_description": true        },        "link_preview": true      },      "sequence_message": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "order": 0,        "timing": "string"      },      "editable": true,      "cancelable": true,      "retryable": true,      "retrying": true,      "retry": {        "count": 0,        "max": 0,        "next_at": "2019-08-24T14:15:22Z",        "last_error_category": "string"      },      "has_override": true,      "first_attempt_at": "2019-08-24T14:15:22Z",      "sent_at": "2019-08-24T14:15:22Z",      "error_message": "string"    }  ],  "next_cursor": "string"}

Read a scheduled message

GET
/jobs/{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 message.

application/json
  1. response
id*string
Formatuuid
occurrence_id*string
Formatuuid
send_at*string

ISO 8601 date-time with offset.

Formatdate-time
status*JobStatus

scheduled: waiting for its time. billing_paused: held while the subscription is not active. overdue: its time passed and it was not sent. partial: sent to some communities only. canceled: will not be sent.

Value in"scheduled""billing_paused""overdue""sent""partial""failed""canceled"
source*string
Value in"sequence""ad_hoc"
label*|

Your label for an ad hoc message.

identity_label*string
delivery*
content*
sequence_message*|null
editable*boolean
cancelable*boolean
retryable*boolean
retrying*boolean
retry*
has_override*boolean
first_attempt_at*|

ISO 8601 date-time with offset.

Formatdate-time
sent_at*|

ISO 8601 date-time with offset.

Formatdate-time
error_message*string|null
curl -X GET 'https://app.groupilot.com/api/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",  "send_at": "2019-08-24T14:15:22Z",  "status": "scheduled",  "source": "sequence",  "label": "string",  "identity_label": "string",  "delivery": {    "sent": 0,    "failed": 0,    "total": 0,    "certain_failed": 0,    "uncertain": 0  },  "content": {    "source": "snapshot",    "type": "text",    "text": "string",    "media_url": "string",    "poll": {      "question": "string",      "options": [        "string",        "string"      ],      "select_count": 0    },    "community_update": {      "name_template": "string",      "description_template": "string",      "restore_name": true,      "restore_description": true    },    "link_preview": true  },  "sequence_message": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "order": 0,    "timing": "string"  },  "editable": true,  "cancelable": true,  "retryable": true,  "retrying": true,  "retry": {    "count": 0,    "max": 0,    "next_at": "2019-08-24T14:15:22Z",    "last_error_category": "string"  },  "has_override": true,  "first_attempt_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "error_message": "string"}
PATCH
/jobs/{id}

Only while editable (not yet attempted, subscription active, not a poll, not a community update: 409 community_update_not_editable). The override wins over the sequence until the message is sent.

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
text?string
Length1 <= length <= 10000
media_url?|
Formaturi
Lengthlength <= 2000

Response Body

Updated.

application/json
  1. response
id*string
Formatuuid
occurrence_id*string
Formatuuid
send_at*string

ISO 8601 date-time with offset.

Formatdate-time
status*JobStatus

scheduled: waiting for its time. billing_paused: held while the subscription is not active. overdue: its time passed and it was not sent. partial: sent to some communities only. canceled: will not be sent.

Value in"scheduled""billing_paused""overdue""sent""partial""failed""canceled"
source*string
Value in"sequence""ad_hoc"
label*|

Your label for an ad hoc message.

identity_label*string
delivery*
content*
sequence_message*|null
editable*boolean
cancelable*boolean
retryable*boolean
retrying*boolean
retry*
has_override*boolean
first_attempt_at*|

ISO 8601 date-time with offset.

Formatdate-time
sent_at*|

ISO 8601 date-time with offset.

Formatdate-time
error_message*string|null
curl -X PATCH 'https://app.groupilot.com/api/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",  "send_at": "2019-08-24T14:15:22Z",  "status": "scheduled",  "source": "sequence",  "label": "string",  "identity_label": "string",  "delivery": {    "sent": 0,    "failed": 0,    "total": 0,    "certain_failed": 0,    "uncertain": 0  },  "content": {    "source": "snapshot",    "type": "text",    "text": "string",    "media_url": "string",    "poll": {      "question": "string",      "options": [        "string",        "string"      ],      "select_count": 0    },    "community_update": {      "name_template": "string",      "description_template": "string",      "restore_name": true,      "restore_description": true    },    "link_preview": true  },  "sequence_message": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "order": 0,    "timing": "string"  },  "editable": true,  "cancelable": true,  "retryable": true,  "retrying": true,  "retry": {    "count": 0,    "max": 0,    "next_at": "2019-08-24T14:15:22Z",    "last_error_category": "string"  },  "has_override": true,  "first_attempt_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "error_message": "string"}
GET
/jobs/{id}/deliveries

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

limit?integer
Range1 <= value <= 500
Default100
cursor?string
Length1 <= length <= 512

Response Body

One page of deliveries.

application/json
  1. response
items*array<>
next_cursor*string|null
curl -X GET 'https://app.groupilot.com/api/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries'
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "community_whatsapp_id": "string",      "community_name": "string",      "number": 0,      "status": "string",      "state": "string",      "reason_code": "string",      "sent_at": "2019-08-24T14:15:22Z",      "error_message": "string",      "reach": {        "members_at_send": 0,        "delivered_count": 0,        "read_count": 0,        "read_rate": 0,        "measurement_status": "pending",        "measured_at": "2019-08-24T14:15:22Z"      }    }  ],  "next_cursor": "string"}
POST
/events/{id}/messages

Sent to the occurrence's communities at send_at. Content is frozen at creation. 30 per day per account. send scope.

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
occurrence_id*string
Formatuuid
send_at*string

At least 60 seconds in the future.

Formatdate-time
type*string
Value in"text""image""video""voice""poll"
text?string
Lengthlength <= 10000
media_url?|
Formaturi
Lengthlength <= 2000
poll?|null
label?string

Shown in the app next to the message.

Lengthlength <= 60

Response Body

Scheduled.

application/json
  1. response
id*string
Formatuuid
occurrence_id*string
Formatuuid
send_at*string

ISO 8601 date-time with offset.

Formatdate-time
status*JobStatus

scheduled: waiting for its time. billing_paused: held while the subscription is not active. overdue: its time passed and it was not sent. partial: sent to some communities only. canceled: will not be sent.

Value in"scheduled""billing_paused""overdue""sent""partial""failed""canceled"
source*string
Value in"sequence""ad_hoc"
label*|

Your label for an ad hoc message.

identity_label*string
delivery*
content*
sequence_message*|null
editable*boolean
cancelable*boolean
retryable*boolean
retrying*boolean
retry*
has_override*boolean
first_attempt_at*|

ISO 8601 date-time with offset.

Formatdate-time
sent_at*|

ISO 8601 date-time with offset.

Formatdate-time
error_message*string|null
curl -X POST 'https://app.groupilot.com/api/v1/events/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages' \  -H 'Content-Type: application/json' \  -d '{  "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",  "send_at": "2019-08-24T14:15:22Z",  "type": "text"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",  "send_at": "2019-08-24T14:15:22Z",  "status": "scheduled",  "source": "sequence",  "label": "string",  "identity_label": "string",  "delivery": {    "sent": 0,    "failed": 0,    "total": 0,    "certain_failed": 0,    "uncertain": 0  },  "content": {    "source": "snapshot",    "type": "text",    "text": "string",    "media_url": "string",    "poll": {      "question": "string",      "options": [        "string",        "string"      ],      "select_count": 0    },    "community_update": {      "name_template": "string",      "description_template": "string",      "restore_name": true,      "restore_description": true    },    "link_preview": true  },  "sequence_message": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "order": 0,    "timing": "string"  },  "editable": true,  "cancelable": true,  "retryable": true,  "retrying": true,  "retry": {    "count": 0,    "max": 0,    "next_at": "2019-08-24T14:15:22Z",    "last_error_category": "string"  },  "has_override": true,  "first_attempt_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "error_message": "string"}

Cancel a pending message

POST
/jobs/{id}/cancel

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

Canceled.

application/json
  1. response
id*string
Formatuuid
occurrence_id*string
Formatuuid
send_at*string

ISO 8601 date-time with offset.

Formatdate-time
status*JobStatus

scheduled: waiting for its time. billing_paused: held while the subscription is not active. overdue: its time passed and it was not sent. partial: sent to some communities only. canceled: will not be sent.

Value in"scheduled""billing_paused""overdue""sent""partial""failed""canceled"
source*string
Value in"sequence""ad_hoc"
label*|

Your label for an ad hoc message.

identity_label*string
delivery*
content*
sequence_message*|null
editable*boolean
cancelable*boolean
retryable*boolean
retrying*boolean
retry*
has_override*boolean
first_attempt_at*|

ISO 8601 date-time with offset.

Formatdate-time
sent_at*|

ISO 8601 date-time with offset.

Formatdate-time
error_message*string|null
curl -X POST 'https://app.groupilot.com/api/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",  "send_at": "2019-08-24T14:15:22Z",  "status": "scheduled",  "source": "sequence",  "label": "string",  "identity_label": "string",  "delivery": {    "sent": 0,    "failed": 0,    "total": 0,    "certain_failed": 0,    "uncertain": 0  },  "content": {    "source": "snapshot",    "type": "text",    "text": "string",    "media_url": "string",    "poll": {      "question": "string",      "options": [        "string",        "string"      ],      "select_count": 0    },    "community_update": {      "name_template": "string",      "description_template": "string",      "restore_name": true,      "restore_description": true    },    "link_preview": true  },  "sequence_message": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "order": 0,    "timing": "string"  },  "editable": true,  "cancelable": true,  "retryable": true,  "retrying": true,  "retry": {    "count": 0,    "max": 0,    "next_at": "2019-08-24T14:15:22Z",    "last_error_category": "string"  },  "has_override": true,  "first_attempt_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "error_message": "string"}

Retry a failed message

POST
/jobs/{id}/retry

Re-queues only the communities where the send certainly failed before leaving; a send WhatsApp did not confirm is never repeated. send scope.

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
mode*string

failed/partial/overdue: re-queue the communities that certainly failed before sending. force_now: skip the automatic backoff.

Value in"failed""partial""overdue""force_now"

Response Body

Re-queued.

application/json
  1. response
job*
deliveries_reset*integer
curl -X POST 'https://app.groupilot.com/api/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/retry' \  -H 'Content-Type: application/json' \  -d '{  "mode": "failed"}'
{  "job": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "occurrence_id": "8508ee33-23a1-4a06-ae02-1eb167405e7b",    "send_at": "2019-08-24T14:15:22Z",    "status": "scheduled",    "source": "sequence",    "label": "string",    "identity_label": "string",    "delivery": {      "sent": 0,      "failed": 0,      "total": 0,      "certain_failed": 0,      "uncertain": 0    },    "content": {      "source": "snapshot",      "type": "text",      "text": "string",      "media_url": "string",      "poll": {        "question": "string",        "options": [          "string",          "string"        ],        "select_count": 0      },      "community_update": {        "name_template": "string",        "description_template": "string",        "restore_name": true,        "restore_description": true      },      "link_preview": true    },    "sequence_message": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "order": 0,      "timing": "string"    },    "editable": true,    "cancelable": true,    "retryable": true,    "retrying": true,    "retry": {      "count": 0,      "max": 0,      "next_at": "2019-08-24T14:15:22Z",      "last_error_category": "string"    },    "has_override": true,    "first_attempt_at": "2019-08-24T14:15:22Z",    "sent_at": "2019-08-24T14:15:22Z",    "error_message": "string"  },  "deliveries_reset": 0}