> For the complete documentation index, see [llms.txt](https://help.paintscout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.paintscout.com/developers/settings-lead-sources.md).

# Settings Lead Sources

## List Lead Sources

> Lists lead sources. Lead sources track where a lead, contact, or deal originated (e.g. referral, website, a specific marketing channel).

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"LeadSource":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the lead source."},"name":{"type":"string","description":"The name of the lead source."}},"required":["id","name"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/settings/leadSources":{"get":{"summary":"List Lead Sources","description":"Lists lead sources. Lead sources track where a lead, contact, or deal originated (e.g. referral, website, a specific marketing channel).","operationId":"listLeadSources","tags":["Settings - Lead Sources"],"responses":{"200":{"description":"List of lead sources","content":{"application/json":{"schema":{"type":"object","properties":{"totalRows":{"type":"number"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/LeadSource"}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /settings/leadSources

> Create Lead Source

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"LeadSource":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the lead source."},"name":{"type":"string","description":"The name of the lead source."}},"required":["id","name"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/settings/leadSources":{"post":{"summary":"Create Lead Source","operationId":"createLeadSource","tags":["Settings - Lead Sources"],"requestBody":{"description":"Data for creating a new lead source","required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the lead source."}},"required":["name"]}}}},"responses":{"200":{"description":"Successfully created lead source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict - Lead source already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Retrieve Lead Source

> Retrieves a single lead source by ID. Lead sources track where a lead, contact, or deal originated (e.g. referral, website, a specific marketing channel).

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"LeadSource":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the lead source."},"name":{"type":"string","description":"The name of the lead source."}},"required":["id","name"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/settings/leadSources/{id}":{"get":{"summary":"Retrieve Lead Source","description":"Retrieves a single lead source by ID. Lead sources track where a lead, contact, or deal originated (e.g. referral, website, a specific marketing channel).","operationId":"getLeadSource","tags":["Settings - Lead Sources"],"parameters":[{"name":"id","in":"path","description":"ID of the Lead Source","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Details about the lead source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## PUT /settings/leadSources/{id}

> Update Lead Source

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"LeadSource":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the lead source."},"name":{"type":"string","description":"The name of the lead source."}},"required":["id","name"]},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/settings/leadSources/{id}":{"put":{"summary":"Update Lead Source","operationId":"updateLeadSource","tags":["Settings - Lead Sources"],"parameters":[{"name":"id","in":"path","description":"ID of the Lead Source","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Updated lead source data","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"responses":{"200":{"description":"Successfully updated lead source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSource"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## DELETE /settings/leadSources/{id}

> Delete Lead Source

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/settings/leadSources/{id}":{"delete":{"summary":"Delete Lead Source","operationId":"deleteLeadSource","tags":["Settings - Lead Sources"],"parameters":[{"name":"id","in":"path","description":"ID of the Lead Source","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Lead Source successfully deleted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.paintscout.com/developers/settings-lead-sources.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
