Skip to main content
POST
/
v2
/
flows
Create a Flow
curl --request POST \
  --url https://api.dots.dev/api/v2/flows \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "steps": [],
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "hide_go_to_dashboard_on_complete": false,
  "require_auth": false,
  "metadata": "<string>"
}
'
import requests

url = "https://api.dots.dev/api/v2/flows"

payload = {
"steps": [],
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hide_go_to_dashboard_on_complete": False,
"require_auth": False,
"metadata": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
steps: [],
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
hide_go_to_dashboard_on_complete: false,
require_auth: false,
metadata: '<string>'
})
};

fetch('https://api.dots.dev/api/v2/flows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dots.dev/api/v2/flows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'steps' => [

],
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'hide_go_to_dashboard_on_complete' => false,
'require_auth' => false,
'metadata' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.dots.dev/api/v2/flows"

payload := strings.NewReader("{\n \"steps\": [],\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hide_go_to_dashboard_on_complete\": false,\n \"require_auth\": false,\n \"metadata\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.dots.dev/api/v2/flows")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"steps\": [],\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hide_go_to_dashboard_on_complete\": false,\n \"require_auth\": false,\n \"metadata\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dots.dev/api/v2/flows")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"steps\": [],\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hide_go_to_dashboard_on_complete\": false,\n \"require_auth\": false,\n \"metadata\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "2023-11-07T05:31:56Z",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "steps": [],
  "completed_steps": [],
  "link": "<string>",
  "metadata": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
steps
(enum<string> | Step With Options · object)[]
required

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"}

The step name.

Available options:
compliance,
id-verification,
manage-payouts,
manage-payments,
payout,
background-check,
redirect,
pdf-form-fill
user_id
string<uuid>

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.

hide_go_to_dashboard_on_complete
boolean
default:false

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

require_auth
boolean
default:false

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

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

200 - application/json

OK

id
string<uuid>

ID of the flow.

created
string<date-time>

Date that the flow was created.

user_id
string<uuid> | null

ID of the user that has claimed the flow.

steps
enum<string>[]

Array of steps in the flow.

Available options:
compliance,
id-verification,
background-check,
manage-payments,
manage-payouts,
payout,
redirect,
pdf-form-fill
completed_steps
enum<string>[]

Array of steps that have been completed in the flow.

Available options:
compliance,
id-verification,
background-check,
manage-payments,
manage-payouts,
payout,
redirect,
pdf-form-fill

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

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.