Assign the agent that answers this number

PATCHhttps://server.heyrik.com/api/v1/phone-numbers/{id}

Path parameters

idRequired

Replace {id} in the request URL with the value for this resource.

Headers

AuthorizationstringRequired

Use Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.

Get your API key

Parameters 3

Fields documented for this operation. See the request example for placement and structure.

agent_idstringRequired

The agent id (from POST /agents) that should answer inbound calls. Send null to unassign. (`agency_id` also accepted.)

namestring

Rename the number in your dashboard.

activeboolean

false stops it receiving calls without releasing it.

Response

Explore the example values. This is not a complete response schema.

dataobject
Explore 5 properties
idstring

Example "sip_45723ca5"

phone_numberstring

Example "+918071578563"

agency_idstring

Example "agc_9f2a1c30"

directionstring

Example "both"

activeboolean

Example true

Error reference
PATCH/phone-numbers/{id}
cURL
curl -X PATCH https://server.heyrik.com/api/v1/phone-numbers/sip_45723ca5 \
  -H "Authorization: Bearer $HEYRIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "agent_id": "agc_9f2a1c30" }'
Response example
JSON
{
  "data": {
    "id": "sip_45723ca5",
    "phone_number": "+918071578563",
    "agency_id": "agc_9f2a1c30",
    "direction": "both",
    "active": true
  }
}

Illustrative examples · No live request is sent

Docs

Build sophisticated voice experiences with HeyRik.

© 2026 HeyRik · Support