> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agentplatform-dev.mintlify.site/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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img2.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=1c9ce04d44d0b6c4ab3caed8093c6e84" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img3.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=1ea50ff44425b41b73ab1ffec84fc8e6" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img4.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=bf6961e39b1b1cb3b02ee9d087ade647" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img5.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=2d566a660dfe2e1d4dad47503d2d5b0e" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img6.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=aa4702b9e96af5557700ff8b1b23f2f6" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img7.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=502057c4130fd1077c0cd2d68217fce6" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img8.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=6e78dab288a1942cee7a8ee8eb0eff5a" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img9.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=94fdf07f2034464a1e4e9dbecab85b16" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img10.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=f609b968d6cc0a446feb70de2ce803b8" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img11.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=133c306a6c7c32aee83c51d022f67599" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img12.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=f0ea70f36cf843d1af97b88cdaab7717" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img13.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=9f0077ef02f012ea23d98de7f6fb44af" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img14.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=7e49a2e52966a64a56993de7b328108d" 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-agentplatform-dev/jdFqRaysQ72899lX/ai-for-service/integrations/actions/images/twilio-tem-img15.png?fit=max&auto=format&n=jdFqRaysQ72899lX&q=85&s=51b397d22ffb69949051618fd9d3fad9" alt="VA prompt - Enter phone number" width="490" height="843" data-path="ai-for-service/integrations/actions/images/twilio-tem-img15.png" />
