When using the WhatsApp API to clone a Flow, you might encounter the error: Specify Endpoint Uri in Flow JSON.

You provided endpoint_uri and clone_flow_id which corresponds to a Flow with Flow JSON version below 3.0.

This occurs when the endpoint_uri parameter is included in a request for cloning a Flow that uses Flow JSON version below 3.0. The API requires using data_channel_uri instead of endpoint_uri in such cases.

Why Does This Error Occur?

WhatsApp API has different requirements for specifying the endpoint URI depending on the Flow JSON version:

  1. Flow JSON version 3.0 and above – Use endpoint_uri in the API request.

  2. Flow JSON version below 3.0 – Use data_channel_uri inside the Flow JSON instead of endpoint_uri.

If endpoint_uri is specified while cloning a Flow that uses an older JSON version, the API rejects the request.

How to Fix It?

To resolve this, update your request to comply with the correct JSON version requirements:

1. If Using Flow JSON Version 3.0 and Above

Include endpoint_uri normally:

{
  "clone_flow_id": "1234567890",
  "endpoint_uri": "https://example.com/api",
  "other_parameters": "value"
}

2. If Using Flow JSON Version Below 3.0

Remove endpoint_uri from the request and specify data_channel_uri in the Flow JSON:

{
  "clone_flow_id": "1234567890",
  "flow_json": {
    "data_channel_uri": "https://example.com/api"
  },
  "other_parameters": "value"
}

For more troubleshooting insights related to WhatsApp Business API, check out heltar.com/blogs.