Appearance
Utilities
FreshCreate chat token
Generate a Chat Token to be used to authenticate clients to the Chat Service.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Chat.
Learn more about API scopes.
Authentication
AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)Request
This endpoint expects an object.
ttlintegerRequired1-43200
The maximum time, in minutes, that the access token will be valid for. Between 1 and 43,200 (30 days).
channelsobjectRequired
User-defined channel names with read/write permissions. Max of 500 channels. Channel names cannot start with the reserved prefix sw_ and can be up to 250 characters.
member_idstringOptional<=250 characters
The unique identifier of the member. Up to 250 characters. If not specified, a random UUID will be generated.
stateobjectOptional
An arbitrary JSON object available to store stateful application information in. Must be valid JSON and have a maximum size of 2,000 characters.
Response
The request has succeeded.
tokenstring
The generated Chat Token.
Errors
400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
Get document
Retrieves a Datasphere Document by ID.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: DataSphere.
Learn more about API scopes.
Authentication
AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)Path parameters
idstringRequiredformat: "uuid"
Unique ID of a Document.
Response
The request has succeeded.
idstringformat: "uuid"
Unique ID of the Document.
filenamestring
Name of the Document.
statusenum
Status of the Document.
Allowed values:submittedin_progresscompletedfailed
tagslist of strings
Document tags.
chunking_strategyenum
Strategy used to chunk the document.
Allowed values:sentenceparagraphpagesliding
max_sentences_per_chunkinteger or null
Max Sentences per Chunk. Only present when chunking strategy is 'sentence', null otherwise.
split_newlinesboolean or null
Split on Newlines. Only present when chunking strategy is 'sentence', null otherwise.
overlap_sizeinteger or null
Overlap Size. Only present when chunking strategy is 'sliding', null otherwise.
chunk_sizeinteger or null
Chunk Size. Only present when chunking strategy is 'sliding', null otherwise.
number_of_chunksinteger
Number of Chunks in the Document.
chunks_uristring
URI path to the chunks for this document.
created_atdatetime
Document Creation Date.
updated_atdatetime
Document Update Date.
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error
For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt
# Request MFA token via call
POST https://%7BYour_Space_Name%7D.signalwire.com/api/relay/rest/mfa/call Content-Type: application/json
Sends a multi-factor authentication code via voice call.
#### Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Management_.
[Learn more about API scopes](/docs/platform/your-signalwire-api-space).
Reference: https://signalwire.com/docs/apis/rest/multi-factor-authentication/request-mfa-call
## OpenAPI Specification
```yaml openapi: 3.1.0 info: title: signalwire-rest version: 1.0.0 paths: /api/relay/rest/mfa/call: post: operationId: request-mfa-call summary: Request MFA token via call Sends a multi-factor authentication code via voice call.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Management_.
[Learn more about API scopes](/docs/platform/your-signalwire-api-space). tags: - subpackage_multiFactorAuthentication parameters: - name: Authorization in: header SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing
the word Basic followed by a space and a base64-encoded string of project_id:token.
The project ID will be used as the username and the API token as the password.
Example:
```
Authorization: Basic base64(project_id:token)
``` required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/MfaResponse' '401': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode401' '422': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.ValidationError' '500': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode500' requestBody: content: application/json: schema: $ref: '#/components/schemas/MfaRequest' servers: - url: https://%7BYour_Space_Name%7D.signalwire.com components: schemas: MfaRequest: type: object properties: to: type: string from: type: string The E164 number from your account to use as the origin of the message. SignalWire will use a special verified number if not specified. message: type: string default: 'Your Personal Authorization Code is:' Specify a custom message to send before the token. The message must fit within one segment; either 160 characters or 70 characters when using non-GSM symbols. token_length: type: integer default: 6 valid_for: type: integer default: 3600 The number of seconds the token is considered valid for. Defaults to 3600, with a maximum of 604800. max_attempts: type: integer default: 3 The number of allowed verification attempts, including the first one, from 1 to 20. Defaults to 3. allow_alphas: type: boolean default: false Set to true or false, whether to include letters or just numbers in the token. Defaults to false (numbers only). required: - to title: MfaRequest uuid: type: string format: uuid title: uuid MfaResponse: type: object properties: id: $ref: '#/components/schemas/uuid' success: type: boolean to: type: string channel: type: string required: - id - success - to - channel title: MfaResponse TypesStatusCodesStatusCode401Error: type: string enum: - Unauthorized title: TypesStatusCodesStatusCode401Error Types.StatusCodes.StatusCode401: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode401Error' required: - error title: Types.StatusCodes.StatusCode401 Types.StatusCodes.SpaceApiErrorItem: type: object properties: detail: type: string status: type: string title: type: string code: type: string required: - detail - status - title - code title: Types.StatusCodes.SpaceApiErrorItem Types.StatusCodes.ValidationError: type: object properties: errors: type: array items: $ref: '#/components/schemas/Types.StatusCodes.SpaceApiErrorItem' required: - errors title: Types.StatusCodes.ValidationError TypesStatusCodesStatusCode500Error: type: string enum: - Internal Server Error title: TypesStatusCodesStatusCode500Error Types.StatusCodes.StatusCode500: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode500Error' required: - error title: Types.StatusCodes.StatusCode500 securitySchemes: SignalWireBasicAuth: type: http scheme: basic SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing
the word Basic followed by a space and a base64-encoded string of project_id:token.
The project ID will be used as the username and the API token as the password.
Example:
```
Authorization: Basic base64(project_id:token)
```
```
## SDK Code Examples
```python import requests
url = "https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call"
payload = { "to": "+14043287382" } headers = { "Content-Type": "application/json" }
response = requests.post(url, json=payload, headers=headers, auth=("", ""))
print(response.json()) ```
```javascript const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call'; const credentials = btoa("😊;
const options = { method: 'POST', headers: { Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json' }, body: '{"to":"+14043287382"}' };
try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ```
```go package main
import ( "fmt" "strings" "net/http" "io" )
func main() {
url := "https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call"
payload := strings.NewReader("{\n \"to\": \"+14043287382\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.SetBasicAuth("", "") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
} ```
```ruby require 'uri' require 'net/http'
url = URI("https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call")
http = Net::HTTP.new(url.host, url.port) http.use_ssl = true
request = Net::HTTP::Post.new(url) request.basic_auth("", "") request["Content-Type"] = 'application/json' request.body = "{\n \"to\": \"+14043287382\"\n}"
response = http.request(request) puts response.read_body ```
```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest;
HttpResponse response = Unirest.post("https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"to\": \"+14043287382\"\n}") .asString(); ```
```php request('POST', 'https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call', [
'body' => '{
"to": "+14043287382"
}',
'headers' => [
'Content-Type' => 'application/json',
],
'auth' => ['', ''],
]);
echo $response->getBody(); ```
```csharp using RestSharp; using RestSharp.Authenticators;
var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"to\": \"+14043287382\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ```
```swift import Foundation
let credentials = Data(":".utf8).base64EncodedString()
let headers = [
"Authorization": "Basic \(credentials)",
"Content-Type": "application/json"
] let parameters = ["to": "+14043287382"] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/mfa/call")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data
let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } })
dataTask.resume() ```
List queue members
Returns a list of members in a queue.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice.
Learn more about API scopes.
Authentication
AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)Path parameters
queue_idstringRequiredformat: "uuid"
Unique ID of the queue.
Response
The request has succeeded.
linksobject
Pagination links.
Show 4 properties
datalist of objects
List of queue members.
Show 7 properties
Errors
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error
Get queue member
Retrieves the details of a queue member.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice.
Learn more about API scopes.
Authentication
AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)Path parameters
queue_idstringRequiredformat: "uuid"
Unique ID of the queue.
idstringRequiredformat: "uuid"
The unique identifier (ID) of the queue member.
Response
The request has succeeded.
call_idstringformat: "uuid"
The call ID of the queue member.
project_idstring
The ID of the project associated with this queue member.
queue_idstring
The ID of the queue associated with this queue member.
positioninteger
Queue member position in the queue.
uristring
The URL of this queue member.
wait_timeinteger
Wait time in seconds since the member was enqueued. If not yet enqueued, it will be null.
date_enqueueddatetime
When the queue member was last enqueued.
Errors
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error
For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt
# List short codes
GET https://%7BYour_Space_Name%7D.signalwire.com/api/relay/rest/short_codes
Returns a list of your short codes. The short codes are returned sorted by creation date, with the most recent appearing first.
#### Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Numbers_.
[Learn more about API scopes](/docs/platform/your-signalwire-api-space).
Reference: https://signalwire.com/docs/apis/rest/short-codes/list-short-codes
## OpenAPI Specification
```yaml openapi: 3.1.0 info: title: signalwire-rest version: 1.0.0 paths: /api/relay/rest/short_codes: get: operationId: list-short-codes summary: List short codes Returns a list of your short codes. The short codes are returned sorted
by creation date, with the most recent appearing first.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Numbers_.
[Learn more about API scopes](/docs/platform/your-signalwire-api-space). tags: - subpackage_shortCodes parameters: - name: filter_name in: query Filter by name. Returns all short codes containing this value as a substring. required: false schema: type: string - name: filter_number in: query Filter by number. Returns all short codes containing this value as a substring. required: false schema: type: string - name: page_number in: query required: false schema: type: integer default: 0 - name: page_size in: query required: false schema: type: integer default: 50 - name: page_token in: query required: false schema: type: string - name: Authorization in: header SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing
the word Basic followed by a space and a base64-encoded string of project_id:token.
The project ID will be used as the username and the API token as the password.
Example:
```
Authorization: Basic base64(project_id:token)
``` required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ShortCodeListResponse' '400': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode400' '401': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode401' '500': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode500' servers: - url: https://%7BYour_Space_Name%7D.signalwire.com components: schemas: PaginationLinks: type: object properties: self: type: string first: type: string next: type: string prev: type: string required: - self - first title: PaginationLinks uuid: type: string format: uuid title: uuid ShortCodeCapability: type: string enum: - sms - mms title: ShortCodeCapability ShortCodeNumberType: type: string enum: - shortcode title: ShortCodeNumberType ShortCodeType: type: string enum: - vanity - random title: ShortCodeType ShortCodeMessageHandler: type: string enum: - relay_context - laml_webhooks - laml_application title: ShortCodeMessageHandler HttpMethod: type: string enum: - GET - POST title: HttpMethod ShortCode: type: object properties: id: $ref: '#/components/schemas/uuid' name: type: - string - 'null' number: type: string capabilities: type: array items: $ref: '#/components/schemas/ShortCodeCapability' number_type: $ref: '#/components/schemas/ShortCodeNumberType' code_type: $ref: '#/components/schemas/ShortCodeType' country_code: type: string created_at: type: string updated_at: type: string next_billed_at: type: - string - 'null' lease_duration: type: - string - 'null' message_handler: oneOf: - $ref: '#/components/schemas/ShortCodeMessageHandler' - type: 'null' message_request_url: type: - string - 'null' The URL to send message requests to when using laml_webhooks handler. message_request_method: oneOf: - $ref: '#/components/schemas/HttpMethod' - type: 'null' message_fallback_url: type: - string - 'null' message_fallback_method: oneOf: - $ref: '#/components/schemas/HttpMethod' - type: 'null' message_laml_application_id: oneOf: - $ref: '#/components/schemas/uuid' - type: 'null' The ID of the LāML application to handle messages when using laml_application handler. message_relay_context: type: - string - 'null' required: - id - name - number - capabilities - number_type - code_type - country_code - created_at - updated_at - next_billed_at - lease_duration - message_handler - message_request_url - message_request_method - message_fallback_url - message_fallback_method - message_laml_application_id - message_relay_context title: ShortCode ShortCodeListResponse: type: object properties: links: $ref: '#/components/schemas/PaginationLinks' data: type: array items: $ref: '#/components/schemas/ShortCode' required: - links - data title: ShortCodeListResponse TypesStatusCodesStatusCode400Error: type: string enum: - Bad Request title: TypesStatusCodesStatusCode400Error Types.StatusCodes.StatusCode400: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode400Error' required: - error title: Types.StatusCodes.StatusCode400 TypesStatusCodesStatusCode401Error: type: string enum: - Unauthorized title: TypesStatusCodesStatusCode401Error Types.StatusCodes.StatusCode401: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode401Error' required: - error title: Types.StatusCodes.StatusCode401 TypesStatusCodesStatusCode500Error: type: string enum: - Internal Server Error title: TypesStatusCodesStatusCode500Error Types.StatusCodes.StatusCode500: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode500Error' required: - error title: Types.StatusCodes.StatusCode500 securitySchemes: SignalWireBasicAuth: type: http scheme: basic SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing
the word Basic followed by a space and a base64-encoded string of project_id:token.
The project ID will be used as the username and the API token as the password.
Example:
```
Authorization: Basic base64(project_id:token)
```
```
## SDK Code Examples
```python import requests
url = "https://{your_space_name}.signalwire.com/api/relay/rest/short_codes"
response = requests.get(url, auth=("", ""))
print(response.json()) ```
```javascript const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/short_codes'; const credentials = btoa("😊;
const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ```
```go package main
import ( "fmt" "net/http" "io" )
func main() {
url := "https://{your_space_name}.signalwire.com/api/relay/rest/short_codes"
req, _ := http.NewRequest("GET", url, nil)
req.SetBasicAuth("", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
} ```
```ruby require 'uri' require 'net/http'
url = URI("https://{your_space_name}.signalwire.com/api/relay/rest/short_codes")
http = Net::HTTP.new(url.host, url.port) http.use_ssl = true
request = Net::HTTP::Get.new(url) request.basic_auth("", "")
response = http.request(request) puts response.read_body ```
```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest;
HttpResponse response = Unirest.get("https://{your_space_name}.signalwire.com/api/relay/rest/short_codes") .basicAuth("", "") .asString(); ```
```php request('GET', 'https://{your_space_name}.signalwire.com/api/relay/rest/short_codes', [
'headers' => [
],
'auth' => ['', ''],
]);
echo $response->getBody(); ```
```csharp using RestSharp; using RestSharp.Authenticators;
var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/short_codes"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request); ```
```swift import Foundation
let credentials = Data(":".utf8).base64EncodedString()
let headers = ["Authorization": "Basic \(credentials)"]
let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/short_codes")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers
let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } })
dataTask.resume() ```
List video logs
List the available logs.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Video.
Learn more about API scopes.
Authentication
AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token.
The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.
Example:
Authorization: Basic base64(project_id:token)Query parameters
include_deletedbooleanOptionalDefaults to false
Include logs for deleted activity.
created_beforestringOptional
Return logs for activity prior to this date. Accepts date (YYYY-MM-DD) or ISO 8601 datetime formats.
created_onstringOptional
Return logs for activity on this date. Accepts date (YYYY-MM-DD) or ISO 8601 datetime formats.
created_afterstringOptional
Return logs for activity after this date. Accepts date (YYYY-MM-DD) or ISO 8601 datetime formats.
page_numberintegerOptional>=0Defaults to 0
Page number to return.
page_sizeintegerOptional1-1000Defaults to 50
Specify the number of results to return on a single page. The default page size is 50 and the maximum is 1000.
page_tokenstringOptional
Token for cursor-based pagination.
Response
The request has succeeded.
linksobject
Pagination links.
Show 4 properties
datalist of objects
List of logs.
Show 2 variants
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error
