numbers

Enable or disable inbound calls

Changed on

Turn inbound calls on or off for one number.

With enabled: false the number rejects incoming calls before they are answered: no call record is created and nothing is billed. Messaging in both directions and outbound calls are unaffected. The setting is kept when the number is attached to an agent or the agent is edited, so a number can hold an agent assignment for messaging only.

Pass the number's id as returned by the API, not the E.164 string. Numbers that cannot enforce the setting return 422: messaging-only lines, and most numbers that route calls to your own SIP trunk, which manage inbound calls on your platform instead.

patch/v1/numbers/{number_id}/inbound-calls

Request

  • Base URL
    https://api.agentphone.ai
  • URL
    https://api.agentphone.ai/v1/numbers/{number_id}/inbound-calls
  • Auth
    HTTP bearer

Path parameters

number_idstring required

Request body

enabledboolean required

false rejects inbound calls on this number; true answers them again.

Response

Successful Response

successboolean required
inboundCallsEnabledboolean required

Changes