Create

View as Markdown

Create a new cXML Application by making a POST request to the cXML Application resource.

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier for the account this script is associated with.

Request

NamestringRequired>=1 character
A friendly name given to the cXML script. Required.
ContentsstringOptional
The cXML contents of the script. Must be valid XML with proper Mustache syntax if templates are used. Defaults to an empty Response element.

Response

sidstringRequiredformat: "uuid"
The unique identifier of the cXML script on SignalWire.
date_createdstringRequired
The date and time, in ISO 8601 format, the script was created.
date_updatedstringRequired
The date and time, in ISO 8601 format, the script was updated.
date_last_accessedstring or nullRequired
The date and time, in ISO 8601 format, the script was last accessed, or null if never accessed.
account_sidstringRequiredformat: "uuid"
The unique identifier for the account this script is associated with.
namestringRequired
A friendly name given to the cXML script.
contentsstringRequired
The contents of the cXML script.
request_urlstringRequiredformat: "uri"
The unique URL to the raw contents of the cXML script.
num_requestsintegerRequired
The number of times this cXML script has been accessed.
api_versionstringRequired
The version of the SignalWire API.
uristringRequired
The URL of this resource.

Example

POST
/api/laml/2010-04-01/Accounts/:AccountSid/LamlBins
1import requests
2
3url = "https://your_space.signalwire.com/api/laml/2010-04-01/Accounts/AccountSid/LamlBins"
4
5payload = ""
6headers = {
7 "Authorization": "Basic <project_id>:<api_token>",
8 "Content-Type": "application/x-www-form-urlencoded"
9}
10
11response = requests.post(url, data=payload, headers=headers)
12
13print(response.json())