> ## Documentation Index
> Fetch the complete documentation index at: https://visaflo.ca/knowledge-base/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make a verified VisaFlo API request, search for a lead, and create a follow-up task.

## Before You Begin

You need a workspace API key created by a VisaFlo administrator. Keep the key in a server-side secret store. This API is not designed for browser-based requests.

## 1. Verify Your Key

List your workflow templates. This confirms the key, network path, and workspace scope without creating data.

```bash theme={null}
curl "https://api.visaflo.app/api/public/workflow/list" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "VFLO_WORKFLOW_ID",
      "name": "Standard PR Workflow",
      "taskCount": 8
    }
  ]
}
```

## 2. Look Up Before You Create

For an intake integration, search by email before creating a lead. This keeps retries and repeated webhook deliveries from creating duplicate records.

```bash theme={null}
curl "https://api.visaflo.app/api/public/lead/search?email=jane@example.com" \
  -H "X-API-Key: YOUR_API_KEY"
```

If `data` is empty, create the lead:

```bash theme={null}
curl -X POST "https://api.visaflo.app/api/public/lead/create" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Jane",
    "lastName": "Doe",
    "email": "jane@example.com",
    "phone": "+1 555 0100",
    "countryOfResidence": "Canada"
  }'
```

Save the returned `data.id` in your source system.

## 3. Create a Follow-up

Use the VisaFlo lead, client, or case ID to create operational work.

```bash theme={null}
curl -X POST "https://api.visaflo.app/api/public/task/create" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Review new web intake",
    "priority": "high",
    "status": "open",
    "entity": { "type": "lead", "id": "VFLO_LEAD_ID" }
  }'
```

## Production Checklist

* Search before a create operation.
* Persist VisaFlo IDs after a successful create.
* Retry only transient failures such as `429` and `5xx` responses.
* Do not retry a malformed `400` request without correcting it.
* Keep the API key on a server, never in a browser or client-side extension.
