For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
        • Accounts
        • Applications
        • Calls
        • Conferences
        • Faxes
        • LAML Bins
          • create
          • delete
          • get
          • list
          • update
        • Messages
        • Phone Numbers
        • Queues
        • Recordings
        • Tokens
        • Transcriptions
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientCompatLAML Bins

create

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

delete

Next
Built with

Create a new LAML bin containing a cXML/LaML script.

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.

Response Example

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

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
9const lamlBin = await client.compat.lamlBins.create({
10 Name: "Greeting",
11 Contents:
12 '<?xml version="1.0" encoding="UTF-8"?>' +
13 "<Response><Say>Hello!</Say></Response>",
14});