Skip to main content

CreateAgent creates a new agent/extension.

POST 

/api/v1/voice/agents

Creates an agent with the specified extension, type, and permissions. The extension must be unique within the organization.

Parameters

  • extension: Required, 3-20 digit extension number
  • name: Required, display name (2-255 characters)
  • type: Required, connection type (sip, webrtc, pstn)
  • password: Optional, SIP password (min 8 characters)
  • did_id: Optional, primary DID for outbound caller ID
  • user_id: Optional, link to auth service user

Asterisk Sync

On success, creates PJSIP endpoint in Asterisk realtime DB.

Errors

  • ALREADY_EXISTS: Extension already in use
  • INVALID_ARGUMENT: Invalid extension format or type
  • NOT_FOUND: DID or user not found
  • PERMISSION_DENIED: Caller lacks voice:agent:write permission

Request

Responses

A successful response.