Create a Call
POSThttps://{Your_Space_Name}.signalwire.com/api/calling/calls
To create a new Call, you send a POST request to the Call resource with a payload including a dial command and additional nested params.
Request
Responses
- 201
- 401
- 404
- 422
The request has succeeded and a new resource has been created as a result.
Access is unauthorized.
The server cannot find the requested resource.
Client error
Authorization: http
name: BasicAuthtype: httpscheme: basic
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://{Your_Space_Name}.signalwire.com/api/calling/calls");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"command\": \"dial\",\n \"params\": {\n \"from\": \"sip:from-sip@example-112233445566.sip.signalwire.com\",\n \"to\": \"sip:from-sip@example-112233445567.sip.signalwire.com\",\n \"caller_id\": \"+1234567890\",\n \"fallback_url\": \"https://example.com/fallback\",\n \"url\": \"https://example.com/swml\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear