---
title: "Create a cXML Script"
method: POST
path: "/Accounts/{AccountSid}/LamlBins"
tags: ["CXML Scripts"]
---

# Create a cXML Script

`POST /Accounts/{AccountSid}/LamlBins`

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](/docs/apis/rest/cxml-scripts/create-cxml-script) for a JSON request, or [Create cXML webhook](/docs/apis/rest/cxml-webhook/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](/docs/platform/your-signalwire-api-space).

## Path parameters

- `AccountSid` string, uuid, required — Universal Unique Identifier.

## Response `201`

Response returned when a cXML script is created.

- CxmlScript — cXML Script model.
  - `sid` string, uuid, required — Universal Unique Identifier.
  - `date_created` string, required — The date and time, in ISO 8601 format, the script was created.
  - `date_updated` string, required — The date and time, in ISO 8601 format, the script was updated.
  - `date_last_accessed` string, nullable, required — The date and time, in ISO 8601 format, the script was last accessed, or null if never accessed.
  - `account_sid` string, uuid, required — Universal Unique Identifier.
  - `name` string, required — A friendly name given to the cXML script.
  - `contents` string, required — The contents of the cXML script.
  - `request_url` string, uri, required — The unique URL to the raw contents of the cXML script.
  - `num_requests` integer, required — The number of times this cXML script has been accessed.
  - `api_version` string, required — The version of the SignalWire API.
  - `uri` string, required — The URL of this resource.

## Other responses

- `400` — The request was invalid or cannot be processed. Check the error details for more information.
- `401` — Authentication failed. Please verify your credentials and try again.
- `422` — The request could not be processed due to validation errors. Check the error details for more information.

## Changes

- **2026-05-12** `2916d5e3072e` — 2 breaking, 2 info
  - the `account_sid` response's property type/format changed from `string`/`uuid` to ``/`` for status `201`
  - the `sid` response's property type/format changed from `string`/`uuid` to ``/`` for status `201`
  - added `#/components/schemas/uuid` to the `account_sid` response property `allOf` list for the response status `201`
  - added `#/components/schemas/uuid` to the `sid` response property `allOf` list for the response status `201`
- **2026-05-12** `5344c0c93a4c` — 1 breaking, 4 info
  - added 'unevaluatedProperties' constraint to the request body
  - added 'unevaluatedProperties' constraint to the response body for the status `201`
  - added 'unevaluatedProperties' constraint to the response body for the status `400`
  - added 'unevaluatedProperties' constraint to the response body for the status `401`
  - …1 more
- **2026-03-04** `2e516ba2383f` — 1 breaking
  - response property `date_last_accessed` list-of-types was widened by adding types `null` to media type `application/json` of response `201`
- **2026-03-03** `ecafcc13dcc5` — 2 info
  - api tag `CXML Scripts` added
  - api tag `cXML Scripts` removed
- **2026-02-27** `8891278c1908` — 1 info
  - api operation id `create_cxml_application` removed and replaced with `create_cxml_script`

[Full history](https://skmtc.dev/signalwire/apis/compatibility-api/changes/Accounts/:AccountSid/LamlBins/post.md)

---

[API](https://skmtc.dev/signalwire/apis/compatibility-api.md) · [All operations](https://skmtc.dev/signalwire/apis/compatibility-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/signalwire/compatibility-api/revisions/723316346320/schema)
