inbox.schedule
Agendar mensagens em uma conversa. Agenda de 1 a 5 itens (texto até 4096 ou arquivo de POST /api/v1/uploads, com legenda opcional) para scheduledAt (ISO, de 30 s a 30 dias à frente). O worker envia no horário, só com a janela de 24 h aberta; senão a agendada falha com o motivo. Um arquivo + um texto sai como arquivo com legenda. Só canais com agendamento. Nota interna não agenda.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/inbox.schedule(corpo JSON) - Quem pode chamar: membro da conta
- Escopo da chave:
messages:send - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
inbox_schedule - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdinbox.schedule)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
conversationId | string (uuid) | sim | |
scheduledAt | string (date-time) | sim | |
timezone | string | sim | |
contents | object[] | sim | |
replyToMessageId | string (uuid) | não |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"conversationId": {
"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)$"
},
"scheduledAt": {
"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)))$"
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"contents": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "text"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
},
"required": [
"kind",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "upload"
},
"uploadId": {
"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)$"
},
"caption": {
"type": "string",
"maxLength": 1024
}
},
"required": [
"kind",
"uploadId"
],
"additionalProperties": false
}
]
}
},
"replyToMessageId": {
"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": [
"conversationId",
"scheduledAt",
"timezone",
"contents"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/inbox.schedule \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"conversationId":"00000000-0000-0000-0000-000000000000","scheduledAt":"2030-01-01T12:00:00-03:00","timezone":"America/Sao_Paulo","contents":[{"kind":"text","text":"Bom dia!"}]}'CLI:
node cli/atomiks.mjs inbox.schedule --json '{"conversationId":"00000000-0000-0000-0000-000000000000","scheduledAt":"2030-01-01T12:00:00-03:00","timezone":"America/Sao_Paulo","contents":[{"kind":"text","text":"Bom dia!"}]}'MCP: ferramenta inbox_schedule com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"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": [
"id"
],
"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).