CXML Scripts

Create a cXML Script

Changed on

Creates a stored cXML document through the LamlBins route. The new script is also available as an addressable cXML Script resource. Use this form-encoded route when existing code expects a LamlBin SID, Create cXML Script for a JSON request, or Create cXML webhook when instructions come from your server.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice or Messaging or Fax.

Learn more about API scopes.

post/Accounts/{AccountSid}/LamlBins

Request

  • Base URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
  • URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/LamlBins
  • Auth
    HTTP basic

Path parameters

AccountSidstring uuid required

Universal Unique Identifier.

The unique identifier for the account this script is associated with.

Request body application/x-www-form-urlencoded

Namestring required

A friendly name given to the cXML script. Required.

Contentsstring

The cXML contents of the script. Must be valid XML with proper Mustache syntax if templates are used. Defaults to an empty Response element.

Example request

{
  "Name": "Death Star IVR",
  "Contents": "<Response><Say>Hello!</Say></Response>"
}

Response

Response returned when a cXML script is created.

sidstring uuid required

Universal Unique Identifier.

date_createdstring required

The date and time, in ISO 8601 format, the script was created.

date_updatedstring required

The date and time, in ISO 8601 format, the script was updated.

date_last_accessedstring nullable required

The date and time, in ISO 8601 format, the script was last accessed, or null if never accessed.

account_sidstring uuid required

Universal Unique Identifier.

namestring required

A friendly name given to the cXML script.

contentsstring required

The contents of the cXML script.

request_urlstring uri required

The unique URL to the raw contents of the cXML script.

num_requestsinteger required

The number of times this cXML script has been accessed.

api_versionstring required

The version of the SignalWire API.

uristring required

The URL of this resource.

Example response

{
  "date_created": "2019-11-26T20:00:00Z",
  "date_updated": "2019-11-26T20:00:00Z",
  "date_last_accessed": "2020-06-05T20:00:00Z",
  "name": "Death Star IVR",
  "contents": "<Response><Say>Hello!</Say></Response>",
  "request_url": "https://example.signalwire.com/laml-bins/5184b831-184f-4209-872d-ccdccc80f2f1",
  "num_requests": 42,
  "api_version": "2010-04-01",
  "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1"
}

Changes

    • breaking

      the response's property type changed from string to no type, and format from uuid to no format for status

    • breaking

      the response's property type changed from string to no type, and format from uuid to no format for status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • breaking

      added 'unevaluatedProperties' constraint to the request body

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status