# Leadstaker ## Docs - [Autenticação](https://docs.leadstaker.com/api-reference/authentication.md): Como autenticar suas chamadas na API do Leadstaker com uma chave de projeto. - [Close a chat](https://docs.leadstaker.com/api-reference/chats/close-a-chat.md): Sets the chat status to CLOSED. Answers 204 with no body. - [Delete a chat](https://docs.leadstaker.com/api-reference/chats/delete-a-chat.md): The chat is deleted. Answers 204 with no body. - [Get a chat by id](https://docs.leadstaker.com/api-reference/chats/get-a-chat-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [Get a chat with its recent messages](https://docs.leadstaker.com/api-reference/chats/get-a-chat-with-its-recent-messages.md): Answers with the chat and its most recent messages in one call. `messagesLimit` caps how many messages come back, 30 by default. - [List chats](https://docs.leadstaker.com/api-reference/chats/list-chats.md): Answers with the paginated envelope: the matching chats in `data`, plus `hasMore`, `limit`, `offset` and `total`. - [Turn the AI agent on or off for a chat](https://docs.leadstaker.com/api-reference/chats/turn-the-ai-agent-on-or-off-for-a-chat.md): Sets the AI agent of the chat to ACTIVE or DISABLED. Answers 204 with no body. - [Create a contact](https://docs.leadstaker.com/api-reference/contacts/create-a-contact.md): Creates the contact in the project of the API key. Upsert: answers 200 with the existing contact when one already matches, instead of 201 with a duplicate. - [Delete a contact](https://docs.leadstaker.com/api-reference/contacts/delete-a-contact.md): The contact is deleted. Answers 204 with no body. - [Get a contact by id](https://docs.leadstaker.com/api-reference/contacts/get-a-contact-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List contacts](https://docs.leadstaker.com/api-reference/contacts/list-contacts.md): Answers with the paginated envelope: the matching contacts in `data`, plus `hasMore`, `limit`, `offset` and `total`. - [Update a contact](https://docs.leadstaker.com/api-reference/contacts/update-a-contact.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Attach tags to a deal](https://docs.leadstaker.com/api-reference/deals/attach-tags-to-a-deal.md): Attaches every tag in `tagIds` to the deal. Answers 204 with no body. - [Create a deal](https://docs.leadstaker.com/api-reference/deals/create-a-deal.md): Creates the deal in the project of the API key and answers 201 with the created record. - [Delete a deal](https://docs.leadstaker.com/api-reference/deals/delete-a-deal.md): The deal is deleted. Answers 204 with no body. - [Detach a tag from a deal](https://docs.leadstaker.com/api-reference/deals/detach-a-tag-from-a-deal.md): Detaches the tag from the deal. Answers 204 with no body. - [Get a deal by id](https://docs.leadstaker.com/api-reference/deals/get-a-deal-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List deals](https://docs.leadstaker.com/api-reference/deals/list-deals.md): Answers with the paginated envelope: the matching deals in `data`, plus `hasMore`, `limit`, `offset` and `total`. - [Update a deal](https://docs.leadstaker.com/api-reference/deals/update-a-deal.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Erros](https://docs.leadstaker.com/api-reference/errors.md): O formato de erro da API e o que cada código significa. - [Create a field group](https://docs.leadstaker.com/api-reference/field-groups/create-a-field-group.md): Creates the field group in the project of the API key and answers 201 with the created record. - [Delete a field group](https://docs.leadstaker.com/api-reference/field-groups/delete-a-field-group.md): The field group is deleted. Answers 204 with no body. - [Get a field group by id](https://docs.leadstaker.com/api-reference/field-groups/get-a-field-group-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List field groups](https://docs.leadstaker.com/api-reference/field-groups/list-field-groups.md): Answers with the paginated envelope: the matching field groups in `data`, plus `hasMore`, `limit`, `offset` and `total`. - [Update a field group](https://docs.leadstaker.com/api-reference/field-groups/update-a-field-group.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Create a field](https://docs.leadstaker.com/api-reference/fields/create-a-field.md): Creates the field in the project of the API key and answers 201 with the created record. - [Delete a field](https://docs.leadstaker.com/api-reference/fields/delete-a-field.md): The field is deleted. Answers 204 with no body. - [Get a field by id](https://docs.leadstaker.com/api-reference/fields/get-a-field-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List fields](https://docs.leadstaker.com/api-reference/fields/list-fields.md): Filter with `entityTypes` and `pipelineId` only: this endpoint does not read the bracket reserved keys or the `field[op]` filters the other lists accept. - [Update a field](https://docs.leadstaker.com/api-reference/fields/update-a-field.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Filtros, ordenação e paginação](https://docs.leadstaker.com/api-reference/listing.md): Como montar a query string dos endpoints de listagem. - [Create a loss reason](https://docs.leadstaker.com/api-reference/loss-reasons/create-a-loss-reason.md): Creates the loss reason in the project of the API key and answers 201 with the created record. - [Delete a loss reason](https://docs.leadstaker.com/api-reference/loss-reasons/delete-a-loss-reason.md): The loss reason is deleted. Answers 204 with no body. - [List loss reasons](https://docs.leadstaker.com/api-reference/loss-reasons/list-loss-reasons.md): Answers with the matching loss reasons wrapped in `data`, without pagination fields. - [Update a loss reason](https://docs.leadstaker.com/api-reference/loss-reasons/update-a-loss-reason.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Delete a message](https://docs.leadstaker.com/api-reference/messages/delete-a-message.md): The message is deleted. Answers 204 with no body. - [Edit a message](https://docs.leadstaker.com/api-reference/messages/edit-a-message.md): Replaces the text content of the message. Answers 204 with no body. - [Get a message by id](https://docs.leadstaker.com/api-reference/messages/get-a-message-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List the messages of a chat](https://docs.leadstaker.com/api-reference/messages/list-the-messages-of-a-chat.md): Answers with the paginated envelope: the messages of the chat in `data`, plus `hasMore`, `limit`, `offset` and `total`. - [Send a message to a chat](https://docs.leadstaker.com/api-reference/messages/send-a-message-to-a-chat.md): Answers with the id of the created message. Delivery happens asynchronously. - [Send a message to a phone number](https://docs.leadstaker.com/api-reference/messages/send-a-message-to-a-phone-number.md): Starts or reuses a chat for the number and answers with its id. - [Create a note](https://docs.leadstaker.com/api-reference/notes/create-a-note.md): Creates the note in the project of the API key and answers 201 with the created record. - [Delete a note](https://docs.leadstaker.com/api-reference/notes/delete-a-note.md): The note is deleted. Answers 204 with no body. - [List notes](https://docs.leadstaker.com/api-reference/notes/list-notes.md): Answers with a bare array of notes, without an envelope or pagination fields. - [Update a note](https://docs.leadstaker.com/api-reference/notes/update-a-note.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Create a pipeline](https://docs.leadstaker.com/api-reference/pipelines/create-a-pipeline.md): Creates the pipeline in the project of the API key and answers 201 with the created record. - [Delete a pipeline](https://docs.leadstaker.com/api-reference/pipelines/delete-a-pipeline.md): The pipeline is deleted. Answers 204 with no body. - [Get a pipeline by id](https://docs.leadstaker.com/api-reference/pipelines/get-a-pipeline-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List pipelines](https://docs.leadstaker.com/api-reference/pipelines/list-pipelines.md): Answers with the paginated envelope: the matching pipelines in `data`, plus `hasMore`, `limit`, `offset` and `total`. - [Update a pipeline](https://docs.leadstaker.com/api-reference/pipelines/update-a-pipeline.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Create a stage](https://docs.leadstaker.com/api-reference/stages/create-a-stage.md): Creates the stage in the project of the API key and answers 201 with the created record. - [Delete a stage](https://docs.leadstaker.com/api-reference/stages/delete-a-stage.md): The stage is deleted. Pass `targetStageId` to move the deals sitting on it. - [Get a stage by id](https://docs.leadstaker.com/api-reference/stages/get-a-stage-by-id.md): Answers 404 when the id does not exist or belongs to another project. - [List stages](https://docs.leadstaker.com/api-reference/stages/list-stages.md): Answers with a bare array of stages, without an envelope or pagination fields. - [Update a stage](https://docs.leadstaker.com/api-reference/stages/update-a-stage.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Create a tag](https://docs.leadstaker.com/api-reference/tags/create-a-tag.md): Creates the tag in the project of the API key and answers 201 with the created record. - [Delete a tag](https://docs.leadstaker.com/api-reference/tags/delete-a-tag.md): The tag is deleted. Answers 204 with no body. - [List tags](https://docs.leadstaker.com/api-reference/tags/list-tags.md): Answers with the matching tags wrapped in `data`, without pagination fields. - [Update a tag](https://docs.leadstaker.com/api-reference/tags/update-a-tag.md): Partial update: only the keys present in the body change. Answers 204 with no body. - [Introdução](https://docs.leadstaker.com/index.md): O Leadstaker é a plataforma para capturar, qualificar e gerenciar leads. - [Primeiros passos](https://docs.leadstaker.com/quickstart.md): Da chave de API ao primeiro contato criado, em cinco minutos. ## OpenAPI Specs - [openapi](https://docs.leadstaker.com/api-reference/openapi.json)