Ver .md

segmentation.tag_create

Criar tag com cor em hexadecimal. Cria a tag com nome (até 40) e cor hexadecimal de 6 dígitos (com ou sem "#"; padrão cinza). Nome único na conta sem diferenciar maiúsculas; repetido dá invalid_input.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/segmentation.tag_create (corpo JSON)
  • Quem pode chamar: membro da conta
  • Escopo da chave: crm:write
  • Grava dados: sim
  • Pela chave de API: sim
  • Ferramenta MCP: segmentation_tag_create
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId segmentation.tag_create)

Entrada

CampoTipoObrigatórioNota
namestringsim
colorstringnão
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "color": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/segmentation.tag_create \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"VIP","color":"#3B82F6"}'

CLI:

node cli/atomiks.mjs segmentation.tag_create --json '{"name":"VIP","color":"#3B82F6"}'

MCP: ferramenta segmentation_tag_create 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"
    },
    "name": {
      "type": "string"
    },
    "color": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "color"
  ],
  "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).