Contatos
Workspace contacts
GET/api/contacts
The team's contacts: distinct numbers that have talked to the agents
Required scope: contacts.read
| Parameter | In | Required |
|---|---|---|
search | query | no |
filter | query | no |
page | query | no |
limit | query | no |
bash
curl "https://api.zapyflow.com.br/api/contacts" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK403— Forbidden, or the key lacks this scope
GET/api/contacts/{phone}
Contact detail: conversations, recent messages and tags
Required scope: contacts.read
| Parameter | In | Required |
|---|---|---|
phone | path | yes |
bash
curl "https://api.zapyflow.com.br/api/contacts/{phone}" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK403— Forbidden, or the key lacks this scope404— Not found — also returned when the resource belongs to another workspace
PATCH/api/contacts/{phone}/tags
Replace the contact's tags
Required scope: contacts.write
| Parameter | In | Required |
|---|---|---|
phone | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
tags | string | object[] | yes | ≤ 20 items |
bash
curl -X PATCH "https://api.zapyflow.com.br/api/contacts/{phone}/tags" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK403— Forbidden, or the key lacks this scope404— Not found — also returned when the resource belongs to another workspace422— Understood, but rejected by a rule
GET/api/contacts/export
Export contacts to CSV (max 10,000 rows)
Required scope: contacts.export
| Parameter | In | Required |
|---|---|---|
search | query | no |
filter | query | no |
acknowledged | query | no |
bash
curl "https://api.zapyflow.com.br/api/contacts/export" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK403— Forbidden, or the key lacks this scope428— Requires an explicit acknowledgement
POST/api/contacts/import
Import contacts from a CSV, with no prior conversation required
Required scope: contacts.import
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
csv | string | yes | min 1, max 5242880 |
bash
curl -X POST "https://api.zapyflow.com.br/api/contacts/import" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK400— Malformed request403— Forbidden, or the key lacks this scope
GET/api/contacts/tags
The team's tags, each with its colour
Required scope: contacts.read
bash
curl "https://api.zapyflow.com.br/api/contacts/tags" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK403— Forbidden, or the key lacks this scope