Pular para o conteúdo
CognizyCognizyAjuda
Entrar
Nesta área

Contacts

List contacts and manage their tags.

List or search contacts

get/v1/public/contacts

Returns a paginated list of contacts in your organization. Use query for free-text search across name/email/phone.

Parâmetros

limitnumberopcional· consulta
Range 1–100, default 25
pagenumberopcional· consulta
hasPhonebooleanopcional· consulta
hasEmailbooleanopcional· consulta
tagIdstringopcional· consulta
Filter to contacts that have this tag. Repeat to OR multiple.
querystringopcional· consulta
Free-text search across name/email/phone

Respostas

  • 200

Exemplos

bash
curl -X GET "https://api.cognizy.ai/api/v1/public/contacts" \
  -H "Authorization: Bearer $COGNIZY_API_KEY"

Get a contact by id

get/v1/public/contacts/{id}

Returns the full contact record including recent conversations, deals, appointments, tags, and custom fields.

Parâmetros

idstringobrigatório· caminho
Contact ID

Respostas

  • 200Contact record returned
  • 404Contact not found

Exemplos

bash
curl -X GET "https://api.cognizy.ai/api/v1/public/contacts/<id>" \
  -H "Authorization: Bearer $COGNIZY_API_KEY"

Add a tag to a contact

post/v1/public/contacts/{id}/tags

Aceita Idempotency-Key

Attaches an existing tag to a contact. Idempotent — calling twice with the same pair is a no-op (no error). Same effect as the in-app dashboard tagging.

Parâmetros

idstringobrigatório· caminho
Contact ID

Corpo (JSON)obrigatório

tagIdstringobrigatório
Tag ID to attach to the contact

Respostas

  • 204Tag attached (or already attached — idempotent)
  • 400Missing or invalid `tagId`
  • 404Contact or tag not found

Exemplos

bash
curl -X POST "https://api.cognizy.ai/api/v1/public/contacts/<id>/tags" \
  -H "Authorization: Bearer $COGNIZY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "tagId": "tag_123"
}'

Remove a tag from a contact

delete/v1/public/contacts/{id}/tags/{tagId}

Detaches a tag from a contact. Returns 204 even if the tag wasn't attached (the postcondition holds regardless).

Parâmetros

idstringobrigatório· caminho
Contact ID
tagIdstringobrigatório· caminho
Tag ID to detach

Respostas

  • 204Tag detached (or was not attached — idempotent)
  • 404Contact or tag not found

Exemplos

bash
curl -X DELETE "https://api.cognizy.ai/api/v1/public/contacts/<id>/tags/<tagId>" \
  -H "Authorization: Bearer $COGNIZY_API_KEY"

Toda a referência