Tarefas
CRUD de tarefas. Uma tarefa pode estar vinculada a um lead ou ser avulsa.
Base URL
https://app.syncro.chat/api/v1AuthX-API-Key: crm_SUA_CHAVE_AQUIO objeto Tarefa
{
"id": 45,
"subject": "Enviar proposta",
"description": "Mandar PDF com valores",
"type": "email",
"status": "pending",
"priority": "high",
"due_date": "2026-07-01",
"due_time": "09:00",
"completed_at": null,
"lead_id": 123,
"lead": { "id": 123, "name": "João Silva", "phone": "+5511999887766", "email": "[email protected]" },
"assigned_to": 12,
"assigned_user": { "id": 12, "name": "Ana" },
"notes": null,
"is_overdue": false,
"created_at": "2026-06-30T08:00:00Z",
"updated_at": "2026-06-30T08:00:00Z"
}
Valores aceitos
type:call,email,task,visit,whatsapp,meetingpriority:low,medium,highstatus:pending,completed
Listar tarefas
GET
Permissão: /taskstasks:readPaginado.
Parâmetros de query
lead_idintegeropcionalTarefas de um lead
assigned_tointegeropcionalTarefas de um responsável
statusstringopcionalpending ou completedtypestringopcionalTipo (ver acima)
prioritystringopcionallow, medium, highdue_fromdateopcionalVencimento a partir de
due_todateopcionalVencimento até
pageintegeropcionalPágina (padrão
1)per_pageintegeropcionalItens por página (padrão
50, máx 200)Requisição
curl "https://app.syncro.chat/api/v1/tasks?status=pending&lead_id=123" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Resposta
{
"success": true,
"data": [
{
"id": 45,
"subject": "Enviar proposta",
"type": "email",
"status": "pending",
"priority": "high",
"due_date": "2026-07-01",
"lead_id": 123
}
],
"meta": {
"total": 1,
"per_page": 50,
"current_page": 1,
"last_page": 1,
"has_more": false
}
}Criar tarefa
POST
Permissão: /taskstasks:writeParâmetros do body
subjectstringobrigatórioAssunto
typestringobrigatóriocall, email, task, visit, whatsapp, meetingdue_datedateobrigatórioData de vencimento (
YYYY-MM-DD)descriptionstringopcionalDescrição
prioritystringopcionallow, medium, highdue_timestringopcionalHora (
HH:MM)lead_idintegeropcionalLead vinculado
assigned_tointegeropcionalResponsável
notesstringopcionalAnotações
Requisição
curl -X POST "https://app.syncro.chat/api/v1/tasks" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"subject": "Enviar proposta",
"type": "email",
"due_date": "2026-07-01",
"due_time": "09:00",
"priority": "high",
"lead_id": 123,
"assigned_to": 12
}'Resposta
{
"success": true,
"task": {
"id": 45,
"subject": "Enviar proposta",
"status": "pending"
}
}Buscar tarefa
GET
Permissão: /tasks/45tasks:readRequisição
curl "https://app.syncro.chat/api/v1/tasks/45" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Resposta
{
"success": true,
"task": {
"id": 45,
"subject": "Enviar proposta",
"status": "pending"
}
}Atualizar tarefa
PUT
Permissão: /tasks/45tasks:writeTodos os campos são opcionais (atualização parcial). Definir status como completed preenche completed_at automaticamente.
Requisição
curl -X PUT "https://app.syncro.chat/api/v1/tasks/45" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"status": "completed"
}'Resposta
{
"success": true,
"task": {
"id": 45,
"status": "completed",
"completed_at": "2026-06-30T11:30:00Z"
}
}Excluir tarefa
DELETE
Permissão: /tasks/45tasks:writeRequisição
curl -X DELETE "https://app.syncro.chat/api/v1/tasks/45" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Resposta
{
"success": true
}Concluir / reabrir tarefa
PATCH
Permissão: /tasks/45/toggletasks:writeAlterna o status entre pending e completed.
Requisição
curl -X PATCH "https://app.syncro.chat/api/v1/tasks/45/toggle" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Resposta
{
"success": true,
"task": {
"id": 45,
"status": "completed"
}
}