> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-content-gov.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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img2.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=5eaf29092f1e80aae0a039eb1296229f" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img3.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=76affffe39bce204c19cc2e674ac74ef" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img4.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=d36e9ae45532b472acc8749ae95f185d" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img5.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=cc397b8acd91d2eccff0dc5a813f2cac" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img6.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=fbbbdbf419aed1feb78a07e1f8d99ba2" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img7.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=e6fe921da7506265b15d5663de34a480" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img8.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=925a5b826e6a6decb7da9c2853f7d448" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img9.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=9d1937e084d3b8b04c5ec7d7541cb0a5" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img10.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=43be30efc5c1c68e6b1cbb4629a0d879" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img11.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=c47ca62483ae6d3aca4075d0a5c874f5" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img12.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=64d514ba2c2156cc0f5a89cad982f8ed" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img13.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=20f78389fca253108cfdbc842c08b9f8" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img14.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=60bbaef2542927ece523021fc2885277" 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-content-gov/uyUIYXvRKEknncMN/ai-for-service/integrations/actions/images/twilio-tem-img15.png?fit=max&auto=format&n=uyUIYXvRKEknncMN&q=85&s=1e1e4d6827ec3cf0d961957edbaf5234" alt="VA prompt - Enter phone number" width="490" height="843" data-path="ai-for-service/integrations/actions/images/twilio-tem-img15.png" />
