Skip to main content
POST
/
api
/
v1
/
phone
/
mapping
Map agent or workflow to a phone line
curl --request POST \
  --url https://api.kupe.in/api/v1/phone/mapping \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "agent_id": "00000000-0000-0000-0000-000000000001",
  "phone_number_id": "00000000-0000-0000-0000-000000000002"
}
'
{}

Documentation Index

Fetch the complete documentation index at: https://kupe.in/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:YOUR_KUPE_API_KEY
required

Kupe dashboard API key for your user.

Body

application/json

Link exactly one of agent_id or workflow_id to a phone_number_id. Server-managed fields: When you authenticate with Bearer or x-api-key, you do not need to send webhook_url, config_source, or user_id. The API derives the inbound voice webhook from the deployment base URL, defaults the config source for standard PSTN/Twilio lines, and uses the authenticated user for ownership checks against the phone row. (Optional body overrides remain supported for internal or legacy clients.)

phone_number_id
string<uuid>
required
agent_id
string<uuid> | null
workflow_id
string<uuid> | null

Response

Mapping created

The response is of type object.