channels
whatsapp
whatsapp-service-management
whatsapp-flow-management

Generate WhatsApp Flow

Use this endpoint to automatically generate a WhatsApp Flow definition using AI, based on a natural language prompt. Provide a descriptive prompt (e.g., "Create a Static WhatsApp Flow to collect details like Name, Surname and email for our global event next week."). The AI will generate a flow configuration designed to match your intent. If you include a responseId from an earlier request, the prompt will be used to modify or refine the flow that was previously generated, so you can adjust and improve it step by step.

post/whatsapp/1/senders/{sender}/flows/generate

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token
    • or API key in header Authorization
    • or API key in header Authorization
    • or HTTP basic

Path parameters

senderstring required

Registered WhatsApp sender number. Must be in international format.

Request body

promptstring required

Prompt for flow generation.

responseIdstring

Optional identifier of a previous response. If provided, this request will update or modify the generatedFlow associated with the given responseId. Use this to refine or change an existing flow by referencing an earlier response.

Example request

{
  "prompt": "Flow that contains form with name, surname and email of the user.",
  "responseId": "12345"
}

Response

Generated whatsapp flow

originalPromptstring required

The prompt text used to generate this flow.

responseIdstring required

Unique identifier for this response. Use this value in future requests to reference generated flow.

generatedFlowobject required

The generated output corresponding to the provided prompt.

Example response

{
  "originalPrompt": "Flow that contains form with name, surname and email of the user.",
  "responseId": "12345"
}

Changes

No recorded changes to this operation across all 1 revision of this API.