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

# Leads

Prospects: create, retrieve, update and search.

Operations to manage leads (prospects).

## POST /leads

> Create lead

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Leads","description":"Manage leads: create, retrieve, update and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"LeadCreate":{"type":"object","description":"Data to create a lead.","required":["company_name","owner_id","lead_status_id","lead_source_id"],"properties":{"company_name":{"type":"string"},"owner_id":{"type":"string","description":"Owner ID."},"lead_status_id":{"type":"string","description":"Lead status ID."},"lead_source_id":{"type":"string","description":"Lead source ID."},"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"vat_number":{"type":"string","description":"Tax ID / VAT number."}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/leads":{"post":{"tags":["Leads"],"operationId":"createLead","summary":"Create lead","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"200":{"description":"Lead created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## GET /leads/{id}

> Get lead by ID

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Leads","description":"Manage leads: create, retrieve, update and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"Lead":{"type":"object","description":"A lead (prospect).","properties":{"id":{"type":"integer"},"company_name":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"created_date":{"type":"string","format":"date"},"website":{"type":"string"},"phone":{"type":"string"},"lead_status_title":{"type":"string"},"owner_name":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/leads/{id}":{"get":{"tags":["Leads"],"operationId":"getLead","summary":"Get lead by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"responses":{"200":{"description":"Lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## PUT /leads/{id}

> Update lead

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Leads","description":"Manage leads: create, retrieve, update and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"LeadUpdate":{"description":"Data to update a lead (same fields as creation).","allOf":[{"$ref":"#/components/schemas/LeadCreate"}]},"LeadCreate":{"type":"object","description":"Data to create a lead.","required":["company_name","owner_id","lead_status_id","lead_source_id"],"properties":{"company_name":{"type":"string"},"owner_id":{"type":"string","description":"Owner ID."},"lead_status_id":{"type":"string","description":"Lead status ID."},"lead_source_id":{"type":"string","description":"Lead source ID."},"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"vat_number":{"type":"string","description":"Tax ID / VAT number."}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/leads/{id}":{"put":{"tags":["Leads"],"operationId":"updateLead","summary":"Update lead","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LeadUpdate"}}}},"responses":{"200":{"description":"Lead updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## Search leads

> If your installation does not expose this route, use \`/projects/search/{keysearch}\`.

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Leads","description":"Manage leads: create, retrieve, update and search."}],"servers":[{"url":"https://crm.myscreators.com/index.php/api","description":"Production"}],"security":[{"ApiToken":[]}],"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"header","name":"authtoken","description":"M&S installation token. Send it in the `authtoken` header of every request."}},"schemas":{"LeadSearchItem":{"type":"object","description":"A lead match in a search.","properties":{"id":{"type":"integer"},"company_name":{"type":"string"},"lead_status_title":{"type":"string"}}},"ApiMessage":{"type":"object","description":"Generic status response for write and delete operations.","properties":{"status":{"type":"boolean","description":"`true` if the operation succeeded."},"message":{"type":"string","description":"Human-readable result message."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}}}},"paths":{"/leads/search/{keysearch}":{"get":{"tags":["Leads"],"operationId":"searchLeads","summary":"Search leads","description":"If your installation does not expose this route, use `/projects/search/{keysearch}`.","parameters":[{"in":"path","name":"keysearch","required":true,"schema":{"type":"string"},"description":"Text to search for."}],"responses":{"200":{"description":"Lead matches.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadSearchItem"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


---

# 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://developers.myscreators.com/en/api-reference/leads.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.
