For the complete documentation index, see llms.txt. This page is also available as Markdown.

Phone Numbers

Provision and manage phone numbers

List phone numbers

get

Retrieves all phone numbers for the organization or available inventory numbers for purchase. Supports filtering:

  • action=assigned → Returns numbers owned by the organization (default behavior)

  • action=available → Returns inventory numbers available for purchase

Authorizations
AuthorizationstringRequired

API key in format kros_live_xxxx for production or kros_test_xxxx for testing. Also accepts JWT tokens from Supabase Auth for dashboard sessions.

Alternative: You can also use the x-api-key header instead of Authorization Bearer.

Query parameters
actionstring · enumOptional

Filter phone numbers by status.

  • assigned → Numbers owned by the organization
  • available → Inventory numbers available for purchase
Default: assignedPossible values:
countrystringOptional

ISO 3166-1 alpha-2 country code (required when action=available)

Example: NG
typestring · enumOptional

Number type filter (only applies when action=available)

Possible values:
limitinteger · min: 1 · max: 100Optional

Number of results (default 20, max 100)

Default: 20
offsetintegerOptional

Pagination offset

Default: 0
Header parameters
x-organization-idstring · uuidOptional

Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.

Responses
get
/phone-numbers

Purchase a phone number

post

Purchases a new phone number from the inventory.

Authorizations
AuthorizationstringRequired

API key in format kros_live_xxxx for production or kros_test_xxxx for testing. Also accepts JWT tokens from Supabase Auth for dashboard sessions.

Alternative: You can also use the x-api-key header instead of Authorization Bearer.

Header parameters
x-organization-idstring · uuidOptional

Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.

Body

Supports two purchase flows:

  • API flow: Provide inventory_id only. The system resolves e164, country, and type from inventory.
  • Dashboard flow: Provide e164, country, and type explicitly. At least one flow's required fields must be present.
inventory_idstring · uuidOptional

ID of the phone number from inventory (API flow)

e164stringOptional

E.164 formatted phone number (Dashboard flow)

Example: +2348012345678
countrystringOptional

ISO 3166-1 alpha-2 country code (Dashboard flow)

Example: NG
typestring · enumOptional

Number type (Dashboard flow)

Possible values:
endpointIdstring · uuidOptional

Endpoint to attach immediately after purchase

totalCostCentsintegerOptional

Total cost in cents (setup + first month)

setupCostCentsintegerOptional

One-time setup cost in cents

monthlyCostCentsintegerOptional

Recurring monthly cost in cents

Responses
201

Phone number purchased successfully

application/json
idstring · uuidOptional
e164stringOptional

E.164 formatted phone number

Example: +14155551234
countrystringOptional

ISO 3166-1 alpha-2 country code

Example: US
typestring · enumOptionalPossible values:
statusstring · enumOptionalPossible values:
endpoint_idstring · uuid · nullableOptional
allow_inboundbooleanOptionalDefault: true
allow_outboundbooleanOptionalDefault: false
sip_uristringOptional

SIP URI for inbound routing

Example: sip:+14155551234@sip.krosai.com
organization_idstring · uuidOptional
created_atstring · date-timeOptional
updated_atstring · date-timeOptional
post
/phone-numbers

Get phone number details

get

Retrieves details including SIP credentials for routing

Authorizations
AuthorizationstringRequired

API key in format kros_live_xxxx for production or kros_test_xxxx for testing. Also accepts JWT tokens from Supabase Auth for dashboard sessions.

Alternative: You can also use the x-api-key header instead of Authorization Bearer.

Path parameters
idstring · uuidRequired

Phone number UUID

Header parameters
x-organization-idstring · uuidOptional

Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.

Responses
get
/phone-numbers/{id}

Release or delete phone number

delete

Removes a phone number from the organization.

Two modes:

  • Hard delete (default, no query param): Permanently removes the phone number record and frees the inventory slot.

  • Soft release (?action=release): Marks the number as inactive and frees the inventory slot, but keeps the record for audit purposes.

Authorizations
AuthorizationstringRequired

API key in format kros_live_xxxx for production or kros_test_xxxx for testing. Also accepts JWT tokens from Supabase Auth for dashboard sessions.

Alternative: You can also use the x-api-key header instead of Authorization Bearer.

Path parameters
idstring · uuidRequired

Phone number UUID

Query parameters
actionstring · enumOptional

Set to release to soft-release the number (marks inactive, keeps record). Omit for hard delete (removes record entirely).

Possible values:
Header parameters
x-organization-idstring · uuidOptional

Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.

Responses
delete
/phone-numbers/{id}

Update phone number settings

patch
Authorizations
AuthorizationstringRequired

API key in format kros_live_xxxx for production or kros_test_xxxx for testing. Also accepts JWT tokens from Supabase Auth for dashboard sessions.

Alternative: You can also use the x-api-key header instead of Authorization Bearer.

Path parameters
idstring · uuidRequired

Phone number UUID

Header parameters
x-organization-idstring · uuidOptional

Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.

Body
endpointIdstring · uuid · nullableOptional

Endpoint to route calls to

allowInboundbooleanOptional

Allow inbound calls

allowOutboundbooleanOptional

Allow outbound calls

statusstring · enumOptionalPossible values:
Responses
patch
/phone-numbers/{id}

Last updated