update

View as MarkdownOpen in Claude

Update parameters on an active call, such as the SWML document, URL, or status.

Unlike most calling methods, update() does not take a positional callId parameter. Pass all fields (including call identification) in a single object.

Request

paramsobjectRequired
An object of parameters that will be utilized by the active command.

Response

Call LegobjectRequired
Returned when the call is a standard PSTN, SIP, or WebRTC call.
OR
Fabric Subscriber Device LegobjectRequired

Returned when the call is a Fabric subscriber device leg. The status field is always null for this type.

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9await client.calling.update({
10 id: "call-id-xxx",
11 url: "https://example.com/new-call-handler",
12});