Pular para o conteúdo
Contatos

Criar contato

v1.0.0
POSThttps://api.growthaisystem.com/api/v1/contacts
  • ExigeAuthorization: Bearer gos_…— Chave de API (gos_…)· escoposcontacts.write

Aceita Idempotency-Key. Para criar-ou-atualizar sem duplicar, use /contacts/upsert.

Corpo da requisição

application/jsonobrigatório
  • namestringobrigatório
    • tamanho 1–200
  • phonestring | nullopcional
    • tamanho máx. 20
  • emailstring (email) | nullopcional
    • tamanho máx. 200
    • regex "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\…
  • companystring | nullopcional
    • tamanho máx. 200
  • cpfstring | nullopcional
    • tamanho máx. 20
  • rolestring | nullopcional
    • tamanho máx. 120
  • notesstring | nullopcional
    • tamanho máx. 10000
  • tagsstring[]opcional
    • itens máx. 50
  • customFieldsobjeto livreopcional
    • chave string
    • valor qualquer valor JSON

Respostas

11 respostas documentadas — o código, o que ele significa nesta rota e a forma do corpo.

200Deu certoapplication/json

A Idempotency-Key repetiu uma criação anterior: devolve o MESMO contato de antes, com idempotency_replay: true. Nada novo foi criado.

V1ContactEscrito

  • idstring
  • namestring
  • phonestring | null
  • emailstring | null
  • companystring | null
  • companyIdstring | null
  • rolestring | null
  • cpfstring | null
  • notesstring | null
  • tagsstring[]
  • statusstring
    • um de"active""archived""merged"
  • ownerUserIdstring | null
  • originstring
  • customFieldsobjeto livre
    • chave string
    • valor qualquer valor JSON
  • createdAtstring
  • updatedAtstring
  • urlstring
    • sourcestring | null
    • mediumstring | null
    • campaignstring | null
    • termstring | null
    • contentstring | null
  • firstHumanTouchAtstring | nullpode faltar
  • lastHumanTouchAtstring | nullpode faltar
  • humanTouchCountintegerpode faltar

    Quantos toques humanos este contato recebeu (cada mensagem, ligação, e-mail ou nota com actor: "user" em /interactions conta um). 0 = nenhum. Mesma fonte de firstHumanTouchAt/lastHumanTouchAt; só vem em GET /contacts/{id}.

    • mín. 0
  • firstHumanTouchChannelstring | nullpode faltar

    O canal do PRIMEIRO toque humano — o mesmo registro de firstHumanTouchAt, no vocabulário de channel de /interactions (whatsapp, instagram, facebook, call, email, note…). Dois toques no mesmo instante: vale o de menor id de /interactions. null = nunca houve toque humano.

  • idempotency_replaybooleanpode faltar

    Só presente (e sempre true) quando a Idempotency-Key repetiu uma escrita anterior.