pipelines.bulk_next_action
Criar a próxima ação (tarefa) nas oportunidades em massa. Cria uma tarefa por oportunidade, no contato dela (type: task, call, whatsapp ou meeting). deadline é um instante ISO; attendantId é quem faz.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/pipelines.bulk_next_action(corpo JSON) - Quem pode chamar: membro da conta
- Escopo da chave:
crm:write - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
pipelines_bulk_next_action - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdpipelines.bulk_next_action)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
cardIds | string (uuid)[] | não | |
allMatching | true | não | |
scope | object | não | |
type | "task" | "call" | "whatsapp" | "meeting" | sim | |
title | string | sim | |
deadline | string (date-time) | não | |
description | string | não | |
attendantId | string (uuid) | não |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cardIds": {
"minItems": 1,
"maxItems": 5000,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"allMatching": {
"type": "boolean",
"const": true
},
"scope": {
"type": "object",
"properties": {
"pipelineId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"stageId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"query": {
"type": "object",
"properties": {
"q": {
"type": "string",
"maxLength": 120
},
"attendantId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"attendantIds": {
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"cohort": {
"type": "string",
"maxLength": 64
},
"status": {
"type": "string",
"enum": [
"open",
"won",
"lost",
"all"
]
},
"filter": {
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"matcher": {
"type": "string",
"enum": [
"all",
"any"
]
},
"connector": {
"type": "string",
"enum": [
"and",
"or"
]
},
"conditions": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"maxLength": 60
},
"operator": {
"type": "string",
"maxLength": 30
},
"value": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"maxLength": 4000
},
{
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
{
"type": "null"
}
]
},
"lead": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 64
},
"order": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"field": {
"type": "string",
"maxLength": 60
},
"operator": {
"type": "string",
"maxLength": 30
},
"negation": {
"default": false,
"type": "boolean"
},
"parentId": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
]
},
"valueString": {
"anyOf": [
{
"type": "string",
"maxLength": 4000
},
{
"type": "null"
}
]
},
"valueNumber": {
"type": [
"number",
"null"
]
},
"valueDate": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"valueBool": {
"type": [
"boolean",
"null"
]
},
"valueUuid": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"field",
"operator"
],
"additionalProperties": false
}
}
},
"required": [
"field",
"operator"
]
}
}
},
"required": [
"matcher",
"connector",
"conditions"
]
}
},
"priorities": {
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
}
},
"origins": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 120
}
},
"tagIds": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"productIds": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"companyIds": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"contactIds": {
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"valueMinCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"valueMaxCents": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedClosingDateFrom": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"expectedClosingDateTo": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"cardOrder": {
"type": "string",
"enum": [
"manual",
"createdAtDesc",
"createdAtAsc",
"stageTimeAsc",
"stageTimeDesc"
]
}
}
}
},
"required": [
"pipelineId"
]
},
"type": {
"type": "string",
"enum": [
"task",
"call",
"whatsapp",
"meeting"
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"deadline": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"description": {
"type": "string",
"maxLength": 5000
},
"attendantId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"type",
"title"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/pipelines.bulk_next_action \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cardIds":["00000000-0000-0000-0000-000000000000"],"type":"call","title":"Ligar para fechar"}'CLI:
node cli/atomiks.mjs pipelines.bulk_next_action --json '{"cardIds":["00000000-0000-0000-0000-000000000000"],"type":"call","title":"Ligar para fechar"}'MCP: ferramenta pipelines_bulk_next_action com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "sync"
},
"jobId": {
"type": "null"
},
"affected": {
"type": "number"
},
"skipped": {
"type": "number"
}
},
"required": [
"mode",
"jobId",
"affected",
"skipped"
],
"additionalProperties": false
}Erros
{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).