Purchase SMS Number
Purchase a new SMS phone number for an organization. The number is provisioned under the organization’s existing 10DLC campaign registration.
Prerequisites
- Organization must have 10DLC approval (
sms_active: true)
- Tenant must have
enable_multi_sms_numbers enabled
- Organization must not exceed
max_sms_numbers_per_org limit
Authentication
Request Body
The organization’s unique_id that will own this number
Desired area code for the phone number (e.g., “415”, “212”)
Optional user_id to assign the number to immediately upon purchase
Optional friendly name for the number (e.g., “Sales Line”, “Support”)
Response
Whether the purchase was successful
The purchased phone number in E.164 format (+15551234567)
UUID of the phone number record
Formatted phone number for display (+1 555-123-4567)
user_id if number was assigned immediately, null otherwise
Example Request
curl -X POST "https://api.teli.ai/v1/sms/phone-numbers/purchase" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"organization_id": "org_abc123",
"area_code": "415",
"user_id": "user_xyz789",
"nickname": "Sales Line"
}'
Example Response
{
"success": true,
"phone_number": "+14155551234",
"phone_id": "6d7f8580-2c18-4ca9-8917-c9ca121a2c49",
"pretty_phone_number": "+1 415-555-1234",
"assigned_to": "user_xyz789",
"stored": true,
"powered_by": "Teli"
}
Error Responses
{
"success": false,
"error": "Multi-SMS numbers not enabled for this tenant. Contact support to enable."
}
{
"success": false,
"error": "Organization already has 10/10 SMS numbers"
}
{
"success": false,
"error": "Organization SMS not active (10DLC approval required)"
}
{
"success": false,
"error": "No numbers available in area code 999"
}
Billing
When a number is purchased:
- One-time purchase fee is charged immediately (if configured)
- Weekly recurring fee starts from purchase date
- Charges appear in
usage_logs with appropriate event types
Notes
- Numbers are purchased from the carrier inventory
- The number is automatically linked to the org’s 10DLC campaign
- If
user_id is provided, the number is assigned immediately
- Numbers without
user_id go into the org’s “available pool”