# Dynamic API Workflows

Dynamic API workflow is a custom Chat Flow channel. It gets triggered by an incoming payload and lets you initiate engagement with your customers by, for example, sending a pre-approved WhatsApp template (using the [Send Template](/flow/action-nodes/send-template.md) node), or a rich link node, prompting them to act and trigger a standard workflow.&#x20;

Note that a Dynamic API workflow has no access to user facing nodes because it is an API builder.

**How to set up a Dynamic API Workflow:**&#x20;

**Build the workflow**&#x20;

1. Select Dynamic API flow under Flows from the menu on the left. A *Start* node and arrow will automatically appear on your canvas as the starting point for your flow.&#x20;

<figure><img src="/files/YcYXzSDjDDNLZ0ZfiWBr" alt=""><figcaption></figcaption></figure>

2. Build out your workflow. You can select from different Action nodes from the panel on the right onto the dotted placeholder node. You can also click on the + in the placeholder node to bring up a node menu.&#x20;
3. Select a [node ](https://guides.clickatell.com/flow/workflow-management/create-new-flow#nodes-the-building-blocks-of-your-workflow)on the canvas to configure/edit it in a panel on the right.&#x20;
4. Repeat this process as required to build out your workflow. Remember to save your changes to each node.&#x20;
5. There is a special end node to end the flow session. When you are at the end of your workflow, add the API end node.&#x20;

Note that there is no flow preview for Dynamic API workflow. You can use an API test tool to preview/test your Dynamic API workflow.&#x20;

**Set up the routing**

{% hint style="info" %}
Before a route for a Dynamic API can be added it needs to be onboarded for the entity. To activate a Dynamic API channel, you will need to [log a ticket](https://www.clickatell.com/contact-support/) with our Support team.&#x20;

Once the Dynamic API channel is added to the entity a new channel tab will appear under Chat Flow Routing.&#x20;
{% endhint %}

<figure><img src="/files/2W9GmVgLNMS44oHv3FWt" alt=""><figcaption></figcaption></figure>

1. Select Routing from the panel on the left. &#x20;
2. Configure the relevant fields. You are presented with several options to customize the endpoint.&#x20;
   1. HTTP METHOD - Chat Flow supports the following methods:

* GET
* POST
* DELETE
* PUT

&#x20;           b.  Allowed I.P Address Sources - This is a ';' delimited list of IP addresses that should be allowed to call your Dynamic API, e.g. 10.0.0.1;10.0.0.2.

* If you want to allow any IP address access you can use 0.0.0.0/0 for IPv4 and ::/0 for IPv6 e.g. 0.0.0.0/0;::/0 to match any IPv4 and IPv6 address.

&#x20;            c.  Asynchronous toggle.

* This is set to Synchronous by default. To add an asynchronous route/request, enable the toggle. Note that for asynchronous requests there is no feedback on the response, only acknowledgement that the request was received and processed.&#x20;

4. Select a flow and step. Save the route.&#x20;
5. Once the route is saved, Chat Flow will generate a unique URL for your route. A unique API token will also be generated.&#x20;

&#x20;

<figure><img src="/files/XasbhqNWaL1yFVfM8Lzv" alt=""><figcaption></figcaption></figure>

2.

&#x20;&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.clickatell.com/flow/workflow-management/create-new-flow/dynamic-api-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
