Sign inGet Started

List SMS sender rates

GET
/v1/billing/rates/sms-senders
for await (const rate of bird.billingRates.smsSenders({ country_code: "US" })) {
  console.log(rate);
}
Reactie200
{
  "data": [
    {
      "country_code": "US",
      "sender_type": "long_code",
      "pricing": {
        "setup_price": {
          "amount": "0.00995",
          "currency_code": "USD"
        },
        "recurring_price": {
          "amount": "0.00995",
          "currency_code": "USD"
        },
        "recurring_period": {
          "unit": "month",
          "count": 1
        },
        "intervals_per_charge": 1
      }
    }
  ],
  "next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}

Returns what registering an SMS sender for a destination country costs your organization, per country and sender type: the one-off registration fee and the recurring fee for keeping the sender registered. Rates are net of tax, in your organization's billing currency, with your agreed prices applied. A country and sender type that is not listed has no sender registration fee. The card does not cover the fees of other programmes a sender can need, such as US 10DLC brand and campaign fees and toll-free verification. A row with a null sender type applies to every sender type in the country without a row of its own. Whether a sender must be registered in a country at all is not stated here. Returns 412 when your organization has no billing currency yet, a retryable 503 when the rates cannot be read, and a 500 with RatesNotRepresentable when a price cannot be shown on this card, which retrying does not fix; 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 destination country, then sender type.

Possible values: country_code

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.

country_codestring

Return only rates for senders registered for this destination country.

sender_typestring

Return the rates that apply to this sender type: the rates specific to it, and the rates with a null sender type.

Possible values: long_code, short_code, alphanumeric, toll_free

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.country_code
string
verplicht

The destination country the sender is registered for.

data.sender_type
nullable string
verplicht

The sender type these fees are specific to. null on a row that applies to every sender type in the country without a row of its own.

Possible values: long_code, short_code, alphanumeric, toll_free

data.pricing
object
verplicht

What your organization pays for a sender registration, net of tax, in your billing currency. At least one of the two fees is present on a row.

Onderliggende attributen tonen
data.pricing.setup_price
nullable object
verplicht

One-off fee charged once for the registration, net of tax. Its amount is "0" when the published fee is zero. null when no registration fee applies.

Onderliggende attributen tonen
data.pricing.recurring_price
nullable object
verplicht

The rate per recurring_period a new registration is subscribed at for keeping the sender registered, net of tax, after your agreed prices are applied. It is the rate before any registrations your plan includes, which are not charged. A renewal is charged the rate that applies when it renews. null when no recurring fee applies.

Onderliggende attributen tonen
data.pricing.recurring_period
nullable object
verplicht

The period recurring_price covers. null when no recurring fee applies.

Onderliggende attributen tonen
data.pricing.recurring_period.unit
string
verplicht

The calendar unit the period is counted in.

Possible values: day, month, year

data.pricing.recurring_period.count
integer
verplicht

Number of units in the period.

data.pricing.intervals_per_charge
nullable integer
verplicht

How many recurring_periods one charge bills at once, so a charge is recurring_price multiplied by this. It is your signed contract's billing frequency where one applies, and the product's own count otherwise. null when no recurring fee applies.

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.