POST /api/v1/deals/{seq}/tasks
Cria uma tarefa pendente vinculada ao negócio. Sem assigneeUserId, atribui a tarefa ao membro da chave; sem categoria, usa outro. Exige tasks.create.
Exemplos A URL usa o servidor de produção. Defina PIPEFACIL_API_KEY e as variáveis de caminho (como SEQ ou ID) com os identificadores reais. Ajuste o corpo antes de executar: requisições de escrita alteram dados do workspace.
cURL curl --request POST \
--url "https://pipefacil-server.matchsales.com.br/api/v1/deals/ $SEQ /tasks" \
--header "Authorization: Bearer $PIPEFACIL_API_KEY " \
--header "Content-Type: application/json" \
--data '{
"title": "Retornar proposta",
"dueAt": "2026-10-06T14:00:00Z",
"category": "follow_up"
}' JavaScript const response = await fetch ( `https://pipefacil-server.matchsales.com.br/api/v1/deals/${ process . env . SEQ }/tasks` , {
method: "POST" ,
headers: {
Authorization: `Bearer ${ process . env . PIPEFACIL_API_KEY }` ,
"Content-Type" : "application/json" ,
},
body: JSON . stringify ({
"title" : "Retornar proposta" ,
"dueAt" : "2026-10-06T14:00:00Z" ,
"category" : "follow_up"
}),
});
if ( ! response.ok) throw new Error ( `HTTP ${ response . status }: ${ await response . text () }` );
const text = await response. text ();
const data = text ? JSON . parse (text) : null ; Python import os
import json
import requests
response = requests.request(
"POST" ,
f "https://pipefacil-server.matchsales.com.br/api/v1/deals/ { os.environ[ 'SEQ' ] } /tasks" ,
headers = { "Authorization" : f "Bearer { os.environ[ 'PIPEFACIL_API_KEY' ] } " },
json = json.loads( "{ \n \" title \" : \" Retornar proposta \" , \n \" dueAt \" : \" 2026-10-06T14:00:00Z \" , \n \" category \" : \" follow_up \"\n }" ),
)
response.raise_for_status()
data = response.json() if response.content else None Parâmetros Nome Local Tipo Obrigatório Descrição seqpathintegerSim —
Corpo da requisição Content-Type: application/json · obrigatório
{
"title" : "Retornar proposta" ,
"dueAt" : "2026-10-06T14:00:00Z" ,
"category" : "follow_up"
} Campo Tipo Obrigatório no objeto Descrição titlestringSim Até 500 caracteres. dueAtstringSim Instante ISO 8601, por exemplo, 2026-10-05T13:00:00Z. Formato: date-time. assigneeUserIdstringNão Identificador de membro ativo (consulte /api/v1/users). Padrão: membro da chave. Aceita null. categoryIdstringNão Identificador de categoria do workspace ou chave de sistema. Tem prioridade sobre category. Aceita null. categorystringNão Chave de categoria do sistema. Padrão: outro. Valores: ligacao, reuniao, follow_up, email, outro. Aceita null. descriptionstringNão Aceita null. Até 2000 caracteres.
Esquema OpenAPI {
"type" : "object" ,
"required" : [
"title" ,
"dueAt"
],
"properties" : {
"title" : {
"type" : "string" ,
"maxLength" : 500
},
"dueAt" : {
"type" : "string" ,
"format" : "date-time" ,
"description" : "Instante ISO 8601, por exemplo, 2026-10-05T13:00:00Z."
},
"assigneeUserId" : {
"type" : "string" ,
"nullable" : true ,
"description" : "Identificador de membro ativo (consulte /api/v1/users). Padrão: membro da chave."
},
"categoryId" : {
"type" : "string" ,
"nullable" : true ,
"description" : "Identificador de categoria do workspace ou chave de sistema. Tem prioridade sobre category."
},
"category" : {
"type" : "string" ,
"nullable" : true ,
"enum" : [
"ligacao" ,
"reuniao" ,
"follow_up" ,
"email" ,
"outro"
],
"description" : "Chave de categoria do sistema. Padrão: outro."
},
"description" : {
"type" : "string" ,
"maxLength" : 2000 ,
"nullable" : true
}
},
"example" : {
"title" : "Retornar proposta" ,
"dueAt" : "2026-10-06T14:00:00Z" ,
"category" : "follow_up"
}
} Respostas 201 Criado Campo Tipo Descrição dataobject— data.idstring— data.dealIdstringAceita null. data.assigneeTaskUser— data.assignee.userIdstring— data.assignee.namestringAceita null. data.assignee.emailstringAceita null. data.assignee.rolestringAceita null. data.creatorTaskUser— data.creator.userIdstring— data.creator.namestringAceita null. data.creator.emailstringAceita null. data.creator.rolestringAceita null. data.categorystringChave legada; use categoryId/categoryName. data.categoryIdstring— data.categoryNamestring— data.categoryColorstring— data.titlestring— data.descriptionstringAceita null. data.statusstringValores: pending, done. data.dueAtstringFormato: date-time. data.doneAtstringFormato: date-time. Aceita null. data.createdAtstringFormato: date-time. data.updatedAtstringFormato: date-time. messagestringAceita null.
Esquema OpenAPI {
"type" : "object" ,
"properties" : {
"data" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
},
"dealId" : {
"type" : "string" ,
"nullable" : true
},
"assignee" : {
"$ref" : "#/components/schemas/TaskUser"
},
"creator" : {
"$ref" : "#/components/schemas/TaskUser"
},
"category" : {
"type" : "string" ,
"description" : "Chave legada; use categoryId/categoryName."
},
"categoryId" : {
"type" : "string"
},
"categoryName" : {
"type" : "string"
},
"categoryColor" : {
"type" : "string"
},
"title" : {
"type" : "string"
},
"description" : {
"type" : "string" ,
"nullable" : true
},
"status" : {
"type" : "string" ,
"enum" : [
"pending" ,
"done"
]
},
"dueAt" : {
"type" : "string" ,
"format" : "date-time"
},
"doneAt" : {
"type" : "string" ,
"format" : "date-time" ,
"nullable" : true
},
"createdAt" : {
"type" : "string" ,
"format" : "date-time"
},
"updatedAt" : {
"type" : "string" ,
"format" : "date-time"
}
}
},
"message" : {
"type" : "string" ,
"nullable" : true
}
}
} 400 Falha de validação dos campos; `fieldErrors` contém os erros. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 401 Chave ausente, malformada, desconhecida, revogada ou expirada, ou membro emissor inativo. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 403 Autenticado, mas sem acesso: falta de permissão (`FORBIDDEN`), recurso desligado no workspace (`FEATURE_DISABLED`) ou tentativa de acessar uma agenda não permitida. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 404 Recurso não encontrado ou fora da visibilidade do membro. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 422 Requisição válida que o recurso não pode atender, por exemplo, um identificador de calendário que não representa uma reunião nativa. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
} 429 Limite de requisições excedido por workspace ou IP. Campo Tipo Descrição errorstring— codestringValores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. requestIdstring— detailsstringAceita null. fieldErrorsarrayAceita null. fieldErrors[].fieldstring— fieldErrors[].messagestring—
Esquema OpenAPI {
"type" : "object" ,
"description" : "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes." ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "string" ,
"enum" : [
"BAD_REQUEST" ,
"VALIDATION_ERROR" ,
"UNAUTHORIZED" ,
"FORBIDDEN" ,
"FEATURE_DISABLED" ,
"NOT_FOUND" ,
"CONFLICT" ,
"QUOTA_EXCEEDED" ,
"UNPROCESSABLE_ENTITY" ,
"INTERNAL_ERROR" ,
"SERVICE_UNAVAILABLE"
]
},
"requestId" : {
"type" : "string"
},
"details" : {
"type" : "string" ,
"nullable" : true
},
"fieldErrors" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
}
}
},
"required" : [
"error" ,
"code" ,
"requestId"
]
}