# whatsapp/flows

## Overview

Flows allow you to create an in-app, multi-screen experience that a user receives and submits all within WhatsApp.

A business sends a Flow as part of an approved Content Template. The templated message contains a button to open the attached Flow in the WhatsApp UI. Within the Flow, you can include text, images, and several input components. End users respond with single-choice, multi-choice, toggle, short-text, long-text, and date-picker inputs.

### `whatsapp/flows` versus `twilio/flows`

If you build your Flows in WhatsApp, use Flows outside of an approved template, or use endpoint functionality, you'll need to use the `whatsapp/flows` content type. To do this, create your Flows in the Meta UI and send using the Twilio Content API. Compare with [`twilio/flows`](/docs/content/flows) that you create with the Twilio Content Template Builder.

> \[!WARNING]
>
> Flows aren't designed to transmit HIPAA Eligible Service or PCI data. Don't use them in workflows that require HIPAA or PCI compliance.
>
> If you need to transmit sensitive information, use [Message Redaction](/docs/messaging/guides/privacy-message-redaction). Message Redaction isn't yet compatible with Studio, Proxy Service, or Functions. Don't send Flows that contain sensitive information through these products or services.

### Supported options for end users

* Send a multi-screen form that includes several questions.
* Collect text input, selections, and picker answers.
* Include images, links, and clarifying text on each screen.
* Send Flows with any [component](https://developers.facebook.com/docs/whatsapp/flows/reference/components) that WhatsApp supports.
* Send Flows with an [endpoint integration](https://developers.facebook.com/docs/whatsapp/flows/guides/implementingyourflowendpoint/) to pass data between your back-end services and WhatsApp during the interaction.

## Supported channel

WhatsApp

## Message preview

| ![Twilio Demo chat showing a response with a helpful link and notification.](https://docs-resources.prod.twilio.com/e64e868d070aaa42b0ba1da5fc34799aa56d4b3e2abd18571b6e7a2668ef3f2f.jpg) | ![Survey form with questions on finding method and favorite number, includes options and a complete button.](https://docs-resources.prod.twilio.com/a06480b6bc50baacd0adca7fd3561f6db3141d11d826c3cf8d53390d9f3c47c8.jpg) |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Create a Flow with Meta

To create Flows with Meta, you'll need the following:

* A WhatsApp sender through Twilio
* A [WhatsApp Business Account (WABA)](/docs/whatsapp/tutorial/whatsapp-business-account)

You can create a Flow with the WhatsApp Manager UI or programmatically with Meta's Flow API.

**Tip**: Use the [Flow playground in the Meta developer docs](https://developers.facebook.com/docs/whatsapp/flows/playground) to preview and configure your Flow. You can copy the JSON for use with either the WhatsApp Manager UI or the the Flows API below.

## WhatsApp Manager

1. Follow the steps to [open WhatsApp Manager](https://developers.facebook.com/docs/whatsapp/overview/business-accounts/#access-your-waba-whatsapp-manager).
2. In the **Account Tools** menu, click **Flows**.
3. Click **Create Flow**.
4. Follow the steps to [create a new Flow](https://www.youtube.com/watch?v=gx_QGaSLoOA). Record the `id` of the first screen that you want to display.
5. To publish your new Flow, click **Publish**.
6. In the **Account Tools** menu, click **Flows**.
7. Copy the Flow ID of the Flow that you've just created.

## Flow API

1. Construct the [Flow JSON](https://developers.facebook.com/docs/whatsapp/flows/reference/flowjson) for your Flow. Record the `id` of the first screen that you want to display.
2. Make an [API request to create and publish a Flow](https://developers.facebook.com/docs/whatsapp/flows/reference/flowsapi#create).
3. The API response contains the `id` of the new Flow and the `id` of the first screen. Record both of these values.

## Attach a Flow to a `whatsapp/flows` Content Template

To send a Flow that you made with Meta, you need to create a `whatsapp/flows` Content Template with the Flow's ID using the Twilio Content API.

From the creation steps above, ensure you've recorded the following values:

* The unique ID of the Flow
* The ID of the first screen (page) of the Flow

You'll need these for the call to the Content API to create the `whatsapp/flow` Content Template.

### Data parameters

Your call to the Content API must contain the following parameters to create a `whatsapp/flows` Content Template.

| Parameter                     | Type    | Required | [Variable support](/docs/content/using-variables-with-content-api) | Description                                                                                                                                      |
| ----------------------------- | ------- | -------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `body`                        | string  | Yes      | Yes                                                                | Text of the templated message that launches the Flow. Maximum length: 1,024 characters                                                           |
| `subtitle`                    | string  | No       | No                                                                 | Optional subtitle shown in the message footer. Maximum length: 80 characters                                                                     |
| `media_url`                   | string  | No       | Yes                                                                | Media included in the initial Flow message. Supports `.png`, `.jpeg`, `.mp4`, and `.pdf`. The domain must be static; the path can be a variable. |
| `flow_id`                     | string  | Yes      | No (approved templates) Yes (in-session without approval)          | Identifier for the Flow in WhatsApp.                                                                                                             |
| `flow_token`                  | string  | No       | Yes (must be a variable)                                           | Unique identifier for the specific Flow interaction. Provide a new value for each send request.                                                  |
| `flow_first_page_id`          | string  | No       | No                                                                 | Identifier of the first page to display in the Flow interaction.                                                                                 |
| `is_flow_first_page_endpoint` | Boolean | No       | No                                                                 | Set to `true` if an endpoint determines the first page. Defaults to `false`.                                                                     |

## Create and submit a `whatsapp/flows` Content Template for approval

Content Templates API - Create a WhatsApp Flow Template

```bash
curl -X POST 'https://content.twilio.com/v1/Content' \
-H 'Content-Type: application/json' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \
-d '{
   "friendly_name": "info_flow",
   "language": "en","variables": {
      "1": "abcd1234"
    },
    "types": {
      "whatsapp/flows": {
        "body": "Please take five minutes to answer this survey",
        "button_text": "Begin survey",
        "flow_id": "1232445823264765",
        "flow_token": "{{1}}",
        "flow_first_page_id": "QUESTION_ONE"
      }
    }
}'
```

```json
{
    "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "date_created": "2025-09-12T23:49:53Z",
    "date_updated": "2025-09-12T23:49:53Z",
    "friendly_name": "info_flow",
    "language": "en",
    "links": {
        "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp",
        "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests"
    },
    "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "types": {
        "whatsapp/flows": {
            "body": "Please take five minutes to answer this survey",
            "button_text": "Begin survey",
            "flow_first_page_id": "QUESTION_ONE",
            "flow_id": "1232445823264765",
            "flow_token": "{{1}}",
            "is_flow_first_page_endpoint": false,
            "media_url": null,
            "subtitle": null
        }
    },
    "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "variables": {
        "1": "abcd1234"
    }
}
```

### Create a WhatsApp approval request for a `whatsapp/flows` Content Template

After creating your `whatsapp/flows` Content Template, you'll need to send it for WhatsApp approval before sending it to your users outside of a messaging window.

Send a Flow for approval by Meta

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createApprovalCreate() {
  const approvalCreate = await client.content.v1
    .contents("HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .approvalCreate.create({
      name: "my_whatsapp_flow_template",
      category: "MARKETING",
    });

  console.log(approvalCreate.name);
}

createApprovalCreate();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
from twilio.rest.content.v1.content import ApprovalCreateList

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

approval_create = client.content.v1.contents(
    "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).approval_create.create(
    content_approval_request=ApprovalCreateList.ContentApprovalRequest(
        {"name": "my_whatsapp_flow_template", "category": "MARKETING"}
    )
)

print(approval_create.name)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Content.V1.Content;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var approvalCreate = await ApprovalCreateResource.CreateAsync(
            contentApprovalRequest: new ApprovalCreateResource.ContentApprovalRequest.Builder()
                .WithName("my_whatsapp_flow_template")
                .WithCategory("MARKETING")
                .Build(),
            pathContentSid: "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(approvalCreate.Name);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.content.v1.content.ApprovalCreate;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

        ApprovalCreate.ContentApprovalRequest contentApprovalRequest = new ApprovalCreate.ContentApprovalRequest();
        contentApprovalRequest.setName("my_whatsapp_flow_template");
        contentApprovalRequest.setCategory("MARKETING");

        ApprovalCreate approvalCreate =
            ApprovalCreate.creator("HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", contentApprovalRequest).create();

        System.out.println(approvalCreate.getName());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	content "github.com/twilio/twilio-go/rest/content/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &content.CreateApprovalCreateParams{}
	params.SetContentApprovalRequest(content.ContentApprovalRequest{
		Name:     "my_whatsapp_flow_template",
		Category: "MARKETING",
	})

	resp, err := client.ContentV1.CreateApprovalCreate("HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Name != nil {
			fmt.Println(*resp.Name)
		} else {
			fmt.Println(resp.Name)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;
use Twilio\Rest\Content\V1\Content\ApprovalCreateModels;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$approval_create = $twilio->content->v1
    ->contents("HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->approvalCreate->create(
        ApprovalCreateModels::createContentApprovalRequest([
            "name" => "my_whatsapp_flow_template",
            "category" => "MARKETING",
        ])
    );

print $approval_create->name;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

approval_create = @client
                  .content
                  .v1
                  .contents('HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                  .approval_create
                  .create(
                    content_approval_request: {
                      'name' => 'my_whatsapp_flow_template',
                      'category' => 'MARKETING'
                    }
                  )

puts approval_create.name
```

```bash
# This endpoint is not currently supported by the Twilio CLI. You can open an issue to request it on https://github.com/twilio/twilio-cli/issues
  # For an alternative low-code solution, check out https://www.twilio.com/docs/openapi/using-twilio-postman-collections
```

```bash
CONTENT_APPROVAL_REQUEST_OBJ=$(cat << EOF
{
  "name": "my_whatsapp_flow_template",
  "category": "MARKETING"
}
EOF
)
curl -X POST "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp" \
--json "$CONTENT_APPROVAL_REQUEST_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "name": "my_whatsapp_flow_template",
  "category": "MARKETING",
  "content_type": "twilio/location",
  "status": "unsubmitted",
  "rejection_reason": "",
  "allow_category_change": true
}
```

### Fetch an approval status for a `whatsapp/flows` Content Template

You can check the status of a Content Template submitted for WhatsApp approval:

Fetch content and approvals

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listContentAndApprovals() {
  const contentAndApprovals = await client.content.v1.contentAndApprovals.list({
    limit: 20,
  });

  contentAndApprovals.forEach((c) => console.log(c.dateCreated));
}

listContentAndApprovals();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

content_and_approvals = client.content.v1.content_and_approvals.list(limit=20)

for record in content_and_approvals:
    print(record.date_created)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Content.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var contentAndApprovals = await ContentAndApprovalsResource.ReadAsync(limit: 20);

        foreach (var record in contentAndApprovals) {
            Console.WriteLine(record.DateCreated);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.content.v1.ContentAndApprovals;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<ContentAndApprovals> contentAndApprovals = ContentAndApprovals.reader().limit(20).read();

        for (ContentAndApprovals record : contentAndApprovals) {
            System.out.println(record.getDateCreated());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	content "github.com/twilio/twilio-go/rest/content/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &content.ListContentAndApprovalsParams{}
	params.SetLimit(20)

	resp, err := client.ContentV1.ListContentAndApprovals(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].DateCreated != nil {
				fmt.Println(*resp[record].DateCreated)
			} else {
				fmt.Println(resp[record].DateCreated)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$contentAndApprovals = $twilio->content->v1->contentAndApprovals->read(20);

foreach ($contentAndApprovals as $record) {
    print $record->dateCreated?->format("r");
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

content_and_approvals = @client
                        .content
                        .v1
                        .content_and_approvals
                        .list(limit: 20)

content_and_approvals.each do |record|
   puts record.date_created
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:content:v1:content-and-approvals:list
```

```bash
curl -X GET "https://content.twilio.com/v1/ContentAndApprovals?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "contents": [],
  "meta": {
    "page": 0,
    "page_size": 10,
    "first_page_url": "https://content.twilio.com/v1/ContentAndApprovals?PageSize=10&Page=0",
    "previous_page_url": null,
    "next_page_url": null,
    "url": "https://content.twilio.com/v1/ContentAndApprovals?PageSize=10&Page=0",
    "key": "contents"
  }
}
```

## Send your `whatsapp/flows` Content Template

Sending a `whatsapp/flows` Content Template is the same process as sending other Content Templates using the Programmable Messaging APIs. For detailed steps, see [Send templates created with the Content Template Builder](/docs/content/send-templates-created-with-the-content-template-builder).

Send a WhatsApp Flow Content Template message

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createMessage() {
  const message = await client.messages.create({
    contentSid: "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    from: "whatsapp:+14155238886",
    to: "whatsapp:+15017122661",
  });

  console.log(message.sid);
}

createMessage();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

message = client.messages.create(
    from_="whatsapp:+14155238886",
    to="whatsapp:+15017122661",
    content_sid="HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
)

print(message.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var message = await MessageResource.CreateAsync(
            from: new Twilio.Types.PhoneNumber("whatsapp:+14155238886"),
            to: new Twilio.Types.PhoneNumber("whatsapp:+15017122661"),
            contentSid: "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(message.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.type.PhoneNumber;
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Message;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Message message = Message
                              .creator(new com.twilio.type.PhoneNumber("whatsapp:+15017122661"),
                                  new com.twilio.type.PhoneNumber("whatsapp:+14155238886"),
                                  "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                              .create();

        System.out.println(message.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &api.CreateMessageParams{}
	params.SetFrom("whatsapp:+14155238886")
	params.SetTo("whatsapp:+15017122661")
	params.SetContentSid("HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")

	resp, err := client.Api.CreateMessage(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$message = $twilio->messages->create(
    "whatsapp:+15017122661", // To
    [
        "from" => "whatsapp:+14155238886",
        "contentSid" => "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    ]
);

print $message->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

message = @client
          .api
          .v2010
          .messages
          .create(
            from: 'whatsapp:+14155238886',
            to: 'whatsapp:+15017122661',
            content_sid: 'HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
          )

puts message.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:core:messages:create \
   --from whatsapp:+14155238886 \
   --to whatsapp:+15017122661 \
   --content-sid HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json" \
--data-urlencode "From=whatsapp:+14155238886" \
--data-urlencode "To=whatsapp:+15017122661" \
--data-urlencode "ContentSid=HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "api_version": "2010-04-01",
  "body": "Hello! 👍",
  "date_created": "Thu, 24 Aug 2023 05:01:45 +0000",
  "date_sent": "Thu, 24 Aug 2023 05:01:45 +0000",
  "date_updated": "Thu, 24 Aug 2023 05:01:45 +0000",
  "direction": "outbound-api",
  "error_code": null,
  "error_message": null,
  "from": "whatsapp:+14155238886",
  "num_media": "0",
  "num_segments": "1",
  "price": null,
  "price_unit": null,
  "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "status": "queued",
  "subresource_uris": {
    "media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
  },
  "to": "whatsapp:+15017122661",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
}
```

## Receive a Flow submission

When a user submits a Flow in WhatsApp, Twilio sends a webhook request to the messaging endpoint that you've configured on your WhatsApp sender. The `InteractiveData` field contains the names and user-submitted values for the Flow's structured data components.

You can also prepare a follow-up experience for the user, such as a message to indicate that you have received the completed flow.

### Flow-specific webhook fields

| Field             | Description                               |
| ----------------- | ----------------------------------------- |
| `InteractiveData` | User-provided information in JSON format. |
