Skip to navigation

Changes to the Rasen Developer API, newest first.

This date covers the production base URL, the voicemail_detected end reason and API versions 1.12.0, 1.13.0 and 1.14.0, newest first. A section about an API version names that version.

The production base URL moves to https://api.rasen.ai/v1

Rasen serves the production API at https://api.rasen.ai/v1. The base URL https://api.v2.rasen.ai/v1 is deprecated, with a shutdown date of 2027-02-11. Both hosts serve the same API, with the same keys, operations and data, and the paths after /v1 are the same.

What to do: Change the base URL of your integration to https://api.rasen.ai/v1 before 2027-02-11. See Deprecations.

Version 1.14.0: calls that the agent ended report agent_hangup

The API version moves from 1.13.0 to 1.14.0. end_reason on Call and CallListItem reports two values more precisely:

  • A phone or agent-session call that the agent ended reports agent_hangup. Before 1.14.0, many of these calls reported completed.
  • An answered call whose line failed reports line_dropped.

completed means that the call ended and nothing says who ended it.

getCall (GET /calls/{call_id}), listCalls (GET /calls), searchCalls (POST /calls/search) and the Call in webhook payloads carry the field.

What to do: If your integration reads completed as “the agent finished the call”, also accept agent_hangup. Handle line_dropped, and keep an end_reason value you do not know.

Find a voicemail with end_reason

A call that reached a voicemail reports end_reason voicemail_detected: the agent’s voicemail detection found a mailbox, or the carrier reported a machine. dial_outcome can still be answered, because the carrier connected the call before the mailbox answered. getCall, listCalls, searchCalls and the Call in webhook payloads carry end_reason.

What to do: Read end_reason, not dial_outcome, to find a call that reached a voicemail. See Build and publish an agent.

Version 1.13.0: read why a SIP trunk setup failed

The API version moves from 1.12.0 to 1.13.0. getSipTrunkSetup (GET /telephony/sip-trunk) and the sip.setup events of streamSipTrunkSetup (GET /telephony/sip-trunk/stream) add two nullable fields to the setup:

  • failed_step: the setup step that failed, or the address regeneration step that stopped.
  • failure_reason: a safe code for why the last setup job failed: provider_refused, provider_conflict, provider_unavailable, provider_auth_failed, provider_rate_limited, sip_trunk_not_ready or internal_error. It never holds provider text.

Each SIP operation adds failure_reason, with the same codes, for an operation in state failed. connectSipTrunk (POST /telephony/sip-trunk) is the explicit retry of a failed setup.

provisionPhoneNumber (POST /phone-numbers/{number_id}/provision) refuses a SIP trunk number while the setup is not ready, with 502 provider_unavailable and details.reason sip_trunk_not_ready. It contacts no carrier.

What to do: Read failed_step and failure_reason as nullable, and keep unknown values. Wait for state: ready before you provision a SIP number. See Connect a SIP trunk.

Version 1.12.0: add a tool that runs before an inbound call

The API version moves from 1.11.0 to 1.12.0. A webhook tool can run before an inbound call: send "timing": "pre_call" to createAgentTool (POST /agents/{agent_id}/tools), replaceAgentTool (PUT /agents/{agent_id}/tools/{tool_id}) or validateAgentTool (POST /agents/{agent_id}/tools/validate). The platform sends its request one time while the phone rings, and puts the response in the system prompt as data. An agent has at most one before-call tool. An omitted timing on create is during_call. The dynamic variable system__caller_id gives the tool the caller’s number.

A before-call tool takes only constant and dynamic_variable parameters, side_effect and retry_posture none, a deadline_ms from 500 to 10000 (3000 when omitted) and a max_response_bytes of at most 4096. New codes refuse a tool that breaks these rules: tool_pre_call_exists, tool_pre_call_llm_parameter, tool_pre_call_side_effect, tool_pre_call_bounds and tool_pre_call_name. publishAgent (POST /agents/{agent_id}/publish) can answer 422 with tool_pre_call_name and tool_body_on_get_or_delete.

A GET or DELETE tool sends no body: tool_body_on_get_or_delete refuses body parameters on such a tool on every tool write, validation and publish.

Tool reads and agent versions add timing to each webhook tool. A tool saved before this version reads during_call.

What to do: Nothing for existing tools. If a GET or DELETE tool has body parameters, move them to the query or the path before you publish again. To add a before-call tool, follow Add a before-call tool.

Version 1.12.0: tool runs and outcomes include timing

listCallToolOutcomes (GET /calls/{call_id}/tool-outcomes) and listAgentToolRuns (GET /agents/{agent_id}/tools/{tool_id}/runs) add the required field timing to each item: pre_call for the run of the agent’s before-call tool, and during_call for every other run. A pre_call run has no model arguments.

What to do: Keep unknown timing values. See Read tool call logs.

Version 1.12.0: workspace and call-start refusals

New codes refuse a request for the state of the workspace or the organization:

  • workspace_archived (403): the workspace is archived, so a key can neither read nor write.
  • workspace_view_only (403): the workspace is view-only, so a key can read and cannot write.
  • organization_paused (403), on createCall (POST /calls) and createAgentSession (POST /agent-sessions): calls from the organization are stopped by a staff pause.
  • workspace_concurrency_unallotted (403) and workspace_concurrency_full (429): the workspace has no share of concurrent calls, or its share is full.
  • admission_busy (503), on createCall and createAgentSession: admission could not decide the call in time.

A refused call start started and dialled nothing.

What to do: Follow the retry class of each code. See Workspace and call-start refusals.