Sign inGet started

Get how much of a broadcast the send allowance covers

GET
/v1/email/broadcasts/{broadcast_id}/send-quota
const quota = await bird.broadcasts.sendQuota("eb_01krdgeqcxet5s7t44vh8rt9mg");
if (quota.allowed < quota.recipients) {
  console.log(`${quota.limited_by} allowance covers only ${quota.allowed}`);
}
Resposta200
{
  "recipients": 12000,
  "allowed": 5000,
  "limited_by": "monthly",
  "limit": 50000,
  "remaining": 7000
}
Returns how much of the broadcast the organization's email send allowance covers, so a send that would run past it can be reconsidered rather than failing part-way. recipients is how many contacts the broadcast would send to right now, the same number the audience counts report as sendable. allowed is how many of those the allowance covers, and equals recipients when nothing limits the send. limited_by names the allowance that stops the rest, either the monthly one that runs with the billing period or the daily one, with limit and remaining describing it. Both numbers are live estimates: audience membership, suppressions and the sends already made in the current window all move until the broadcast sends. The broadcast must have an audience selected; a broadcast with no audience yet returns a 422.
Parâmetros
broadcast_id
string
ID of the broadcast whose send allowance to check.
Payload de resposta
recipients
integer
obrigatório
Number of contacts the broadcast would send to right now, after contacts without an email address and contacts suppressed for the broadcast's category are dropped. The same number the broadcast's audience counts report as sendable.
allowed
integer
obrigatório
Number of those recipients the organization's email send allowance covers. Equal to recipients when nothing limits the send, and lower when part of the audience runs past what is left of it. A part-covered send goes out in whole batches, so this is cut back to a batch boundary rather than to the exact number of emails left: it can sit below remaining rather than matching it, and should be read rather than worked out from limit and remaining. 0 means none of them would go out, either because the audience is larger than the whole allowance, which is refused rather than sent in part, or because too little of the allowance is left to carry any of it.
limited_by
string
obrigatório
Which of the organization's email send allowances stops a send from reaching its whole audience.
  • none: every recipient is covered.
  • monthly: the allowance that runs with the billing period.
  • daily: the allowance that resets at the end of each UTC day.
When both apply, the tighter of the two is reported.
Possible values: none, monthly, daily
limit
integer
Size of the allowance named by limited_by, in emails. Omitted when nothing limits the send.
remaining
integer
How much of that allowance is left in the current window, in emails. Omitted when nothing limits the send.