GET
/api/v1/automationsRetorna todas as automações do workspace, das mais recentes às mais antigas. Não usa paginação. Os filtros são opcionais e combinados; valores desconhecidos de scope ou triggerType são ignorados.
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 GET \
--url "https://pipefacil-server.matchsales.com.br/api/v1/automations" \
--header "Authorization: Bearer $PIPEFACIL_API_KEY"JavaScript
const response = await fetch(`https://pipefacil-server.matchsales.com.br/api/v1/automations`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.PIPEFACIL_API_KEY}`,
},
});
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(
"GET",
f"https://pipefacil-server.matchsales.com.br/api/v1/automations",
headers={"Authorization": f"Bearer {os.environ['PIPEFACIL_API_KEY']}"},
)
response.raise_for_status()
data = response.json() if response.content else NoneParâmetros
| Nome | Local | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
pipelineId | query | string | Não | — |
stageId | query | string | Não | — |
scope | query | string | Não | — |
triggerType | query | string | Não | — |
enabled | query | boolean | Não | — |
Respostas
200Sucesso
| Campo | Tipo | Descrição |
|---|---|---|
data | array | — |
data[].id | string | — |
data[].name | string | — |
data[].version | integer | Versão da definição. A troca de enabled não incrementa a versão. |
data[].enabled | boolean | — |
data[].triggerType | string | — |
data[].scope | string | Valores: global, pipeline, stage. |
data[].pipelineId | string | Aceita null. |
data[].stageId | string | Aceita null. |
data[].outboundChannelId | string | Aceita null. |
data[].respectBusinessHours | boolean | — |
data[].triggerWindow | object | Aceita null. |
data[].conditions | object | Aceita null. |
data[].triggerConfig | object | As credenciais de webhook (headerValue, password) são removidas. Aceita null. |
data[].graphDefinition | AutomationGraph | Grafo do fluxo: até 50 nós e 30 esperas, exatamente um nó trigger, sem ciclos e com todos os nós alcançáveis pelo gatilho. Cada tipo tem regras de saída: condition exige uma aresta branch_ |
data[].graphDefinition.version | integer | Valores: 2. |
data[].graphDefinition.nodes | array | — |
data[].graphDefinition.nodes[].id | string | — |
data[].graphDefinition.nodes[].type | string | Valores: trigger, action, condition, wait, round_robin, end. |
data[].graphDefinition.nodes[].actionType | string | Valores: webhook, send_whatsapp, move_stage, add_tag, remove_tag, set_custom_field, wait, create_task, assign_responsible, add_co_owner, send_meta_conversion, create_lead, send_email, reply_instagram_comment, send_instagram_private_reply, hide_instagram_comment, cia_deal_analysis, create_calendar_event, close_conversation, stop_automations. Aceita null. |
data[].graphDefinition.nodes[].config | object | As propriedades obrigatórias dependem de actionType: webhook exige url; move_stage exige targetStageId; add_tag/remove_tag exigem tagIds não vazio; set_custom_field exige exatamente um entre fieldId e fieldSlug, além de value; assign_responsible exige userId; wait exige delaySeconds, com mínimo de 5. |
data[].graphDefinition.nodes[].condition | object | Aceita null. |
data[].graphDefinition.edges | array | — |
data[].graphDefinition.edges[].id | string | — |
data[].graphDefinition.edges[].source | string | — |
data[].graphDefinition.edges[].target | string | — |
data[].graphDefinition.edges[].sourceHandle | string | next, fallback, branch_<id>, rr_<id>, btn_<id>, replied, timeout ou text_reply. |
data[].actions | array | — |
data[].actions[].id | string | ID da ação. As ações são substituídas na atualização, não alteradas individualmente. |
data[].actions[].type | string | — |
data[].actions[].order | integer | — |
data[].actions[].config | object | O secret do webhook é removido. |
data[].createdAt | string | Formato: date-time. |
data[].updatedAt | string | Formato: date-time. |
data[].secret | string | Presente somente na resposta de criação ou substituição que gerou o segredo. Nunca aparece na leitura. Salve-o: assina X-PipeFacil-Signature-256 e não pode ser consultado depois. Aceita null. |
message | string | Aceita null. |
Esquema OpenAPI
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Automation"
}
},
"message": {
"type": "string",
"nullable": true
}
}
}401Chave ausente, malformada, desconhecida, revogada ou expirada, ou membro emissor inativo.
| Campo | Tipo | Descrição |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
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"
]
}403Autenticado, 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 |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
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"
]
}429Limite de requisições excedido por workspace ou IP.
| Campo | Tipo | Descrição |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
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"
]
}