CCareLeadFlow

CARELEADFLOW · USER GUIDE

From website enquiry
to your team's next step.

A practical guide to creating your workspace, connecting website forms, and keeping every lead moving.

Quick startCreate your account → wait for company approval → create a form → copy its API URL → send a test submission → assign and follow up.

1. Get started

  1. Create an account with your name, work email, phone number, and company name.
  2. Your company workspace will show as awaiting approval until its review is complete.
  3. Once approved, sign in and use the company selector in the top bar to switch between the companies you belong to. Each view displays only the selected company's data.

2. Create a website form

  1. Open Website forms and enter a form name.
  2. Add fields using + Add field. For each field, choose a label, answer type, and whether it is required.
  3. Choose the default status set, enter a custom ordered status set, or copy the statuses from another form in your company. New submissions start at the first status.
  4. CareLeadFlow generates stable field keys from labels. For example, “Full name” becomes full_name. Duplicate labels get unique suffixes.
  5. Create the form and copy its API endpoint. You can revoke it any time by deleting the form; its saved submissions will also be deleted.

Set a form's website source to website automatically through the endpoint. Manually added leads are marked manual; spreadsheet imports are marked import.

3. Connect your website

Each form has its own HTTPS endpoint. Use the complete URL shown on that form's page. The endpoint accepts regular HTML form posts (application/x-www-form-urlencoded or multipart) and JSON requests. Send a POST with the exact generated field keys; the form token identifies the company and form, so never send company IDs, status, or assignment values.

For a same-origin HTML form, the browser submits normally. For JavaScript apps, send JSON or FormData. Some browsers restrict cross-origin requests; when that occurs, submit from your website backend (recommended) or configure your website to use a same-origin server proxy.

Record campaign source (UTM)

Optionally pass utm_source or source metadata with the lead. For example, append ?utm_source=facebook to the generated endpoint, add a hidden utm_source field to your website form, or include {"utm_source":"facebook"} in the JSON body. The API saves that value in the lead's Source column (up to 150 characters); if omitted or blank, source is website. Precedence is query utm_source, query source, body utm_source, then body source. Other campaign values such as utm_medium and utm_campaign are not currently stored separately. Source is descriptive attribution only, not a trusted identity value.

cURL with UTM source

curl -X POST "YOUR_FORM_ENDPOINT?utm_source=facebook" \\
  -H "Content-Type: application/json" \\
  -d '{"full_name":"Alex Morgan","email":"alex@example.com"}'

Alternatively, put "utm_source":"facebook" beside the configured form fields in the JSON body, or add <input type="hidden" name="utm_source" value="facebook"> to an HTML form.

Keep form tokens privateThe URL contains a token that allows submissions to that form. Do not publish it in source code repositories. If it leaks, delete the form and create a replacement.

4. Integration examples

Replace YOUR_FORM_ENDPOINT with the URL displayed for your form. These examples use fields named full_name, email, and phone; change them to the generated keys shown in the form's integration guide. For exact, form-specific code, copy an example directly from your Forms page.

HTML form

<form method="post" action="YOUR_FORM_ENDPOINT">
  <label>Full name
    <input name="full_name" autocomplete="name" required>
  </label>
  <label>Email
    <input type="email" name="email" autocomplete="email" required>
  </label>
  <label>Phone
    <input type="tel" name="phone" autocomplete="tel">
  </label>
  <button type="submit">Send enquiry</button>
</form>

Browser JavaScript / TypeScript (fetch JSON)

const response = await fetch("YOUR_FORM_ENDPOINT", {
  method: "POST",
  headers: { "Content-Type": "application/json", "Accept": "application/json" },
  body: JSON.stringify({
    full_name: "Alex Morgan",
    email: "alex@example.com",
    phone: "+1 555 0100"
  })
});
const result = await response.json();
if (!response.ok) throw new Error(result.error?.message ?? "Submission failed");
console.log(result.message, result.submission_id);

Node.js (built-in fetch)

const response = await fetch("YOUR_FORM_ENDPOINT", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ full_name: "Alex Morgan", email: "alex@example.com" })
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result.error));
console.log(result);

PHP (cURL)

<?php
$payload = json_encode([
    'full_name' => 'Alex Morgan',
    'email' => 'alex@example.com',
    'phone' => '+1 555 0100',
], JSON_THROW_ON_ERROR);
$curl = curl_init('YOUR_FORM_ENDPOINT');
curl_setopt_array($curl, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $payload,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Accept: application/json'],
    CURLOPT_RETURNTRANSFER => true,
]);
$body = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
    throw new RuntimeException('Lead submit failed: ' . curl_error($curl));
}
$result = json_decode($body, true, flags: JSON_THROW_ON_ERROR);
curl_close($curl);

Python (standard library)

import json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

payload = json.dumps({
    "full_name": "Alex Morgan",
    "email": "alex@example.com",
}).encode()
request = Request(
    "YOUR_FORM_ENDPOINT", data=payload, method="POST",
    headers={"Content-Type": "application/json", "Accept": "application/json"},
)
try:
    with urlopen(request, timeout=15) as response:
        result = json.loads(response.read())
        print(result["message"], result["submission_id"])
except HTTPError as error:
    print("Submission failed:", error.code, error.read().decode())

Java (built-in HttpClient, Java 11+)

