V3 Contact Attribute Keys

List contact attribute keys

Changed on

Returns the contact attribute keys for a workspace. Use the returned key values as targeting.filters[].root.contactAttributeKey when targeting app surveys; dataType hints which operators apply. Requires the Contacts entitlement (403 without it). Session cookie, x-api-key, or a Bearer token.

Optional search, filter[dataType][in], filter[type][in], sortBy and includeTotalCount narrow, order and count the list on the server. Without them the endpoint behaves as before: ordered by id, meta.totalCount is null. The cursor is bound to sortBy and the search/filter set; changing any of them while paging → 400 naming cursor. Unknown query parameters → 400.

get/api/v3/contact-attribute-keys

Request

  • Base URL
    https://app.formbricks.com
  • URL
    https://app.formbricks.com/api/v3/contact-attribute-keys
  • Auth
    • API key in cookie next-auth.session-token
    • or API key in header x-api-key
    • or HTTP bearer

Query parameters

workspaceIdstring cuid2 required

Workspace identifier. This is the canonical container ID for v3 APIs.

limitinteger

Page size (max 250).

cursorstring

Opaque cursor returned as meta.nextCursor from the previous page. Omit on the first request.

includeTotalCountboolean

When true, meta.totalCount is the number of keys matching the search and filters across all pages; otherwise it is null.

searchstring

Case-insensitive substring match over key, name and description.

filter[dataType][in]string[]

Keep only keys with one of these data types. Repeat the parameter or send comma-separated values. Unknown values → 400.

filter[type][in]string[]

Keep only built-in (default) or workspace-defined (custom) keys. Repeat or comma-separate.

sortBy'createdAt' | '-createdAt' | 'name' | 'updatedAt' | '-updatedAt'

Sort order. name sorts by the display name (falling back to key), case-insensitively. A leading - sorts newest first. Omit for the original order (by id).

Response

Contact attribute keys retrieved successfully

Changes

    • info

      added the new optional query request parameter filter[dataType][in]

    • info

      added the new optional query request parameter filter[type][in]

    • info

      added the new optional query request parameter includeTotalCount

    • info

      added the new optional query request parameter search

    • info

      added the new optional query request parameter sortBy

    • info

      added subschema #2 to the response property allOf list for the response status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status