Sign inGet Started

List email rates

GET
/v1/billing/rates/email
for await (const rate of bird.billingRates.email()) {
  console.log(rate);
}
Reactie200
{
  "data": [
    {
      "item": "email",
      "unit": "email",
      "rate": {
        "amount": "0.0009",
        "currency_code": "USD"
      },
      "recurring_period": null,
      "intervals_per_charge": null
    }
  ],
  "next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}

Returns what your organization pays for email: the rate of an email charged to your balance and the fee of a dedicated IP address. Rates are net of tax, in your organization's billing currency, with your agreed prices and your plan's rates applied. An item with no price is left out. The email rate is the price of one message accepted for one recipient, sent on its own or in a broadcast, and of one inbound email delivered to you; on a legacy Email plan broadcast recipients are not charged. Email inside your plan's allowance is not charged at it, and your plan decides whether email beyond the allowance can be sent; the card states the rate either way. It is the rate in effect when the card is read, and email beyond the allowance is charged at the rate in effect when the charge is made. The dedicated IP rate is the price of one IP address per recurring_period, the rate a new IP address is subscribed at; intervals_per_charge periods are billed at once, and an IP address your plan includes is not charged. Returns 412 when your organization has no billing currency yet, and a retryable 503 when the rates cannot be read; a page is never returned with rates missing. Requires the rates permission in the workspace, or the organization's org:billing permission, with which the workspace can be left out. Without a credential the response is Bird's default rates, in currency; a credential that does not authenticate returns 401, never default rates.

Queryparameters

sortstring

Field to sort by. Rates are ordered by item, the email before the dedicated IP address.

Possible values: item

orderstring

Sort direction. Defaults to asc, which sorts alphabetically or from oldest to newest, depending on the selected sort field.

Possible values: asc, desc

limitinteger

Maximum number of items to return per page.

starting_afterstring

Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.

ending_beforestring

Cursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.

itemstring

Return only the rate of this item.

Possible values: email, dedicated_ip

currencystring

The currency of the rates when the request carries no credential, USD when left out. With a credential the rates are in the organization's billing currency, and a different currency returns 422.

Response Payload

data
array of object
verplicht
Onderliggende attributen tonen
data.item
string
verplicht

What an email rate is for:

  • email: One email charged to your balance: a message accepted for one recipient, sent on its own or in a broadcast, or one inbound email delivered to you. Email inside your plan's allowance is not charged at this rate.
  • dedicated_ip: One dedicated IP address, charged per recurring_period for as long as you keep it.

Possible values: email, dedicated_ip

data.unit
string
verplicht

What one rate pays for.

Possible values: email, ip_address

data.rate
object
verplicht

The price of one unit, net of tax, in your organization's billing currency, after your agreed prices and your plan's rates are applied. On dedicated_ip it is the price of one IP address per recurring_period, the rate a new IP address is subscribed at; a renewal is charged the rate that applies when it renews, and an IP address your plan includes is not charged. On email it is the rate in effect when the card is read; a broadcast recipient is not charged on a legacy Email plan.

Onderliggende attributen tonen
data.rate.amount
string
verplicht

The price of one unit. Where the rate has two fees, it is the sum of the fees present.

data.rate.currency_code
string
verplicht

Your organization's billing currency. Every amount is in it.

data.rate.transaction_amount
string

Our own fee for one unit, on a rate made of two fees. It is the rate behind cost.transaction_amount on a message. Left out on a rate with a single fee, and where this fee is not priced.

data.rate.passthrough_amount
string

The third-party fee passed on for one unit. It is the rate behind cost.passthrough_amount on a message. Left out on a rate with a single fee, and where no such fee applies.

data.recurring_period
nullable object
verplicht

The period rate covers on dedicated_ip. null on email, which is charged per email.

Onderliggende attributen tonen
data.intervals_per_charge
nullable integer
verplicht

How many recurring_periods one charge bills at once, so a charge for an IP address your plan does not include is rate multiplied by this. It is your signed contract's billing frequency where one applies, and the product's own count otherwise. null on email.

next_cursor
nullable string
verplicht

Cursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.

prev_cursor
nullable string
verplicht

Cursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.

refresh_cursor
nullable string
verplicht

Refresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.

Ga verder met de documentatie, handleidingen en voorbeelden voor dit onderwerp.