---
title: "Create a new lead source"
description: "POST /lead_sources — Creates a lead source. text is required and limited to 40 characters; the id is server-generated. Admin only. Adding one re-sorts the list, which is kept in alphabetical order."
canonical_url: https://developer.onepagecrm.com/api/reference/lead-sources/post-lead_sources/
source: Markdown mirror of https://developer.onepagecrm.com/api/reference/lead-sources/post-lead_sources/
---

`POST /lead_sources`

Creates a lead source. text is required and limited to 40 characters; the id is server-generated. Admin only. Adding one re-sorts the list, which is kept in alphabetical order.

Resource: [Lead Sources](https://developer.onepagecrm.com/api/reference/lead-sources/) · [API Reference](https://developer.onepagecrm.com/api/reference/)

## Request

```bash
curl -X POST "https://app.onepagecrm.com/api/v3/lead_sources" \
  -u $user_id:$api_key \
  -H "Content-Type: application/json" \
  -d '{
    "id": "advertisement",
    "text": "Advertisement",
    "counts": 4,
    "total_count": 7,
    "action_stream_count": 2,
    "team_counts": [
      {
        "user_id": "5aba31e99007ba0f570c12f7",
        "counts": 4
      }
    ]
  }'
```

Authentication is HTTP Basic — `user_id` as username, `api_key` as password.
See https://developer.onepagecrm.com/api/authentication/.

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | ID of the lead source |
| `text` | string | yes | Description of the lead source |
| `counts` | integer (int32) |  | Number of contacts the (logged API) user owns, with the lead source |
| `total_count` | integer (int32) |  | Number of contacts the entire team owns, with the lead source |
| `action_stream_count` | integer (int32) |  | Number of contacts the (logged API) user has actions with, who also have the lead source |
| `team_counts` | array<object> |  | Number of contacts, with the lead source (for each team member) |

## Responses

### 201

Created

```json
{
  "status": 0,
  "message": "OK",
  "timestamp": 1528373119,
  "data": {
    "id": "advertisement",
    "text": "Advertisement",
    "counts": 4,
    "total_count": 7,
    "action_stream_count": 2,
    "team_counts": [
      {
        "user_id": "5aba31e99007ba0f570c12f7",
        "counts": 4
      }
    ]
  }
}
```

Standard error responses: 400, 401, 403, 404, 409, 500 — shared across the API. See https://developer.onepagecrm.com/api/errors/.

## Related guides

- [Authentication](https://developer.onepagecrm.com/api/authentication/)
- [Errors](https://developer.onepagecrm.com/api/errors/)
- [Rate limits](https://developer.onepagecrm.com/api/rate-limits/)
