SMAO API Documentation
Public APIForwardings

Update a forwarding

Partial update — only included fields are changed. group_id cannot be changed via this endpoint; create a new forwarding in the target group instead. When changing to destination_type: phone, also send a non-empty phone_number; the validator permits it to be omitted or empty, but the resulting target cannot be dialed.

PATCH
/forwardings/{forwarding_id}
AuthorizationBearer <token>

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

In: header

Path Parameters

forwarding_idstring
Match^[a-f0-9]{24}$
type?string
Value in"personal" | "queue" | "fallback"
destination_type?string
Value in"phone" | "sip" | "sip_refer"
gender?string
job_title?string
first_name?string
last_name?string
email?string
competence?string
activation_keywords?array<string>
Itemsitems <= 50
phone_number?string
sip_uri?string
Match^sip:
sip_username?string|null

Optional SIP auth username. Only allowed when the effective destination_type is sip.

sip_password?string|null

Optional SIP auth password. Only allowed when the effective destination_type is sip; never returned in responses.

Formatpassword
sip_refer_target?string

SIP REFER target. Required when changing destination_type to sip_refer.

active?boolean
fallback?boolean
timeout?integer
Range10 <= value <= 60
dtmf_sequence?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.smao.ai/api/v1/forwardings/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "65f8fa6f1a9d8e0012ab34cd",
    "group_id": "65a1234567890abcdef01234",
    "group_name": "Escalations",
    "type": "personal",
    "gender": "female",
    "job_title": "Head of Support",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "email": "[email protected]",
    "competence": "billing",
    "activation_keywords": [
      "string"
    ],
    "destination_type": "phone",
    "phone_number": "+491701234567",
    "sip_uri": "sip:[email protected]",
    "sip_username": "string",
    "sip_refer_target": "string",
    "has_sip_credentials": true,
    "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"
  }
}
{
  "error": {
    "code": "validation_failed",
    "message": "Validation failed"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing API key"
  }
}
{
  "error": {
    "code": "subscription_required",
    "message": "This feature is not available in your current subscription. Please upgrade to a higher plan"
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "No permission"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "An unexpected error occurred."
  }
}