Flow Message

Use this API to send message with a flow.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

**Note: **

  1. Eligibility depends not only on business verification, but also on WABA quality and messaging limits. To determine if a client is eligible to use Flows, you should attempt to send a Flow. If the account is not yet eligible, Meta recommends focusing on improving the quality of the current WABA (WhatsApp Business Account).
  2. Once the quality checks are successfully completed, your account will receive higher messaging limits and access to Flows.
  3. Use the recipient parameter only when BSUID is enabled for the app.
  4. When both to and recipient fields are used in the payload, the to field gets the priority.

After you create a WhatsApp Flow, you can send it. To send a message with a flow, we have introduced a new type of the Interactive Object called flow.

Request Parameters

KeyDescriptionValuesData TypesRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token.
APP IDApp ID to fetch the access token{{APP_ID}}StringRequiredThe Id should be a valid app Id of Gupshup
messaging_productMessaging productwhatsappStringRequired
recipient_typeRecipient typeindividualStringRequired
toDestination phone number where the message needs to be sent91785876xxxxStringRequired (Can be optional if BSUID is enabled for the app and recipient parameter is used instead)Must be a valid phone number
recipientDestination BSUID where the message needs to be sentIN.461449821882xxxxStringOptionalMust be a valid BSUID
typeMessaging typeinteractiveStringRequiredType should be interactive to send address message.
interactiveAdd sticker body

"interactive": {

"{{Flow_BODY}}"

}

ObjectRequiredKey should be interactive to send flow message.

Sample Request

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/v3/message' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "recipient_type": "individual",
    "messaging_product": "whatsapp",
    "to": "{{WHATSAPP_USER_PHONE_NUMBER}}",
		"recipient": "{{BSUID}}",
    "type": "interactive",
    "interactive": {
        "type": "flow",
        "header": {
            "type": "{{TYPE}}",
            "text": "{{FLOW_MSG_HEADER}}"
        },
        "body": {
            "text": "{{FLOW_MSG_BODY}}}"
        },
        "footer": {
            "text": "{{FLOW_MSG_FOOTER}}"
        },
        "action": {
            "name": "flow",
            "parameters": {
                "flow_message_version": "{{FLOW_MSG_VERSION}}",
                "flow_token": "{{FLOW_TOKEN}}",
                "flow_id": "{{FLOW_ID}}",
                "flow_cta": "{{FLOW_CTA}}",
                "flow_action": "{{FLOW_ACTION}}",
                "flow_action_payload": {
                    "screen": "{{SCREEN_NAME}}",
                    "data": {
                        "product_name": "{{PRODUCT_NAME}}",
                        "product_description": "{{DESCRIPTION}}",
                        "product_price": {{PRODUCT_PRICE}}
                    }
                }
            }
        }
    }
}'

Sample Response

{
    "messages": [
        {
            "id": "GUPSHUP_MESSAGE_ID"
        }
    ],
    "messaging_product": "whatsapp",
    "contacts": [
        {
            "input": "DESTINATION_PHONE_NO",
            "wa_id": "DESTINATION_PHONE_NO"
        }
    ]
}

Status Codes

Status CodeResponseComments
Success
200

{

"messages": [{"id": "GUPSHUP_MESSAGE_ID"
}
],
"messaging_product": "whatsapp",
"contacts": [
{
"input": "DESTINATION_PHONE_NO",
"wa_id": "DESTINATION_PHONE_NO"
}
]
}

Error
401

{

"status": "error","message": "Authentication Failed"}

When API key authentication fails
400

{

"message": "Callback Billing must be enabled for this API","status": "error"}

If Callback billing is not enabled for the app
400

{

"message": "Invalid App Details","status": "error"}

If app details are not found
Path Params
string
required

Unique identifier of the app.

Body Params
Headers
string
required

Your app token, please refer Get access token api to get the token from partner documentation.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json