> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contactswing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create SMS Action

> Create SMS notification actions with Twilio integration.

### Authorizations

<ParamField header="Authorization" type="string" required>
  Enter your ContactSwing JWT Bearer token.
</ParamField>

### Request Body

<ParamField body="name" type="string" required>
  Action display name. Example: `My SMS Action`
</ParamField>

<ParamField body="description" type="string" required>
  Action purpose. Example: `Trigger SMS when user requests messaging`
</ParamField>

<ParamField body="action_timing" type="string" required>
  When to trigger: `"DURING"`
</ParamField>

<ParamField body="webhook" type="object">
  Webhook configuration

  <ParamField body="mandatory" type="boolean">
    Require confirmation.
  </ParamField>
</ParamField>

<ParamField body="type" type="string" required>
  Action type: `"SEND_SMS"`
</ParamField>

<ParamField body="sms" type="object" required>
  SMS configuration object

  <ParamField body="to" type="object">
    Recipient phone numbers

    <ParamField body="value" type="string[]" required />
  </ParamField>

  <ParamField body="provider" type="string">
    SMS provider: `"TWILIO"`
  </ParamField>

  <ParamField body="from" type="string">
    Sender phone number. Example: `"+13465507166"`
  </ParamField>

  <ParamField body="cc" type="string[]">
    CC recipients `[]`
  </ParamField>

  <ParamField body="body" type="object">
    SMS message content
    <ResponseField name="value" type="string">Message template</ResponseField>

    <ParamField body="value" type="string" />
  </ParamField>

  <ParamField body="response_message_context" type="string" default="I’ve just sent you a text message. Please let me know if you received it.">
    Response message context. Example: `I’ve just sent you a text message. Please let me know if you received it.`
  </ParamField>
</ParamField>

### SMS Configuration

### Response

**201 Created** - SMS action created successfully

<ResponseField name="ctx_id" type="string">Request context ID</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="action_id" type="string">New SMS action ID</ResponseField>
  <ResponseField name="name" type="string">Action name</ResponseField>
  <ResponseField name="type" type="string">"SEND\_SMS"</ResponseField>
</ResponseField>

**400 Bad Request** - Invalid SMS configuration or missing fields

**401 Unauthorized** - Invalid token
