Compliance
The /compliance
endpoint allows you to ensure 3rd-party suppliers are compliant with your campaign rules.
Check a list of cell numbers
POST /compliance/send
This route lets a supplier query a list of cell numbers against a campaign's targeting criteria. This is useful for ensuring that a supplier is compliant with a set of rules before sending messages.
- 🔐 Permissions:
["compliance:send.create"]
- 💵 Paid endpoint: 0.14 credits per
cell
queried
Request
URL Parameters
Field | Type | Required | Description |
---|---|---|---|
campaign_id | string | ❌ | Query against a given campaign's targeting criteria. If empty, only global opt-outs will be checked. |
Body
Field | Type | Required | Description |
---|---|---|---|
cells | string[] | ✅ | The MSISDNs the check |
country | string | ✅ | The country code of the cell numbers |
Example
{
"country": "ZA",
"cell": ["1234567890", "1234567234"]
}
Response
Success
200
{
ok: true;
data: {
/** Propagate the campaign_id param */
campaign_id?: string;
/** The number of credits used for the check */
credits_used: number;
/** The results of the query */
results: {
cell: string;
/** Whether the cell number is authorised to be sent to */
can_send: boolean;
}
[];
}
}
Error
402
{
ok: false;
error: "Insufficient balance";
}