Groupilot Docs

Broadcasts

List broadcasts

GET
/broadcasts

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Response Body

Broadcasts of the account, newest first.

application/json
  1. response
items*array<>
curl -X GET 'https://app.groupilot.com/api/v1/broadcasts'
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "pending",      "type": "text",      "text": "string",      "media_url": "string",      "poll": {        "question": "string",        "options": [          "string",          "string"        ],        "select_count": 0      },      "community_count": 0,      "counts": {        "success": 0,        "failure": 0,        "uncertain": 0      },      "scheduled_at": "2019-08-24T14:15:22Z",      "sent_at": "2019-08-24T14:15:22Z",      "canceled_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z"    }  ]}
POST
/broadcasts

Now or at a given time, with a random delay between communities. 8 per day per account, 200 communities per broadcast. send scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
community_whatsapp_ids*array<>

From GET /communities (whatsapp_id).

Items1 <= items <= 200
type*SendableMessageType
Value in"text""image""video""voice""document""poll"
text?string
Lengthlength <= 10000
media_url?|
Formaturi
Lengthlength <= 2000
poll?|null
scheduled_at?string

Omit to send now (with a random delay between communities).

Formatdate-time
scheduled_at_local?string

Local time in the account's timezone, instead of scheduled_at.

Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$

Response Body

Created.

application/json
  1. response
id*string
Formatuuid
status*BroadcastStatus
Value in"pending""sending""completed""failed""canceled"
type*SendableMessageType
Value in"text""image""video""voice""document""poll"
text*string
media_url*string|null
poll*|null
community_count*integer
counts*
scheduled_at*|

ISO 8601 date-time with offset.

Formatdate-time
sent_at*|

ISO 8601 date-time with offset.

Formatdate-time
canceled_at*|

ISO 8601 date-time with offset.

Formatdate-time
created_at*string

ISO 8601 date-time with offset.

Formatdate-time
curl -X POST 'https://app.groupilot.com/api/v1/broadcasts' \  -H 'Content-Type: application/json' \  -d '{  "community_whatsapp_ids": [    "string"  ],  "type": "text"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "pending",  "type": "text",  "text": "string",  "media_url": "string",  "poll": {    "question": "string",    "options": [      "string",      "string"    ],    "select_count": 0  },  "community_count": 0,  "counts": {    "success": 0,    "failure": 0,    "uncertain": 0  },  "scheduled_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "canceled_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z"}

Read a broadcast

GET
/broadcasts/{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 broadcast.

application/json
  1. response
id*string
Formatuuid
status*BroadcastStatus
Value in"pending""sending""completed""failed""canceled"
type*SendableMessageType
Value in"text""image""video""voice""document""poll"
text*string
media_url*string|null
poll*|null
community_count*integer
counts*
scheduled_at*|

ISO 8601 date-time with offset.

Formatdate-time
sent_at*|

ISO 8601 date-time with offset.

Formatdate-time
canceled_at*|

ISO 8601 date-time with offset.

Formatdate-time
created_at*string

ISO 8601 date-time with offset.

Formatdate-time
curl -X GET 'https://app.groupilot.com/api/v1/broadcasts/497f6eca-6276-4993-bfeb-53cbbbba6f08'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "pending",  "type": "text",  "text": "string",  "media_url": "string",  "poll": {    "question": "string",    "options": [      "string",      "string"    ],    "select_count": 0  },  "community_count": 0,  "counts": {    "success": 0,    "failure": 0,    "uncertain": 0  },  "scheduled_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "canceled_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z"}
GET
/broadcasts/{id}/recipients

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

page?|
Range0 <= value <= 10000
Default0

Response Body

Pages of 50 communities.

application/json
  1. response
items*array<>
total*integer
page*integer
page_size*50
Value in50
curl -X GET 'https://app.groupilot.com/api/v1/broadcasts/497f6eca-6276-4993-bfeb-53cbbbba6f08/recipients'
{  "items": [    {      "community_whatsapp_id": "string",      "status": "string",      "attempt_count": 0,      "settled_at": "2019-08-24T14:15:22Z"    }  ],  "total": 0,  "page": 0,  "page_size": 50}
POST
/broadcasts/{id}/cancel

Only before the sending starts.

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

application/json
  1. response
status*"canceled"
Value in"canceled"
changed*boolean
curl -X POST 'https://app.groupilot.com/api/v1/broadcasts/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel'
{  "status": "canceled",  "changed": true}