Skip to main content

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

FieldTypeRequiredDescription
campaign_idstringQuery against a given campaign's targeting criteria. If empty, only global opt-outs will be checked.

Body

FieldTypeRequiredDescription
cellsstring[]The MSISDNs the check
countrystringThe 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";
}