[AI phone number](/ai-phone-number/) / Phone number API

# Phone number API for AI agents and your own code

If your agent is your own code, use the REST routes directly. They run the same operations as the MCP tools and refuse with the same codes.

[Tell me when it opens ](mailto:hello@sempera.org?subject=Sempera%20Phone)

Price published when it opens. Canada + US. Monthly allowance and fair use apply. Not on sale yet.

- Calls within fair use
- Texts within fair use
- One shared number
- One call at a time

## The routes

-

### GET /v1/phone-profile

The number, the plan state and what is left.

-

### POST /v1/phone-tasks/preview

Prepare a call. Returns the task id, the worst-case spend and an approval link.

-

### POST /v1/phone-tasks

Start the approved call. Answers at once; reserved means queued, not dialling.

-

### GET /v1/phone-tasks/{task_id}

Follow the call to completed, failed or cancelled.

-

### POST /v1/phone-messages/preview and /v1/phone-messages

Prepare and send an approved text.

-

### GET /v1/phone-threads/{thread_id}

Read a thread with numbers masked.

## Preview a call

cURLcurl -X POST https://api.sempera.org/v1/phone-tasks/preview \
-H "Authorization: Bearer $SEMPERA_PHONE_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+14165550123", "task": "Ask what time the shop closes on Saturday.", "permitted_actions": ["ask_questions"], "max_minutes": 5}'

## Design choices that keep it safe

-

### No self-approval

A credential can preview. Only a signed-in owner approves, and any change to an approved call is refused.

-

### No double dial

A call whose answer was lost goes to reconciling and is decided from the provider's records. It is never dialled again.

-

### Untrusted results

A finished call's result is marked as written from what someone else said.

## Credentials

-

### A connected client

Every phone credential is a connected client, listed and revocable under Connected clients. An ordinary API key is refused.

-

### Self sign-up

An agent can start a sign-up with no credential and hand its owner a link. Approval gives it a phone-only credential that lasts 90 days.

## One plan for the line

No per-minute or per-text charge inside Canada and the US, within the monthly allowance and fair use. [What the plan covers](/ai-phone-number/cost/).

[Read the plan details ](#plan-limits)

Sempera
Phone Canada + US

Sempera Phone

Not on sale yet

Sempera Phone is coming soon. Its price will be published when it opens.

- One number on your account that your assistants share
- Up to 300 call minutes a month in Canada and the US, within fair use
- Up to 150 text segments a month in Canada and the US, within fair use
- One active call at a time
- You approve every call and text, or set a standing approval for one number[Tell me when it opens ](mailto:hello@sempera.org?subject=Sempera%20Phone)

[Read how the plan works](https://docs.sempera.org/phone-plan)

The plan allows 300 call minutes and 150 text segments a month, within fair use: one call at a time, 20 outbound calls an hour and 50 a day, 1,000 call minutes a day, outbound calls up to 60 minutes, 20 texts an hour and 100 a day, Canada and the US only, between noon and 9 p.m. Eastern. [See the limits in full](/ai-phone-number/unlimited-plan/). Sempera Phone is coming soon and cannot be bought yet.

## Questions

### Which client should I use?

Any HTTP client works. The OpenAPI document at api.sempera.org/openapi.json describes every phone route.

### How do I know when a call ends?

Poll the task. A finished call does not reopen a chat, so polling is the portable road.

### What do refusals look like?

A stable code and a sentence, such as a 429 with retry_after_s for a fair-use limit.

### Can my code buy the plan?

No. Signup and checkout happen only on the owner's Billing page. Only the owner's own key can cancel.

## Related

- [A phone call MCP server for AI assistants ](/ai-phone-number/mcp-server/)

Sempera's hosted MCP endpoint gives an MCP client eight phone tools for approved calls and texts, with OAuth sign-in.

- [A phone number for AI agents ](/ai-phone-number/agents/)

A line for your AI agents with Sempera Phone: approved calls, approved texts and a voice agent of yours for callbacks.

- [Muse phone calls over Sempera's REST API ](/ai-phone-number/muse/)

Connect Muse to Sempera Phone with a custom connector over Sempera's REST API and a REST credential you create under Connected clients.

- [Phone calls from Codex over MCP ](/ai-phone-number/codex-mcp/)

Add Sempera's MCP server to Codex so it can prepare calls and texts for your approval, sent from a Sempera Phone line.

- [Building on a phone number API: preview, approve, start, follow ](/blog/phone-number-api-for-ai-agents/)

Not every agent speaks MCP. The REST routes behind Sempera Phone, how a call moves through its states, and how to follow it without guessing.

- [Letting an AI agent start its own setup, safely ](/blog/letting-an-ai-agent-start-its-own-setup/)

An agent can ask to use your Sempera Phone line without ever seeing your password. How the code-and-link sign-in works, and what the agent ends up holding.

## Give your assistants a line of their own

Works with

- Claude
- Codex
- Muse
- Grok Bot [Tell me when it opens ](mailto:hello@sempera.org?subject=Sempera%20Phone)

[See what else Sempera's voice agents do](/)

Codex is a trademark of OpenAI. Claude is a trademark of Anthropic. Muse is a trademark of Meta. Grok and Grok Bot are trademarks of xAI. The logos, and the Muse character in the demo, are the owners' own, taken from their official apps and websites and shown unaltered. Each name and logo belongs to its owner and is used here only to say which assistants can connect. Sempera is not affiliated with or endorsed by these companies, and is not partnered with or sponsored by OpenAI, Anthropic, xAI or Meta.
