Skip to content

Assign a number to a studio

POST
/v1/numbers/{number}/assignments
curl --request POST \
--url https://api.caller9.app/v1/numbers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "studio_guid": "example", "role": "primary" }'

Routes inbound calls on this number to a studio, replacing any existing studio assignment and clearing any direct forward or SIP trunk routing. The studio must belong to the same organization. Requires a full-access key.

number
required
string format: uuid

Phone number ID (UUID), not the phone number itself.

Media typeapplication/json
object
studio_guid
required

ID of the studio to route to.

string
role

hotline calls are placed in the studio’s priority lane.

string
default: primary
Allowed values: primary hotline

The new assignment.

Media typeapplication/json
object
number_guid
required
string
studio_guid
required
string
role
required
string
Allowed values: primary hotline

Example

{
"role": "primary"
}

The request was invalid.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

Missing, invalid, expired or revoked API key.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

The key isn’t allowed to do this (e.g. a read-only key making a change).

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

Not found, or belongs to another organization.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

Too many requests for this API key. Retry after Retry-After seconds.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}
Retry-After
integer

Seconds until the rate-limit window resets.