DotsDocs
Flows

Create a Flow

Create a new Flow.

POST
/v2/flows

Create a new Flow.

Authorization

api_key
headerAuthorizationBasic <token>

Request Body

application/json
  1. body
steps*array<|>

A list of steps. Can either be a string or an object with additional properties. Example: A redirect step looks like {"name": "redirect", "redirect_url": "https://example.com"}

user_id?string

The user's id. If the user's ID is provided, the flow will be created in the authenticated state with a 15 minute expiration time unless the require_auth option is set to true.

Formatuuid
hide_go_to_dashboard_on_complete?boolean

Hide the "Go to dashboard" button on the flow UI. Defaults to false.

Defaultfalse
require_auth?boolean

Require the user to be authenticated to complete the flow. Defaults to false.

Defaultfalse
expired_redirect_link?string

URL to redirect to when the flow has expired.

Formaturi
metadata?|

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

Response Body

Created

application/json
  1. response
id?string

ID of the flow.

Formatuuid
created?string

Date that the flow was created.

Formatdate-time
user_id?|

ID of the user that has claimed the flow.

Formatuuid
steps?array<>

Array of steps in the flow.

completed_steps?array<>

Array of steps that have been completed in the flow.

payout_link_id?|

ID of the payout link associated with this flow, if one exists.

Formatuuid
link?string

URL to access the flow. Can be embedded in an iframe.

Formaturi
expired?boolean

Whether the flow has expired. Only returned when retrieving a single flow.

metadata?||

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

Example Request
curl -X POST 'https://api.dots.dev/api/v2/flows' \  -H 'Content-Type: application/json' \  -d '{  "steps": [    "compliance"  ]}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "created": "2019-08-24T14:15:22Z",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",  "steps": [    "compliance"  ],  "completed_steps": [    "compliance"  ],  "payout_link_id": "50673cb3-bf8b-4fdc-9f5f-114b168da4ab",  "link": "http://example.com",  "expired": true,  "metadata": "string"}