SMAO API Documentation
Public APIForwardings

Create a forwarding

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.

POST
/forwardings
AuthorizationBearer <token>

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

In: header

bodyunknown

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.smao.ai/api/v1/forwardings" \  -H "Content-Type: application/json" \  -d '{    "group_id": "string",    "sip_uri": null,    "sip_refer_target": null  }'
{
  "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": "Group not found"
  }
}
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "An unexpected error occurred."
  }
}