Skip to content
Broadcasts

Fetch a broadcast by id

GET
/broadcasts/{id}
const url = 'https://api.kirimdev.com/v1/broadcasts/bcst_01HXYZABCDEFGHJKMNPQRSTVWX';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Fetch one broadcast by its public bcst_ identifier, including stats: the current number of recipients in each delivery status.

id
required

Public Kirimdev broadcast ID.

string
/^bcst_[0-9A-HJKMNP-TV-Z]{26}$/
Example
bcst_01HXYZABCDEFGHJKMNPQRSTVWX

Public Kirimdev broadcast ID.

Broadcast resource

Media type application/json
object
data
required
object
id
required
string
object
required
string
Allowed values: broadcast
name
required
string
status
required
string
Allowed values: draft scheduled running completed failed cancelled
team_id
required
string
template
required

Template the campaign sent. null when the template has since been deleted.

object
id
required
string
name
required
string | null
language
required
string | null
whatsapp_account
required
object
phone_number
required
string | null
phone_number_id
required

Meta business_phone_number_id — use as the {phone_number_id} path segment in /v1/{phone_number_id}/... endpoints.

string | null
customer
required

End-customer (multi-tenant platform mode) that owns this account. NULL for direct-org accounts.

object
id
required
string
name
required
string
scheduled_at
required
string | null format: date-time
failure_reason
required

Why the whole campaign stopped (for example an audience larger than the remaining quota). Per-recipient failures are on the recipients instead.

string | null
total_count
required

Recipients in the audience.

integer
sent_count
required

Recipients Meta accepted (includes those since delivered or read).

integer
failed_count
required
integer
created_at
required
string format: date-time
updated_at
required
string format: date-time
stats
required

Recipients currently in each status. Each recipient is counted once, in its latest status: sent means accepted but not yet delivered.

object
total
required
integer
pending
required
integer
queued
required
integer
sent
required
integer
delivered
required
integer
read
required
integer
failed
required
integer
request_id
required

Unique request identifier to include when contacting support.

string
Example
{
"data": {
"id": "bcst_01HXYZABCDEFGHJKMNPQRSTVWX",
"object": "broadcast",
"name": "Promo Oktober",
"status": "draft",
"template": {
"id": "tmpl_01HXYZABCDEFGHJKMNPQRSTVWX"
},
"whatsapp_account": {
"phone_number_id": "106540352242922",
"customer": {
"id": "cus_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}
},
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}

Validation failure

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

A field value is invalid.

{
"error": {
"type": "invalid_request_error",
"code": "invalid_field_value",
"message": "A field value is invalid.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Authentication failure

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

The provided API key is invalid.

{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The provided API key is invalid.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Resource not found

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

Resource not found.

{
"error": {
"type": "not_found",
"code": "resource_not_found",
"message": "Resource not found.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Rate limit exceeded

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

Rate limit exceeded.

{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Internal server error

Media type application/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error api_error
code
required
string
message
required

Human-readable explanation of the error.

string
param

Request field associated with the error, when applicable.

string
request_id
required

Unique request identifier to include when contacting support.

string
Examples
Example default

An unexpected error occurred.

{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected error occurred.",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}