List contact attribute keysMenu

List contact attribute keys

GET/v1/attributes

Requires an API key with the attributes:read scope. About keys and scopes

Works with integration, agent and partner keys. Also available to embed sessions.

Lists every attribute key your contacts carry, with its inferred type and how many contacts have it: the pickers for segment rules and merge tags. Read from an index up to five minutes old (a contact import refreshes it at once). A list key takes contains, notContains, exists and notExists in rules. masked says whether the workspace hides the key's values from members and embed sessions; an API key sees them either way. description is what an admin wrote the key means. query and type filter across every page; keys come in key order.

Query parameters

limitintegeroptional

How many items a page holds: 1 to 100, 20 by default.

min > 0 · max 100 · default 20

cursorstringoptional

Where the page starts: the previous page's meta.pagination.nextCursor. Omit it for the first page, and send the same filters with it.

1–2,048 characters

querystringoptional

Only keys containing this, ignoring case.

1–128 characters

typestringoptional

Only keys of this type.

one of string, number, boolean, date, list, mixed

Header parameters

Kirora-Workspacestringoptional

Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

pattern ^[A-Za-z0-9._:-]{1,128}$

Returns

Returns 200 OK with a list of Attribute objects in data, and the next page's cursor in meta (see pagination). Otherwise returns an error; Errors lists every code and which to retry.

keystringrequired

The attribute key, as written on contacts.

typestringrequired

Inferred from the values held. list: every value is an array (["running", "yoga"], a form's checkboxes); mixed: more than one type.

one of string, number, boolean, date, list, mixed

contactCountintegerrequired

Contacts that have this key.

min 0

maskedbooleanrequired

Masked in workspace settings: members see the key, not its values.

descriptionstring | nullrequired

What the key means, as an admin described it; null when none.