Skip to main content

Create SWML Script

POST 

/resources/swml_scripts

Create a new SWML Script

Request

Body

required

    name string
    Example: Say Hello
    contents string
    Example: {"version":"1.0.0","sections":{"main":[{"play":"say:Hello from SignalWire!"}]}}

Responses

A SWML Script

Schema

    id uuid
    Example: 993ed018-9e79-4e50-b97b-984bd5534095
    project_id uuid
    Example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780
    display_name string
    Example: Reception
    type string
    Example: swml_script
    created_at date-time
    Example: 2024-01-02T00:00:00Z
    updated_at date-time
    Example: 2024-01-02T00:00:00Z

    swml_script

    object

    id uuid

    A unique identifier for the SWML Script

    contents string
    Example: {"version":"1.0.0","sections":{"main":[{"play":"say:Hello from SignalWire!"}]}}
    request_url uri
    Example: https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e
    display_name string
    Example: Say Hello from SignalWire