Get a contact
Reads one contact by its Wakio id or your own external_id.
GET /v1/contacts/{id}
Example
curl https://api.wakio.net/v1/contacts/con_7Hq2LpXz4VnBw8tRjG6sYe \
-H "Authorization: Bearer $WAKIO_API_KEY"
Response 200:
{
"id": "con_7Hq2LpXz4VnBw8tRjG6sYe",
"external_id": "user_8812",
"email": "[email protected]",
"first_name": "Maya",
"last_name": "Okafor",
"source": "signup-form",
"status": "active",
"fields": {
"plan": "pro"
},
"lists": [
{
"id": "lst_5KfN9cDmA3xUvQ2yRhP8Zt",
"status": "subscribed"
}
],
"suppression": null
}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | In the path: the contact's Wakio id, such as con_…, or your own external_id. Escape any / in an external_id as %2F. |
Response
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The contact's id, such as con_…. |
external_id | string | Yes | Your own id for this person, or null when none is set. |
email | string | Yes | The contact's address. |
first_name | string | Yes | First name, or null. |
last_name | string | Yes | Last name, or null. |
source | string | Yes | The free-text source label, or null. |
status | string | Yes | One of active, unsubscribed, unreachable, or never_subscribed. Only active contacts receive campaigns and flows. |
fields | object | Yes | The contact's custom field values, keyed by field key, such as { "plan": "pro" }. {} when none is set. |
lists | array | Yes | One { "id", "status" } for each list the contact is on or has left. Oldest list first. |
lists[].id | string | Yes | The list's id, such as lst_…. |
lists[].status | string | Yes | subscribed or unsubscribed. |
suppression | object or null | Yes | Why Wakio will not send marketing email to the address, as { "reason", "scope" }, or null when nothing blocks it. |
Errors
Every error this endpoint itself returns is {"error": "<code>"}, sometimes with one more field that explains it. The API overview lists the responses that do not follow that shape.
| Status | Code | What happened | What to do |
|---|---|---|---|
401 | invalid_api_key | The Authorization header is missing, malformed, or names no active key. | Send Authorization: Bearer <key> with an active key from API keys in the dashboard. |
403 | insufficient_scope | The key does not carry the scope this endpoint needs. scope names it. | Issue a key with Can manage contacts ticked under API keys, and use it for this call. |
404 | contact_not_found | No contact in your account has this id. A con_… id is only ever looked up as a Wakio id, never as an external_id. | Check the id, or use the external_id you stored on the contact. |
Notes
The id in the path is either the contact's Wakio id or the external_id you stored. An id that looks like a Wakio id is only looked up as one, so an external_id that happens to look like con_… is never found this way. Your external_id can hold dots, @ and spaces. Escape a / in it as %2F.
Read status, lists and suppression together. lists shows each list the person is on or left, and suppression says why Wakio will not send marketing email to the address, or is null when nothing blocks it. A sync that mirrors only status misses a person who left one list, or an address that bounced.
This call needs a key with the Can manage contacts scope. A key that can only send answers 403 insufficient_scope.