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

# Using the Twilio Action Templates

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Use prebuilt Twilio Verify action templates to auto-create dialog tasks for sending SMS and managing verification.

**To access templates:**

1. Go to **Automation AI** > **Use Cases** > **Dialogs** and click **Create a Dialog Task**.

2. Under **Integration**, select **Twilio Verify**.

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img2.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=1bb35667d48ec3cb621c7101e8fe1b54" alt="Integration - Twilio Verify" width="791" height="913" data-path="ai-for-service/integrations/actions/images/twilio-tem-img2.png" />

3. If no integration is configured, click **Explore Integrations** to set one up. See [Actions Overview](/ai-for-service/integrations/overview#actions).

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img3.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=7cabff9841b9cdbda219f072aa2fe294" alt="Explore integrations" width="892" height="906" data-path="ai-for-service/integrations/actions/images/twilio-tem-img3.png" />

***

## Supported Actions

| Task               | Description                                                       | Method |
| ------------------ | ----------------------------------------------------------------- | ------ |
| Send SMS           | Sends an SMS to the registered phone number.                      | POST   |
| Start Verification | Starts the verification of the phone number registered in Twilio. | POST   |
| Verification Check | Checks whether the verification is successful or unsuccessful.    | POST   |

***

### Send SMS

1. Install the template from [Twilio Verify Action Templates](/ai-for-service/integrations/actions/configuring-the-twilio-action#step-2-install-the-twilio-verify-action-templates).

2. The **Send SMS** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img4.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=115024e159cf94fd2217016d1b8a0f46" alt="Send SMS dialog task is added" width="1649" height="910" data-path="ai-for-service/integrations/actions/images/twilio-tem-img4.png" />

   * **sendSms** - User intent to send SMS.

   * **accountSid**, **twilioNumber**, **receiverNumber**, **message** - Entity nodes for SMS details.

   * **sendSmsService** - Bot action service to send SMS. Click **Edit Request**:

     <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img5.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=16261799a70e4d26aa31494f851f3aa7" alt="Send SMS - Edit request" width="1919" height="854" data-path="ai-for-service/integrations/actions/images/twilio-tem-img5.png" />

     **Sample Request:**

     ```
     Body = {{message}}
     From = {{twilioNumber}}
     To = {{receiverNumber}}
     ```

     Click **+Add Response**:

     <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img6.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=a29d0d09f544bd8403a09d3403d3cdc8" alt="Send SMS - Add response" width="1919" height="854" data-path="ai-for-service/integrations/actions/images/twilio-tem-img6.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "body": "Sent from your Twilio trial account - Hi Kore",
       "num_segments": "1",
       "direction": "outbound-api",
       "from": "{{twilioNumber}}",
       "status": "queued",
       "account_sid": "AC6bae65f877f2488c902f57ce1fxxxxx"
     }
     ```

   * **sendSmsMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img7.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=5c7d3808abe2226e515fe0dfd47e4d79" alt="VA prompt to Send SMS" width="492" height="860" data-path="ai-for-service/integrations/actions/images/twilio-tem-img7.png" />

   <Note>You must add the country code before the receiver's phone number. For example, to send an SMS to a US number, add +1.</Note>

***

### Start Verification

1. Install the template from [Twilio Verify Action Templates](/ai-for-service/integrations/actions/configuring-the-twilio-action#step-2-install-the-twilio-verify-action-templates).

2. The **Start Verification** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img8.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=5f7233195493ca7acacbc21b0de20f14" alt="Start Verification dialog task is added" width="1649" height="910" data-path="ai-for-service/integrations/actions/images/twilio-tem-img8.png" />

   * **startVerification** - User intent to start verification.

   * **serviceSid**, **receiverNumber**, **channel** - Entity nodes for verification details.

   * **startVerificationService** - Bot action service to start verification. Click **Edit Request**:

     <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img9.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=5d35bd75deff61cc1cfc939750a4d36f" alt="Start Verification - Edit request" width="1914" height="850" data-path="ai-for-service/integrations/actions/images/twilio-tem-img9.png" />

     **Sample Request:**

     ```
     To = {{receiverNumber}}
     Channel = {{channel}}
     ```

     Click **+Add Response**:

     <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img10.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=b295eaf156235dfb9048627f42b58305" alt="Start Verification - Add response" width="1914" height="852" data-path="ai-for-service/integrations/actions/images/twilio-tem-img10.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "status": "pending",
       "account_sid": "AC6bae65f877f2488c902f57cexxxxx",
       "to": "+{{receiverNumber}}",
       "valid": false,
       "channel": "sms"
     }
     ```

   * **startVerificationMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img11.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=f5eb3dfa22a9524df85243477037377d" alt="VA prompt to Start Verification" width="500" height="852" data-path="ai-for-service/integrations/actions/images/twilio-tem-img11.png" />

***

### Verification Check

1. Install the template from [Twilio Verify Action Templates](/ai-for-service/integrations/actions/configuring-the-twilio-action#step-2-install-the-twilio-verify-action-templates).

2. The **Verification Check** dialog task is added with the following components:

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img12.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=5d512c6fe914af2d301f0d5f28059df9" alt="Verification Check dialog task is added" width="1650" height="890" data-path="ai-for-service/integrations/actions/images/twilio-tem-img12.png" />

   * **verificationCheck** - User intent to check verification.

   * **serviceSid**, **receiverNumber**, **code** - Entity nodes for verification check details.

   * **verificationCheckService** - Bot action service to check verification. Click **Edit Request**:

     <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img13.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=796a96928d3fa702baafaa644e21c870" alt="Verification Check - Edit request" width="1913" height="856" data-path="ai-for-service/integrations/actions/images/twilio-tem-img13.png" />

     **Sample Request:**

     ```
     To = {{receiverNumber}}
     Code = {{code}}
     ```

     Click **+Add Response**:

     <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img14.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=7cd22c5cd963a40607d1d7d45ba22fc7" alt="Verification Check - Add response" width="1913" height="856" data-path="ai-for-service/integrations/actions/images/twilio-tem-img14.png" />

     **Sample Response:**

     ```json theme={null}
     {
       "status": "approved",
       "account_sid": "AC6bae65f877f2488c902f57xxxxx",
       "to": "{{receiverNumber}}",
       "valid": true,
       "channel": "sms"
     }
     ```

   * **verificationCheckMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   <img src="https://mintcdn.com/koreai/6kNZlFFL7-veA_Xn/ai-for-service/integrations/actions/images/twilio-tem-img15.png?fit=max&auto=format&n=6kNZlFFL7-veA_Xn&q=85&s=8b3eb3e1db42eef002c1539134d80029" alt="VA prompt - Enter phone number" width="490" height="843" data-path="ai-for-service/integrations/actions/images/twilio-tem-img15.png" />
