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

# Create lead API

> Submit leads programmatically for partner attribution. Track B2B referrals with custom fields and conversion tracking.

## Endpoint

```
POST https://api.partnero.com/v1/leads
```

## Request Body

| Parameter       | Type   | Required | Description                                                         |
| --------------- | ------ | -------- | ------------------------------------------------------------------- |
| `name`          | string | Yes      | Lead's full name                                                    |
| `email`         | string | Yes      | Lead's email address                                                |
| `partner`       | object | Yes      | Partner attribution data                                            |
| `partner.key`   | string | No       | Partner's referral key                                              |
| `partner.id`    | string | No       | Partner's ID (alternative to key)                                   |
| `partner.email` | string | No       | Partner's email (alternative to key)                                |
| `cfields`       | object | No       | Custom form field values. Keys are field IDs from lead form config. |

## Request

```bash cURL theme={null}
curl --location 'https://api.partnero.com/v1/leads' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Alice Brown",
    "email": "alice.brown@partnero.com",
    "partner": {
      "key": "ref_123"
    },
    "cfields": {
      "89": "Acme Inc",
      "90": "Looking for enterprise plan",
      "91": ["feature1", "feature3"],
      "94": "US"
    }
  }'
```

## Response

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "data": {
      "id": 44,
      "status": "submitted",
      "created_at": "2025-05-16",
      "lead_info": {
        "name": "Alice Brown",
        "email": "alice.brown@partnero.com"
      },
      "converted_to": null,
      "submitter": {
        "id": "partner_123",
        "name": "John Doe",
        "email": "john.doe@partnero.com"
      },
      "submission_form": [
        {
          "question": "Name",
          "answer": "Alice Brown"
        },
        {
          "question": "Email address",
          "answer": "alice.brown@partnero.com"
        },
        {
          "question": "Company",
          "answer": "Acme Inc"
        },
        {
          "question": "Notes",
          "answer": "Looking for enterprise plan"
        }
      ],
      "can_be_converted": true,
      "can_be_rejected": true
    },
    "status": 1
  }
  ```
</ResponseExample>

<Tip>
  Get the custom field IDs from the `GET /v1/leads/details` endpoint to properly map form fields.
</Tip>
