Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Admin API key (format: sk_admin_*) for organization-level operations

Path Parameters

appId
string
required

Unique identifier for a App. Format: app_[test_]{ksuid}

Pattern: ^app_(?:test_)?[a-zA-Z0-9]{27}$
Example:

"app_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

Body

application/json
phoneNumber
string
required

The phone number to purchase in E.164 format

Example:

"+14155551234"

numberType
enum<string>
required

Type of phone number

Available options:
local,
tollfree,
mobile
Example:

"local"

Response

Phone number purchased successfully

phoneNumberId
string
required

Unique identifier for a Phone Number. Format: ph_[test_]{ksuid}

Pattern: ^ph_(?:test_)?[a-zA-Z0-9]{27}$
Example:

"ph_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

appId
string
required

Unique identifier for a App. Format: app_[test_]{ksuid}

Pattern: ^app_(?:test_)?[a-zA-Z0-9]{27}$
Example:

"app_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

number
string
required
purchaseHistoryId
string
required

Unique identifier for a Phone Number Purchase History. Format: ph_purch_[test_]{ksuid}

Pattern: ^ph_purch_(?:test_)?[a-zA-Z0-9]{27}$
Example:

"ph_purch_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

createdAt
string
required