API documentation

FlowLeads form API

With this API you build a FlowLeads form into an interface of your own. Every accepted submission is created as a lead in the inbox stage, with source, tags and assignment from the form settings. You read and edit the leads themselves through the lead endpoints of the FlowCRM API.

Forms
https://api.flowsuite.one/public/flowleads/forms/{key}
Hosted page
https://flowsuite.one/f/{key}

Paths apply to https://api.flowsuite.one. The previous address https://creativeskyline.de/api/… keeps working with no end date.

OpenAPI file for this module

Quick start

No API key
The form API is public. A form is addressed only by its random key (32 characters, lower-case letters and digits), which you find in the embed code of the form in FlowLeads under Lead forms. Responses never contain your team's data.
Spam protection is mandatory
Every submission needs the signed timestamp fl_ts from the form definition. It must be at least 3 seconds and at most 24 hours old. The hidden field homepage must stay empty; if it is filled in, the API answers with success but creates no lead.
Rate limits and size
Each visitor IP can submit a form 10 times per minute, and each form accepts 300 submissions per hour. Above that the API answers with HTTP 429 and Retry-After. A request may be at most 32 KB, otherwise the API answers with HTTP 413.
Allowed websites
If the form lists allowed websites, the Origin header (or, failing that, the Referer) must match one of them, otherwise the API answers with HTTP 403. Without entries, every website is allowed.

The easiest way: the snippet

For most websites the ready-made snippet from the form settings is all you need:

<div data-flowleads-form="FORM_KEY"></div>
<script src="https://flowsuite.one/js/flowleads-form.js" async></script>

It loads the definition, renders an accessible form and submits it. Without JavaScript, use the hosted page /f/{key}, or embed it as an iframe with ?embed=1. Forms with Cloudflare Turnstile are always embedded as an iframe, because the security check only runs on FlowSuite addresses.

Your own interface

1. Load the definition (GET), 2. show the fields, 3. submit with the timestamp from step 1 (POST). Unknown fields are dropped; the server checks required fields and formats against the definition.

Forms

GET
/public/flowleads/forms/{key}

Get the form definition

Returns the form's fields (key, label, type text, email, tel, textarea, select or checkbox, whether required, options, maximum length), a fresh signed timestamp, the names of the hidden field and of the timestamp, the submit address and the display mode: inline or iframe (with Turnstile). An unknown or deactivated key answers with HTTP 404.

Public, no key

curl -X GET "https://api.flowsuite.one/public/flowleads/forms/FORM_KEY" \
  -H "Accept: application/json"
<?php

$definition = json_decode(file_get_contents('https://api.flowsuite.one/public/flowleads/forms/FORM_KEY'), true);
const definition = await fetch('https://api.flowsuite.one/public/flowleads/forms/FORM_KEY')
    .then((response) => response.json());
import requests

definition = requests.get('https://api.flowsuite.one/public/flowleads/forms/FORM_KEY').json()
{
    "ok": true,
    "form": {
        "key": "FORM_KEY",
        "mode": "inline",
        "fields": [
            {
                "key": "name",
                "label": "Name",
                "type": "text",
                "required": true,
                "options": [],
                "max_length": 500
            },
            {
                "key": "email",
                "label": "E-Mail",
                "type": "email",
                "required": true,
                "options": [],
                "max_length": 255
            },
            {
                "key": "message",
                "label": "Nachricht",
                "type": "textarea",
                "required": false,
                "options": [],
                "max_length": 5000
            }
        ],
        "token": "TIMESTAMP.SIGNATURE",
        "honeypot": "homepage",
        "token_field": "fl_ts",
        "submit_url": "https://api.flowsuite.one/public/flowleads/forms/k3x9q2m7v1c8n4b6z0p5r2t7w9y1a3d5",
        "page_url": "https://flowsuite.one/f/k3x9q2m7v1c8n4b6z0p5r2t7w9y1a3d5",
        "iframe_url": "https://flowsuite.one/f/k3x9q2m7v1c8n4b6z0p5r2t7w9y1a3d5?embed=1",
        "labels": {
            "submit": "Absenden",
            "sending": "Wird gesendet …",
            "required": "Mit * markierte Felder sind Pflichtfelder.",
            "choose": "Bitte wählen",
            "error": "Die Anfrage konnte gerade nicht gesendet werden. Bitte versuchen Sie es später erneut."
        }
    }
}
POST
/public/flowleads/forms/{key}

Submit an enquiry

Submits an entry as JSON or as form data. On success a lead is created in the configured pipeline (source, tags and assignment from the form) and the response is {"ok": true, "message": ...}, plus redirect_url if a redirect is set. Errors answer with ok false: 403 for a website that is not allowed, 404 for an unknown or deactivated form, 413 above 32 KB, 422 for invalid fields (errors by field key), an expired or too recent timestamp or a failed Turnstile check, 429 when the rate limit is exceeded. If the form's AI spam check is on, the AI reads the submission and afterwards moves clear spam to the spam view.

Public, no key

Request body

Name Type Required Description
fields object
Required
The values by field key, e.g. {"name": "Erika Mustermann", "email": "erika@beispiel.de"}. Checkboxes send "1" or "0". Unknown keys are dropped.
fl_ts string
Required
The signed timestamp token from the form definition, at least 3 seconds and at most 24 hours old.
homepage string Hidden field against bots. Must stay empty or be left out.
cf-turnstile-response string Turnstile token, only for forms with Cloudflare Turnstile (hosted page or iframe).
curl -X POST "https://api.flowsuite.one/public/flowleads/forms/FORM_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Origin: https://www.example.com" \
  -d '{"fields": {"name": "Jane Doe", "email": "erika@example.com", "message": "Bitte um ein Angebot."}, "homepage": "", "fl_ts": "TOKEN_FROM_THE_DEFINITION"}'
<?php

$definition = json_decode(file_get_contents('https://api.flowsuite.one/public/flowleads/forms/FORM_KEY'), true);
sleep(3); // the signed timestamp must be at least 3 seconds old

$ch = curl_init($definition['form']['submit_url']);
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Accept: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'fields' => ['name' => 'Jane Doe', 'email' => 'erika@example.com'],
        'homepage' => '',
        'fl_ts' => $definition['form']['token'],
    ]),
]);
$result = json_decode(curl_exec($ch), true);
const definition = await fetch('https://api.flowsuite.one/public/flowleads/forms/FORM_KEY')
    .then((response) => response.json());

const response = await fetch(definition.form.submit_url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
    body: JSON.stringify({
        fields: { name: 'Jane Doe', email: 'erika@example.com', message: 'Bitte um ein Angebot.' },
        homepage: '',
        fl_ts: definition.form.token,
    }),
});
const result = await response.json(); // { ok, message }
import time
import requests

definition = requests.get('https://api.flowsuite.one/public/flowleads/forms/FORM_KEY').json()
time.sleep(3)  # the signed timestamp must be at least 3 seconds old

result = requests.post(definition['form']['submit_url'], json={
    'fields': {'name': 'Jane Doe', 'email': 'erika@example.com'},
    'homepage': '',
    'fl_ts': definition['form']['token'],
}).json()
{
    "ok": true,
    "message": "Vielen Dank! Ihre Anfrage ist bei uns eingegangen."
}