Skip to main content

Formats

This page covers the exact formats the API uses for common values — timestamps, phone numbers, extensions, ids, money, and true/false — so you always know what to send and what you will get back.

Timestamps​

All timestamps come back in RFC 3339 format and in UTC (the trailing Z means UTC):

"startTime": "2026-08-11T13:20:01Z"

There is no local-time version and no Unix-timestamp (epoch) version. If you need to show a user their own local time, GET /users gives each user's time zone (an IANA name like America/New_York) — do the conversion in your own app.

Phone numbers​

A number you sendWrite it however you like — spaces, dashes, and parentheses are ignored. So "(212) 555-0188", "212-555-0188" and "12125550188" all count as the same number.
A number you get backAlways plain digits — no +, no spaces, no punctuation. US numbers come back in 11-digit form, like "12125550188".

Two things this means for you:

  1. You can copy output straight into input. Take the number from GET /sms/lines and use it directly as the from field in POST /sms/messages — no reformatting needed.

  2. The cleaned-up number comes back in the response. For a message that was sent, messages[].to shows the tidied-up version: send to "(347) 555-0123" and it comes back as "13475550123" — the exact number that was dialled, and the one you are billed for.

    There is one exception: skipped[].to. When a recipient is skipped, it comes back exactly as you typed it, not cleaned up. That is on purpose — a skipped number may have been skipped because it was too malformed to tidy up, and returning it unchanged lets you match it against your original list to see which recipient was dropped.

Extensions vs numbers​

Both appear as text strings, and you cannot treat one as the other:

  • "204" — an internal extension.
  • "12125550188" — an external number.

On a recording's from/to, an internal leg shows extensions, not phone numbers. So do not assume every value is a number you could dial from outside.

Ids​

IdTypeExample
User idinteger481920
Webhook idinteger2074
SMS message idinteger88214417
Call idstring"1754489201.884213"
Recording leg id (uniqueId)string"1754489201.884213"

A call id is a Unix timestamp, a dot, and a sequence number (like 1754489201.884213). Keep it as text — if you read it as a decimal number you lose precision and quietly corrupt the id. A malformed call id gets a 400 that names the expected shape, not a 404.

Money​

{"currency": "USD", "unitPrice": 0.0025, "price": 0.0025, "totalPrice": 0.0025}

Prices are plain numbers in dollars — 0.0025 means a quarter of a cent, not 25 of anything. currency is always USD for now, and it is included on every response so you never have to guess.

Do not sum these as floats

A single SMS segment can have a price with four decimal places, and adding up thousands of them using ordinary floating-point numbers slowly drifts away from the true total (a well-known rounding problem with floats). Convert each price to a precise decimal type as soon as it arrives, or do the math in whole ten-thousandths of a dollar using integers.

price = unitPrice × units, always. See SMS billing for what a unit is.

Booleans mean what they say​

No 0/1, and no "true" as text. Just real true and false.

The one to watch is billing.billed. You might expect it to mean "this request charged me," but it does not — it is always true. It describes the endpoint (a paid operation), not whether your particular request actually cost anything. For example, if you send a message but every recipient is skipped, the request costs nothing, yet billing.billed is still true. To find out what a specific request really cost, look at the price (totalPrice), not at billed.