Skip to main content
POST
Add a blocked number

Authorizations

Authorization
string
header
required

An org API key: Authorization: Bearer phk_…

Headers

Phonely-Organization
string | null

Optional. Must be the key's org.

Path Parameters

id
string
required

The agent's ID.

Body

application/json

A phone number to block.

phone_number
string
required

The number to block, in E.164, such as +14155550100.

Pattern: ^\+[1-9]\d{6,14}$

Response

Successful Response

The phone numbers an agent refuses calls from.

agent_id
string
required

The agent's ID.

object
string
default:agent_blocked_numbers
required

The type of this object, always agent_blocked_numbers.

Allowed value: "agent_blocked_numbers"
phone_numbers
string[]
required

Calls from these numbers are refused. In E.164, such as +14155550100, in ascending order.