# Get a phone number in one request
$ curl -X POST https://ring.prim.sh/v1/numbers \
-H "X-402-Payment: $PAYMENT_TOKEN" \
-d '{"country": "US", "capabilities": ["sms", "voice"]}'
# → 402 → pay → 201
{
"id": "num_p3x7k9",
"number": "+12125551847",
"country": "US",
"capabilities": ["sms", "voice"],
"webhook": null,
"ttl": 86400
}
# Send SMS
$ curl -X POST https://ring.prim.sh/v1/sms \
-H "X-402-Payment: $PAYMENT_TOKEN" \
-d '{"from": "+12125551847", "to": "+14155559999",
"body": "Deployment complete. All systems green."}'
Numbers are ephemeral by default (24h). Extend or make permanent. Release when done.
Agent signs up for a service that requires phone verification. Provision a number, receive the SMS code, verify, release the number. Under a minute.
Text a human when something matters. Server down, trade executed, build failed. The one channel humans actually check immediately.
Agent maintains an SMS conversation with a human. Inbound messages hit a webhook, agent responds via API. No app install required.
Agent makes a phone call with TTS. Appointment reminders, status updates, emergency alerts. Programmable voice without Twilio.
Inbound calls → webhook → agent decides routing. Press 1 for support, press 2 for sales. Except the "agent" routing it is an AI.
Need a phone number for 10 minutes? Pay for 10 minutes. No monthly commitment, no plan, no account. Spin up, use, tear down.
# Number management
POST /v1/numbers # Provision a number
GET /v1/numbers # List your numbers
GET /v1/numbers/:id # Number details
PUT /v1/numbers/:id # Update TTL, webhook, capabilities
DELETE /v1/numbers/:id # Release number
# SMS
POST /v1/sms # Send SMS
GET /v1/numbers/:id/messages # Poll for inbound SMS
GET /v1/messages/:id # Get message details
# Voice
POST /v1/calls # Initiate outbound call
GET /v1/calls/:id # Call status / recording URL
POST /v1/calls/:id/say # TTS into active call
POST /v1/calls/:id/hangup # End call
# Webhooks
PUT /v1/numbers/:id # Set webhook for inbound SMS/calls
# Inbound SMS → POST to webhook:
# { "from", "to", "body", "timestamp" }
# Inbound call → POST to webhook:
# { "from", "to", "call_id", "action_url" }
# Available inventory
GET /v1/available # Search available numbers by country/area
# Your agent gets these tools
tools:
provision_number:
country: "US"
capabilities: ["sms", "voice"]
webhook: "https://my-agent.example/inbound"
send_sms:
from: "+12125551847"
to: "+14155559999"
body: "Your verification code is 847291"
read_sms:
number: "num_p3x7k9"
since: "5m"
make_call:
from: "+12125551847"
to: "+14155559999"
tts: "Hello, this is an automated message. Your order has shipped."
release_number:
number: "num_p3x7k9"
| Action | Cost | Notes |
|---|---|---|
| Provision number | $0.03/day | US local. Intl varies. |
| Send SMS | $0.008 | US domestic |
| Receive SMS | $0.005 | Webhook delivery included |
| Outbound call | $0.015/min | US domestic |
| Inbound call | $0.010/min | Webhook included |
| TTS | $0.005/min | Multiple voices |
| Call recording | $0.002/min | Stored 24h default |
A full 2FA flow (provision + receive SMS + release) costs under $0.04.
Agents don't have phones. They have HTTP clients.
Read the docs →or just: curl https://ring.prim.sh/v1/available?country=US