Phone numbers

Your organization can own US local phone numbers. Each number supports voice and SMS. Use a number to:

  • Call from it, with from_phone_number on a call or a call batch.
  • Answer calls to it with a Call Agent.
  • Answer texts to it with a Chat Agent.
  • Send texts from it, after you put it on a 10DLC campaign.

Buy a number

In the portal, open Numbers and select Buy a number. Search by area code, city, or state, and choose a number.

The Buy a Number dialog in the portal, with area code, city, and state fields

With the API:

Search

Search by area code, city, or state. The results show the one-time and monthly cost of each number. A search does not reserve or charge anything.

curl --fail-with-body --silent --show-error --get \
  "$RESIA_API_BASE/v1/available-phone-numbers" \
  --header "Authorization: Bearer $RESIA_API_KEY" \
  --data-urlencode 'area_code=212'
Order
curl --fail-with-body --silent --show-error \
  "$RESIA_API_BASE/v1/phone-number-orders" \
  --header "Authorization: Bearer $RESIA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"phone_number": "+12125550199"}' \
  --output order.json

Resia answers 202 Accepted with a pending order. The carrier usually completes the purchase within a minute.

Check the order

Read GET /v1/phone-number-orders/{order_id} until the order is completed or failed. You can use the number as a caller ID after Resia confirms with the carrier that it is live.

Assign agents to a number

A number can have one inbound Call Agent and one inbound Chat Agent at the same time. In the portal, open Numbers, then select Manage next to the number.

A phone number's page in the portal, with the Call Agent and Chat Agent that answer it

With the API:

curl --fail-with-body --silent --show-error \
  --request PATCH "$RESIA_API_BASE/v1/phone-numbers/+12125550199" \
  --header "Authorization: Bearer $RESIA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"inbound_call_agent_id": "CALL_AGENT_ID", "inbound_chat_agent_id": "CHAT_AGENT_ID"}'
  • The path is the full number in E.164 format, not an ID.
  • A field that you leave out does not change.
  • null stops that kind of inbound traffic on the number.
  • An agent that needs inputs must have an inbound_input_webhook_url. Otherwise Resia refuses the assignment with 422.

Costs

Each number has a one-time purchase charge when the order completes, and a rental charge for each calendar month that you own it. List them with GET /v1/phone-number-charges.

Release a number

DELETE /v1/phone-numbers/{phone_number} releases a number and stops future rental charges.

Release cannot be undone, and it gives no refund. Resia refuses it with 409 while unfinished batch calls or texts still need the number.

Your call history and past charges stay. Release limits apply per hour, per day, and per 30 days. See Rate limits.

API reference

Phone numbers