Ver .md

companies.update

Editar empresa. Muda só o que vier; null (ou texto vazio) limpa um campo opcional. A razão social não pode ficar vazia.

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

Entrada

CampoTipoObrigatórioNota
idstring (uuid)sim
legalNamestringnão
tradeNamestring | nullnão
taxIdstring | nullnão
taxIdTypestring | nullnão
emailstring | nullnão
phonestring | nullnão
websitestring | nullnão
addressStreetstring | nullnão
addressCitystring | nullnão
addressStatestring | nullnão
addressPostalCodestring | nullnão
countryCodestring | nullnão
industrystring | nullnão
sizeTier"SMB" | "MID" | "ENTERPRISE" | nullnão
JSON Schema
{
  "$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)$"
    },
    "legalName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "tradeName": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "taxId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 32
        },
        {
          "type": "null"
        }
      ]
    },
    "taxIdType": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 16
        },
        {
          "type": "null"
        }
      ]
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 254
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "website": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "addressStreet": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "addressCity": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "addressState": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2
        },
        {
          "type": "null"
        }
      ]
    },
    "addressPostalCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 16
        },
        {
          "type": "null"
        }
      ]
    },
    "countryCode": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 3
        },
        {
          "type": "null"
        }
      ]
    },
    "industry": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "sizeTier": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "SMB",
            "MID",
            "ENTERPRISE"
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/companies.update \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"00000000-0000-0000-0000-000000000000","phone":"(11) 3456-7800"}'

CLI:

node cli/atomiks.mjs companies.update --json '{"id":"00000000-0000-0000-0000-000000000000","phone":"(11) 3456-7800"}'

MCP: ferramenta companies_update 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"
    },
    "legalName": {
      "type": "string"
    },
    "tradeName": {
      "type": [
        "string",
        "null"
      ]
    },
    "taxId": {
      "type": [
        "string",
        "null"
      ]
    },
    "taxIdType": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "website": {
      "type": [
        "string",
        "null"
      ]
    },
    "addressStreet": {
      "type": [
        "string",
        "null"
      ]
    },
    "addressCity": {
      "type": [
        "string",
        "null"
      ]
    },
    "addressState": {
      "type": [
        "string",
        "null"
      ]
    },
    "addressPostalCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "countryCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "industry": {
      "type": [
        "string",
        "null"
      ]
    },
    "sizeTier": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "SMB",
            "MID",
            "ENTERPRISE"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "enrichment": {
      "type": "null"
    }
  },
  "required": [
    "id",
    "legalName",
    "tradeName",
    "taxId",
    "taxIdType",
    "email",
    "phone",
    "website",
    "addressStreet",
    "addressCity",
    "addressState",
    "addressPostalCode",
    "countryCode",
    "industry",
    "sizeTier",
    "createdAt",
    "updatedAt",
    "enrichment"
  ],
  "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).