var client = java.net.http.HttpClient.newHttpClient();
var json = "{\"full_name\":\"Alex Morgan\",\"email\":\"alex@example.com\"}";
var request = java.net.http.HttpRequest.newBuilder(java.net.URI.create("YOUR_FORM_ENDPOINT"))
    .header("Content-Type", "application/json")
    .POST(java.net.http.HttpRequest.BodyPublishers.ofString(json))
    .build();
var response = client.send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 400) throw new RuntimeException(response.body());
System.out.println(response.body());

Go (standard library)

payload := []byte(`{"full_name":"Alex Morgan","email":"alex@example.com"}`)
req, err := http.NewRequest(http.MethodPost, "YOUR_FORM_ENDPOINT", bytes.NewReader(payload))
if err != nil { return err }
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { return err }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { return err }
if resp.StatusCode >= 400 { return fmt.Errorf("submission failed: %s", body) }
fmt.Println(string(body))

Imports: bytes, fmt, io, and net/http.

cURL (test request)

curl -X POST "YOUR_FORM_ENDPOINT" \
  -H "Content-Type: application/json" \
  -d '{"full_name":"Alex Morgan","email":"alex@example.com"}'

5. Manage leads

  • Leads shows submissions across the selected company. Search updates as you type; filters apply without a full-page search submit. Filter by form, status, source, assignee, creator, created-date range, follow-up-date range, or a selected form field. Each form's ordered status capsules filter leads to that form and status. Text search covers lead details, form, source, ID, status, assignee, creator, and follow-up value.
  • Every table column can be sorted. Choose 10/25/50/100 rows per page and move through paginated results. Export the active filters as CSV (Excel-compatible) or JSON; Print lets you print or use your browser's “Save as PDF”. Exports are capped at 50,000 rows. CSV text is protected against spreadsheet formula execution.
  • Admins and managers can update assignment and status directly in the table. Open a lead to set a follow-up date, review source/creator, and add notes.
  • Use Assigned to me to focus the team's work. Staff can see all leads in their company and filter by assignee; they can assign or reassign a lead to themselves. Staff can change status and follow-up details only for leads assigned to them, and may add notes to any company lead.
  • Admins and managers can add leads manually; admins and managers can import an Excel-exported CSV. Manual leads show source manual and the person who added them. Imports show import and their importer. Website submissions show source website or the passed UTM/source value and have no human creator.
  • Each lead also retains its form's status, assigned user, and database-managed created/updated timestamps. Call and WhatsApp shortcuts appear when a phone value is available.

6. Companies and roles

Company owner accounts can request additional companies and switch among approved ones. Each company has its own members, roles, forms, and lead inbox. A user added to another company needs an explicit company membership before they can switch to it.

  • Admin: company leads, forms, assignments, company users, and company settings.
  • Manager: company leads, forms, assignments, manual entries, and CSV imports; cannot access company user management.
  • Staff: company leads and forms, self-assignment and reassignment, status updates for assigned leads, and notes on any company lead; cannot create leads, manage users, create forms, or import CSV files.

7. API responses and troubleshooting

Successful submissions return HTTP 201 with success, message, and submission_id. Validation errors return HTTP 422 with a field-by-field explanation. Invalid or revoked endpoints return HTTP 404. Unsupported methods return 405.

  • Field required: include the exact generated key from your form settings.
  • Invalid email: send a valid email value or make that field optional in the CRM form.
  • Endpoint not found: copy the active API URL again; the form may have been deleted or disabled.
  • No browser response: test the endpoint using cURL or submit via your backend if browser cross-origin rules block the call.

8. Account and workspace lifecycle

  1. Sign up: registration creates your CareLeadFlow account and a company request in pending status.
  2. Approval: your company workspace becomes available after its review is complete.
  3. Invite team: an active company admin creates users in that company and chooses Manager or Staff. Each membership and role belongs to one company.
  4. More companies: an owner allowed to create companies can request another company. It appears in the top company selector after approval. Switching changes the active company context; it does not combine records.
  5. Company closure: a suspended workspace is unavailable and its public form API is disabled; saved records are not deleted.

9. Fields, limits, and data rules

  • A form supports 1–30 fields. Labels may be up to 80 characters. Supported types are short text, email, phone, number, and long answer.
  • Field keys are generated from the field label (for example, “Full name” → full_name). Duplicate labels get unique suffixes. Integrations must send the exact generated key.
  • Required values must be present. Email and number fields are validated. A field value may contain up to 10,000 characters; API JSON requests are limited to 64 KB.
  • One CSV import supports up to 5 MB and 5,000 data rows. Use the form template, preserve exactly one column per generated field key, and save from Excel as CSV UTF-8. Native .xlsx upload is not supported.
  • Deleting a form permanently deletes its submissions, notes, and endpoint. Disabling it keeps the data but stops new submissions. Rotating a token revokes the old URL.
  • Every lead has a company and form, source, form-specific status, assignee (which may be empty), creator (empty for website/API leads), and database-managed created/updated timestamps. Custom status sets support 1–20 unique labels, each up to 40 characters.
  • Company data uses shared database tables with a company ID on each record. This avoids making SQL table names from user input and enables predictable backups and migrations.
  • A website browser form submission may navigate away to the JSON API response. If you want to keep the visitor on the same page, submit through your website's backend or write a JavaScript handler that displays a success state.
Ready to connect a form?Create your workspace, then use the form-specific HTML, JavaScript, TypeScript, Node.js, PHP, Python, Java, Go, or cURL examples on the Forms page.
Get started →