Read and change grouped reader extra data
Store reader text under a group and field name. Read, edit or remove values, or suggest names already used in the publication.
| Task | Operation | Allowed credentials |
|---|---|---|
| Read one reader’s grouped values | GET /api/v1/admin/users/{user_id}/extra/data | readonly, manager, support, admin or partner, or root |
| Create or update specific field values | PUT /api/v1/admin/users/{user_id}/extra/data | admin or partner, or root |
| Remove specific stored fields | DELETE /api/v1/admin/users/{user_id}/extra/data | admin or partner, or root |
| Discover group names used in this audience | GET /api/v1/admin/resources/users/extra/data/groups | readonly, manager, support, admin or partner, or root |
| Discover field names, optionally within a group | GET /api/v1/admin/resources/users/extra/data/fields | readonly, manager, support, admin or partner, or root |
Existing context and storage
Use the API address, token and publication public key supplied by your operator. Send the key in resource. Service accounts cannot use these five routes, including those with full_access. Keep privileged calls in trusted server code.
| Input | Location / type | Meaning |
|---|---|---|
| resource | Required header, publication public-key string | Selects the publication whose reader data is read or changed. Not a numeric resource ID or secret. |
| token | Required header, existing authorized token string | ADMIN_TOKEN in examples. readonly is inherited by manager/support/admin/partner. Writes start at admin, inherited by partner; root is permitted. support alone cannot write. |
| user_id | Reader path value on the three reader operations | Known global account ID. Use a numeric ID supplied by existing account records. |
The caller must be active; their current publication relationship, when present, must not be locked or suspended. Reader-specific calls require the intended account and its publication relationship. A missing account or relationship produces the route’s generic HTTP 409 error.
Each row belongs to a reader, publication, group_key and field_key. This is separate from the older relationship-extra JSON map. Group names label storage; they do not define schemas, permissions or provider actions. Name discovery reads existing data rather than allowed-field configuration.
Example conventions
Examples use fictional reader 1002, publication ID 2001 and row IDs 9001/9002. Requests use cURL, Node.js 18+ fetch in an ES module (.mjs), and Python 3 urllib. Set WALLKIT_API_BASE to scheme and host only, plus existing RESOURCE_KEY and ADMIN_TOKEN. Returned publication IDs are not header keys. Diagnostics can add fields; see response conventions.
Read a reader’s stored groups and fields
GET /api/v1/admin/users/{user_id}/extra/data
Read all grouped values stored for one reader in this publication.
Before you call
Use a readonly-or-inherited Admin token, or root, with the reader ID and publication key. The publication relationship is required even when no extra-data rows exist.
Request
Send the path and headers without a body. This read returns all grouped rows for the reader/publication; no group/field filter, pagination or sort option is supported.
Response
HTTP 200 returns items in the grouped record shape. These are stored values, not field definitions. An empty collection is valid after target checks pass.
Example: Read a reader’s preferences
Assume one row exists: preferences/theme with value dark.
curl "${WALLKIT_API_BASE}/api/v1/admin/users/1002/extra/data" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/1002/extra/data`);
const response = await fetch(url, {
method: "GET",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/1002/extra/data"
request = Request(
url,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
method="GET"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
HTTP 200 response:
{
"items": {
"preferences": [
{
"id": 9001,
"user_id": 1002,
"resource_id": 2001,
"group_key": "preferences",
"field_key": "theme",
"field_value": "dark",
"created_at": "2026-10-01 12:00:00",
"updated_at": "2026-10-31 12:00:00"
}
]
}
}
The reader has no extra-data rows
HTTP 200 response:
{
"items": []
}
The reader and publication relationship exist, but no grouped rows were returned. The older JSON extra map and other-publication data are separate.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 409 | error_get_user_extra_data | Account/relationship lookup or a caught data-read exception failed. | Check the known reader ID and publication key against existing audience records; use req_guid for operator investigation if they match. |
| 200 | items [] | No extra-data rows for this reader/publication. | Display an empty value state or create an intended field through the update operation. |
| Varies | Other PHP/transport failure | Not every failure becomes the documented Exception response. | Retain any request reference and ask the integration operator to inspect the failure. |
See shared errors. Update a field when you have a value to store.
Create or update individual field values
PUT /api/v1/admin/users/{user_id}/extra/data
Create a missing group/field row or replace its value. Omitted pairs stay unchanged. This is not whole-collection replacement or recursive JSON merging.
Before you call
Use an admin-or-inherited token, or root, and a reader with an existing publication relationship. Choose the group/field pair. A different key addresses a different pair; it does not rename the old row.
Request
Send JSON with Content-Type: application/json and a nonempty extra_groups array of entry objects.
| Field | Type / requirement | Meaning and constraints |
|---|---|---|
| extra_groups | Required nonempty array of objects | Entries to process. Missing/null/empty collection is rejected; an empty list does not clear data. |
| extra_groups[].group_key | Explicit string | Trimmed group label. Empty/whitespace and string "0" are skipped. No automatic default-group substitution. |
| extra_groups[].field_key | Explicit string | Trimmed field label. Empty/whitespace and string "0" are skipped. |
| extra_groups[].field_value | Explicit string recommended | Sanitized as string and trimmed, then assigned to the row. Empty string is not automatically skipped. Missing/null is not a delete instruction or a uniformly validated null protocol. |
Use strings for field values rather than arrays, objects or implicit conversion. Malformed entries may fail without a uniform validation error. If every entry has skipped keys, HTTP 200 can return unchanged data.
Entries are processed in sequence. Later failure can follow earlier changes or events. The returned collection does not confirm every submitted entry was saved. Inspect values before repeating a pair; a repeated request is not an atomic or uniqueness guarantee.
Response
HTTP 200 returns all reader/publication rows in items, using the grouped shape. Match values by group and field labels. There is no affected-row count, per-entry result or status success wrapper.
Example: Change theme while retaining locale
Assume preferences/theme is light and preferences/locale is en. The request changes theme to dark; the omitted locale stays. Timestamps are illustrative; unchanged rows keep their saved timestamps.
curl "${WALLKIT_API_BASE}/api/v1/admin/users/1002/extra/data" \
-X PUT \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"extra_groups":[{"group_key":"preferences","field_key":"theme","field_value":"dark"}]}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/1002/extra/data`);
const response = await fetch(url, {
method: "PUT",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
body: JSON.stringify({"extra_groups": [{"group_key": "preferences", "field_key": "theme", "field_value": "dark"}]})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/1002/extra/data"
body = json.dumps({'extra_groups': [{'group_key': 'preferences', 'field_key': 'theme', 'field_value': 'dark'}]}).encode("utf-8")
request = Request(
url,
data=body,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
method="PUT"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
HTTP 200 response after the intended writes succeed:
{
"items": {
"preferences": [
{
"id": 9001,
"user_id": 1002,
"resource_id": 2001,
"group_key": "preferences",
"field_key": "theme",
"field_value": "dark",
"created_at": "2026-10-01 12:00:00",
"updated_at": "2026-10-31 12:00:00"
},
{
"id": 9002,
"user_id": 1002,
"resource_id": 2001,
"group_key": "preferences",
"field_key": "locale",
"field_value": "en",
"created_at": "2026-10-01 12:00:00",
"updated_at": "2026-10-01 12:00:00"
}
]
}
}
An empty entry list is rejected
HTTP 409 response for an empty extra_groups list:
{
"error": "error_update_user_extra_data",
"error_description": "Update user extra data is failed",
"req_guid": "example-request"
}
An empty list does not clear data. The same error code can mean target lookup or another caught processing failure; it does not identify the list as the only possible cause.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 409 | error_update_user_extra_data | Invalid/empty parsed body or list, missing account/relationship, or caught processing exception. | Check body shape, explicit keys/value and existing audience context; inspect current values before repeating a write that may have partly succeeded. |
| 200 | Unchanged/missing expected rows in items | Entries may have been skipped or saves may not have persisted. | Compare the returned group/field rows with the intended values; do not treat the number of submitted entries as a success count. |
| Varies / no response | Other PHP/transport failure | Changes can precede failure; no rollback is guaranteed. | Ask the integration operator to inspect current state using the request reference if available before resubmission. |
See shared errors. Read stored values to inspect the result, including after a partial failure.
Remove specific stored field rows
DELETE /api/v1/admin/users/{user_id}/extra/data
Remove selected group/field rows for this reader and publication. Other rows, the account and publication configuration remain.
Before you call
Use an admin-or-inherited token, or root. The publication relationship and intended row must exist. Read current pairs first; deleting an absent row is not a safe no-op.
Request
Send a JSON body with Content-Type: application/json, including for DELETE.
| Field | Type / requirement | Meaning and constraints |
|---|---|---|
| extra_groups | Required nonempty array of objects | Specific pairs to process; missing/null/empty list is rejected, not a clear-all instruction. |
| extra_groups[].group_key | Explicit string | Trimmed group label; empty/whitespace and "0" are skipped. |
| extra_groups[].field_key | Explicit string | Trimmed field label; empty/whitespace and "0" are skipped. |
Send only the group and field keys; no value is needed. Each pair selects its first matching row, so duplicates may remain. Entries with empty keys can leave data unchanged while the request reports completion.
Response
Nominal HTTP 200 adds no operation result, items, status marker or count. Without diagnostics or other additions, the body is []; diagnostics can make it an object. Read the remaining rows to confirm each intended removal.
An absent pair can fail without the documented 409 response. Earlier deletions or events can remain if a later pair fails. Inspect remaining rows before repeating; the error does not establish that all changes were reversed.
Example: Remove the existing theme row
Assume preferences/theme exists for reader 1002. The request leaves preferences/locale alone.
curl "${WALLKIT_API_BASE}/api/v1/admin/users/1002/extra/data" \
-X DELETE \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"extra_groups":[{"group_key":"preferences","field_key":"theme"}]}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/1002/extra/data`);
const response = await fetch(url, {
method: "DELETE",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
body: JSON.stringify({"extra_groups": [{"group_key": "preferences", "field_key": "theme"}]})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/1002/extra/data"
body = json.dumps({'extra_groups': [{'group_key': 'preferences', 'field_key': 'theme'}]}).encode("utf-8")
request = Request(
url,
data=body,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
method="DELETE"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
Nominal HTTP 200 response without diagnostics:
[]
The request has no field pairs
HTTP 409 response for an empty extra_groups list:
{
"error": "error_delete_user_extra_data",
"error_description": "Delete user extra data is failed",
"req_guid": "example-request"
}
An empty list is not clear-all. The generic code also covers other caught failures; a missing-row PHP error has no guaranteed JSON/status shape.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 409 | error_delete_user_extra_data | Body/list/account/relationship check or a caught processing exception failed. | Check explicit pairs and context, then inspect current reader rows before deciding on another deletion. |
| 200 | Nominal [] or diagnostic object | Processing completed without an operation-specific result or count; inspect the saved rows. | Read the current collection to inspect whether each intended row remains. |
| Varies / no response | Missing-row or other PHP/transport failure | There is no guaranteed harmless missing-row path; earlier deletions may already have occurred. | Do not retry blindly. Read current rows and ask the integration operator to investigate before another write. |
See shared errors. Read remaining values to verify state. Do not verify an absent pair by deleting it again.
Discover group names used across the audience
GET /api/v1/admin/resources/users/extra/data/groups
Suggest group names found in the selected publication’s audience data. These are observed labels, not configured definitions or an allowed-group schema.
Before you call
Use a readonly-or-inherited Admin token, or root, and the publication key. There is no reader ID or active-audience filter. Results contain names rather than reader values or IDs.
Request
No body is needed. No pagination or limit is consumed.
| Query input | Type / requirement | Meaning |
|---|---|---|
| needle | Optional string | Trimmed, case-insensitive group-name substring search. Empty/"0" acts absent. Matching can use % and _ as wildcard characters rather than literal text. |
Response
HTTP 200 returns sorted, distinct stored group names in items; existing null keys are not explicitly excluded. There are no group IDs, definitions, counts or schemas. An empty list can mean no matches or a caught query failure.
Example: Suggest group names containing pref
curl "${WALLKIT_API_BASE}/api/v1/admin/resources/users/extra/data/groups" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
--get \
--data-urlencode 'needle=pref'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/resources/users/extra/data/groups`);
url.search = new URLSearchParams({"needle": "pref"}).toString();
const response = await fetch(url, {
method: "GET",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from urllib.parse import urlencode
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/resources/users/extra/data/groups"
url += "?" + urlencode({'needle': 'pref'})
request = Request(
url,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
method="GET"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
HTTP 200 response:
{
"items": [
"preferences"
]
}
No group names are returned
HTTP 200 response:
{
"items": []
}
Use this as an empty suggestion list. If unexpected, check the publication and search text, then ask the operator to inspect logged failures. It says nothing about configured schemas.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 200 | items [] | No matching stored keys, or a caught helper query failure. | Display no suggestions; investigate unexpected emptiness rather than concluding every group was deleted. |
| 409 | error_retrieve_resource_user_extra_data_groups | An exception reached the outer action. | Check the selected publication context and provide req_guid to the integration operator. Not every database failure reaches this error. |
| Varies | Other PHP/transport failure | No uniform response covers every failure. | Retain any request reference and ask the integration operator to inspect it. |
See shared errors. Suggest fields in a group, or store an intended new pair without requiring a prior suggestion.
Discover field names, optionally within one group
GET /api/v1/admin/resources/users/extra/data/fields
Suggest field names found in stored audience data. Select a group for group-specific names, or omit it for names across all groups. Results do not contain definitions or values.
Before you call
Use a readonly-or-inherited Admin token, or root, and the publication key. No target reader is selected. Specify a group if you need that context; the all-groups response does not map names to groups.
Request
No body, pagination or limit is consumed.
| Query input | Type / requirement | Meaning |
|---|---|---|
| group_key | Optional string | Trimmed exact group-key equality when nonempty. Omitted/empty/"0" means all groups, not a default group or validation failure. This selects stored labels, rather than validating a group definition. |
| needle | Optional string | Trimmed, case-insensitive field-name substring search. Empty/"0" acts absent. Matching can use % and _ as wildcard characters rather than literal text. |
Response
HTTP 200 returns sorted, distinct field names in items; existing null keys are not explicitly excluded. There are no values, types, required flags, group mappings or counts. Across groups, duplicate names collapse to one suggestion. An empty list can also mean a caught query failure.
Example: Suggest fields in preferences containing the
curl "${WALLKIT_API_BASE}/api/v1/admin/resources/users/extra/data/fields" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
--get \
--data-urlencode 'group_key=preferences' \
--data-urlencode 'needle=the'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/resources/users/extra/data/fields`);
url.search = new URLSearchParams({"group_key": "preferences", "needle": "the"}).toString();
const response = await fetch(url, {
method: "GET",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from urllib.parse import urlencode
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/resources/users/extra/data/fields"
url += "?" + urlencode({'group_key': 'preferences', 'needle': 'the'})
request = Request(
url,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
method="GET"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
HTTP 200 response:
{
"items": [
"theme"
]
}
No field names are returned
HTTP 200 response:
{
"items": []
}
No names can mean no matching stored fields or a caught failure. It does not establish that the group exists, that all readers lack values, or that new names are forbidden.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 200 | items [] | No matches, an unknown group, or a caught helper query failure. | Check group spelling, selected publication and search text; investigate unexpected emptiness through the integration operator. |
| 409 | error_retrieve_resource_user_extra_data_fields | An exception reached the outer action. | Provide req_guid and intended group/search to the integration operator. Not every database failure becomes this error. |
| Varies | Other PHP/transport failure | No uniform response covers every failure. | Retain any request reference and ask the integration operator to inspect it. |
See shared errors. Read a reader’s values or store a field; suggestions do not identify one reader’s data.
Stored records and grouped responses
GET and PUT return all reader/publication rows in items, grouped by group_key. Text keys such as preferences map to arrays of records. Empty data is items: []. Numeric-looking keys can make items a JSON array; handle both object and array shapes. There is no pagination, stable order or universal uniqueness guarantee.
Each row contains these eight fields:
| Field | Type / presence | Meaning |
|---|---|---|
| id | Stored identifier | Extra-data row ID, distinct from the reader and publication IDs. Identifier scalar representation follows stored values. |
| user_id | Stored identifier | Global account whose value is stored. |
| resource_id | Stored identifier | Publication to which this row belongs; no global/other-publication fallback is added. |
| group_key | Stored string, potentially null in existing data | Group label and grouping key. This is not a schema definition ID. |
| field_key | Stored string, potentially null in existing data | Field label within its group. The same name in another group identifies a different context. |
| field_value | Stored string or null | Value text; not automatically decoded JSON or a nested map to merge. |
| created_at | Stored timestamp | Row creation time, not reader-account creation time. Timezone is unspecified. |
| updated_at | Stored timestamp, potentially null in existing data | Latest row-save timestamp, not proof of an external-provider update. |
Writes trim keys without lowercasing or slugifying them. No request-length or row-count limit is defined here. Use concise strings; incompatible or overly long values may not produce a clean validation error.