> 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/clients.md).

# Clients

Create, retrieve, delete and search clients.

Operations to manage CRM clients.

## Create client

> Creates a new client. Typical response: \`Client add successful.\`

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Clients","description":"Manage clients: create, retrieve, delete 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":{"ClientCreate":{"type":"object","description":"Data to create a client. Only `company_name` is required.","required":["company_name"],"properties":{"company_name":{"type":"string","description":"Company name."},"address":{"type":"string"},"phone":{"type":"string"},"website":{"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":{"/clients":{"post":{"tags":["Clients"],"operationId":"createClient","summary":"Create client","description":"Creates a new client. Typical response: `Client add successful.`","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"200":{"description":"Client created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## GET /clients/{id}

> Get client by ID

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Clients","description":"Manage clients: create, retrieve, delete 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":{"Client":{"type":"object","description":"A client registered in the CRM.","properties":{"id":{"type":"integer"},"company_name":{"type":"string"},"address":{"type":"string"},"created_date":{"type":"string","format":"date"},"is_lead":{"type":"string"},"lead_status_id":{"type":"string"},"owner_id":{"type":"string"},"primary_contact":{"type":"string"},"total_projects":{"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":{"/clients/{id}":{"get":{"tags":["Clients"],"operationId":"getClient","summary":"Get client by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"responses":{"200":{"description":"Client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## DELETE /clients/{id}

> Delete client

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Clients","description":"Manage clients: create, retrieve, delete 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":{"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":{"/clients/{id}":{"delete":{"tags":["Clients"],"operationId":"deleteClient","summary":"Delete client","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Resource identifier."}],"responses":{"200":{"description":"Client deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## GET /getClientsSearch/search/{keysearch}

> Search clients

```json
{"openapi":"3.0.3","info":{"title":"M&S Creators — CRM API","version":"1.1.2"},"tags":[{"name":"Clients","description":"Manage clients: create, retrieve, delete 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":{"ClientSearchItem":{"type":"object","description":"A client match in a search.","properties":{"id":{"type":"integer"},"company_name":{"type":"string"},"invoice_value":{"type":"string"},"client_groups":{"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":{"/getClientsSearch/search/{keysearch}":{"get":{"tags":["Clients"],"operationId":"searchClients","summary":"Search clients","parameters":[{"in":"path","name":"keysearch","required":true,"schema":{"type":"string"},"description":"Text to search for."}],"responses":{"200":{"description":"Client matches.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClientSearchItem"}}}}},"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/clients.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.
