> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keenpartner.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first Keen API request in under five minutes.

This guide walks you through authenticating with the Keen API, listing your channels, and creating a lead.

## Prerequisites

* A Keen account with at least one active channel.
* An API key generated from **Settings > API keys** in your Keen dashboard.

## Step 1: List your channels

Start by retrieving the channels your company has access to. This gives you the channel IDs, lead statuses, and custom property definitions you need for subsequent requests.

```bash theme={null}
curl -X POST https://data.keenpartner.com/functions/v1/keen-api \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{"action": "get_channels"}'
```

The response includes a `channels` array. Each channel contains:

* `id` — the channel ID you use in other actions
* `lead_status` — the available statuses for leads in this channel
* `property_definitions` — custom fields defined on the channel

Pick a channel ID from the response to use in the next step.

## Step 2: Create a lead

Use the channel ID from the previous step to create a lead:

```bash theme={null}
curl -X POST https://data.keenpartner.com/functions/v1/keen-api \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "action": "create_lead",
    "channel_id": "YOUR_CHANNEL_ID",
    "email": "jane@example.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "company_name": "Smith Consulting",
    "source": "API"
  }'
```

The response returns the full lead object, including the auto-assigned `lead_status_id`.

## Step 3: Update the lead status

Move the lead to a new status. Use the `lead_status` values from the `get_channels` response to find the right status name:

```bash theme={null}
curl -X POST https://data.keenpartner.com/functions/v1/keen-api \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "action": "update_status",
    "lead_id": "LEAD_ID_FROM_STEP_2",
    "status": "Qualified"
  }'
```

## Step 4: Verify with get leads

Confirm the lead was created and its status was updated:

```bash theme={null}
curl -X POST https://data.keenpartner.com/functions/v1/keen-api \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
    "action": "get_leads",
    "channel_id": "YOUR_CHANNEL_ID"
  }'
```

The response returns all leads in the channel, newest first.

## Next steps

* Browse the [API reference](/api-reference/introduction) for all available actions.
* Record a [purchase](/api-reference/create-purchase) against a lead.
* Set up a public lead form using the [`lead_external`](/api-reference/lead-external) action (no API key required).
