Workspaces

Put Voicemail Settings

Set what the AI voice agent does on an answering machine (admin+). ``leave_message`` needs an E.164 ``callback_number`` that reaches the company (and its opt-out). Whether a message is left also depends on the callee's country (e.g. US/Canadian numbers only with a toll-free callback number); otherwise the agent hangs up. 422 with the reason when invalid.

API key access

Needs the admin scope with an API key (ro_pat_...). A signed-in session uses the caller's role.
PUT/api/v1/workspaces/current/voicemail
AuthorizationBearer <token>

Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).

In: header

Header Parameters

X-Workspace-Id?string | null

Id of the workspace to act on (must be a member).

modeVoicemailMode

What the voice agent does on an answering machine (RO-043).

Value in"hang_up" | "leave_message"
callback_number?string | null

E.164 number the message gives for calling back and opting out (required for leave_message; US/Canadian callees only get a message when it is toll-free).

Lengthlength <= 16

Response Body

curl -X PUT "http://localhost:8000/api/v1/workspaces/current/voicemail" \  -H "X-Workspace-Id: string" \  -H "Content-Type: application/json" \  -d '{    "mode": "hang_up"  }'
{
  "mode": "hang_up",
  "callback_number": "string",
  "configured": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}