Skip to Content
WalidoDocs
Public APIForwardings

Create a forwarding

POST
/forwardings

Creates a new forwarding target inside a forwardings-type group. The referenced group_id must belong to your organization and have type: forwardings. When destination_type is sip, sip_uri is required. When destination_type is sip_refer, sip_refer_target is required. For a usable phone destination, provide a non-empty phone_number; current request validation also accepts an omitted or empty value, which produces a target that cannot be dialed.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key in the Authorization: Bearer <key> header. Keys are created in the Walido dashboard (Settings → API Keys).

Request Body

application/json
  1. body

When destination_type is sip, sip_uri must be provided. When destination_type is sip_refer, sip_refer_target must be provided. For a usable phone destination, provide a non-empty phone_number. The current validator permits it to be omitted or empty, but such a forwarding cannot be dialed.

group_id*string
Match^[a-f0-9]{24}$
type?string
Value in"personal""queue""fallback"
destination_type?string
Default"phone"
Value in"phone""sip""sip_refer"
gender?string

Optional gender value. Omit it or send an empty string when not specified.

job_title?string
first_name?string
last_name?string
email?string
competence?string
activation_keywords?array<>
Itemsitems <= 50
phone_number?string
sip_uri?string

SIP URI. Required when destination_type=sip.

Match^sip:
sip_username?|

Optional SIP auth username. Only allowed when destination_type=sip.

sip_password?|

Optional SIP auth password. Only allowed when destination_type=sip; never returned in responses.

Formatpassword
sip_refer_target?string

SIP REFER target. Required when destination_type=sip_refer.

Match^\S+$
Length1 <= length
active?boolean
fallback?boolean
timeout?integer
Range10 <= value <= 60
dtmf_sequence?array<>

Response Body

Created.

application/json
  1. response
data?
Example Request
curl -X POST 'https://api.walido.it/api/v1/forwardings' \  -H 'Content-Type: application/json' \  -d '{  "group_id": "65a1234567890abcdef01234",  "type": "queue",  "destination_type": "phone",  "phone_number": "+12025550123"}'
Example Response
{  "data": {    "id": "string",    "group_id": "string",    "group_name": "string",    "type": "personal",    "gender": "string",    "job_title": "string",    "first_name": "string",    "last_name": "string",    "email": "string",    "competence": "string",    "activation_keywords": [      "string"    ],    "destination_type": "phone",    "phone_number": "string",    "sip_uri": "string",    "sip_username": "string",    "sip_refer_target": "string",    "has_sip_credentials": true,    "identity_source": "employee",    "active": true,    "fallback": false,    "timeout": 30,    "dtmf_sequence": [      {        "action": "pause",        "duration": 0,        "digits": "string"      }    ],    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}