> For the complete documentation index, see [llms.txt](https://docs.salesmap.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.salesmap.kr/developers/api-reference/lead/create.md).

# 리드 생성

<mark style="color:yellow;">`POST`</mark> `/v2/lead`

리드를 생성합니다.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body parameters**

<table><thead><tr><th width="212">Name</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>생성하려는 리드의 이름<br><mark style="color:red;"><strong>Required</strong></mark></td></tr><tr><td><code>peopleId</code></td><td>string</td><td>리드와 연결된 고객의 Id<br><mark style="color:red;"><strong>Required</strong></mark> (peopleId 혹은 organizationId 중 하나 이상은 필수)</td></tr><tr><td><code>organizationId</code></td><td>string</td><td><p>리드와 연결된 회사의 Id</p><p><mark style="color:red;"><strong>Required</strong></mark> (peopleId 혹은 organizationId 중 하나 이상은 필수)</p></td></tr><tr><td><code>memo</code></td><td>string</td><td>리드 생성 시 작성할 메모</td></tr><tr><td><code>pipelineId</code></td><td>string</td><td>리드가 소속 될 pipeline의 Id </td></tr><tr><td><code>pipelineStageId</code></td><td>string</td><td>리드가 소속 된 pipeline의 StageId<br>(pipelineId의 파이프라인에 소속된 stage만 지정가능)</td></tr><tr><td><code>fieldList</code></td><td>array</td><td>생성할 리드의 데이터필드</td></tr></tbody></table>

**Request**

{% tabs %}
{% tab title="Example" %}

```json
{
  "name": "리드 명",
  "organizationId": "<회사 ID>",
  "peopleId": "<고객 ID>",
  "pipelineId": "<파이프라인 ID>",
  "pipelineStageId": "<파이프라인 단계 ID>",
  "fieldList": [
    {
      "name" : "<필드 이름>",
      "stringValue": "<텍스트 입력>"
  }
  ]
}
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="201" %}

```json
{
    "success": true,
    "data": {
        "lead":
            {
                "id": "<leadId>",
                "name": "생성한 리드의 이름",
                "createdAt": "2024-04-08T05:25:26.020Z"
            }
}
```

{% endtab %}

{% tab title="40x" %}

```json
{
    "success": false,
    "message": "에러 메세지"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.salesmap.kr/developers/api-reference/lead/create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
