Create Flow

Method: POST

Endpoint: https://api.assistable.ai/v2/create-flow

This endpoint initializes a new "Flow" (a workflow or logic path) for a specific location.

1. Authorizations

You must verify your identity to create a flow.

  • Header Name: Authorization

  • Value: Bearer <your_token_here>


2. Body Parameters

Unlike the Assistant endpoint which had many settings, this endpoint is very simple. It only needs to know where (which location) to build the flow.

Field

Type

Required?

Description

location_id

string

Yes

The unique ID of the location where this flow will be created.


3. Example Request (Code)

Copy the code below. Replace <token> with your API key and <string> with your Location ID.

Bash

curl --request POST \
--url https://api.assistable.ai/v2/create-flow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_12345"
}'

4. Success Response

If the flow is successfully created, you will receive a 201 status code and the new Flow ID.

JSON

{
"status": 201,
"data": {
"status": "created",
"id": "flow_98765"
}
}

5. Troubleshooting

  • Status 201: Success.

  • Status 400: You likely forgot to include the location_id.

  • Status 401: Invalid API Token.


Was this article helpful?