Data Hub API Reference
Programmatic access to user attributes and event attributes.
Data Hub API Reference
Covers two resource families: user attributes and event attributes. Both live under single-metadata and follow the standard /{orgName}/projects/{projectName}/... path pattern.
List Attributes
GET /{orgName}/projects/{projectName}/attributes
Returns user attributes for the project, with optional filters and pagination.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (via pageable) |
size | integer | No | Page size (via pageable) |
attributeType | string | No | One of extracted, predicted, scoring, calculated, metric |
scoringType | string | No | Scoring subtype, when attributeType is scoring |
name | string | No | Filter by attribute name |
title | string | No | Filter by attribute title |
createdBy | integer | No | Filter by creator's person ID |
Examples
List all scoring attributes
GET /{orgName}/projects/{projectName}/attributes?attributeType=scoringResponses
200 OK
[
{
"id": 111111111111111111,
"name": "sample_source",
"attributeType": "extracted",
"type": "user",
"title": "Sample Source",
"description": "Sample Stripe source for data",
"example": "500.0",
"active": true,
"lastUpdated": "2026-07-19T10:00:00Z",
"createdBy": 1,
"segmentationAvailable": false,
"pii": true,
"unique": true,
"system": false
}
]400 Bad Request
Invalid filter parameters.
Response Fields
| Field | Type | Description |
|---|---|---|
id | integer | Attribute ID |
name | string | Attribute name |
attributeType | string | extracted, predicted, scoring, calculated, or metric |
type | string | user or account |
title | string | Display title |
description | string | Description |
example | string | Example value |
active | boolean | Whether the attribute is active |
lastUpdated | string (date-time) | Last update timestamp |
createdBy | integer | Creator's person ID |
segmentationAvailable | boolean | Whether this attribute can be used in segment conditions |
pii | boolean | Whether the attribute holds personally identifiable information |
unique | boolean | Whether values must be unique |
system | boolean | Whether this is a system-defined attribute |
Create Attribute
POST /{orgName}/projects/{projectName}/attributes
Creates a user attribute. Required fields are attributeType and title. The exact shape of the request varies by attributeType (for example, extracted and scoring attributes each accept type-specific fields beyond the ones listed below).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
attributeType | string | Yes | extracted, predicted, scoring, calculated, or metric |
title | string | Yes | Display title |
description | string | No | Description |
example | string | No | Example value |
type | string | No | user or account |
active | boolean | No | Whether the attribute is active |
segmentationAvailable | boolean | No | Whether this attribute can be used in segment conditions |
pii | boolean | No | Whether the attribute holds personally identifiable information |
unique | boolean | No | Whether values must be unique |
Retrieve, Update, Delete a Single Attribute
GET /{orgName}/projects/{projectName}/attributes/{attributeId}
PUT /{orgName}/projects/{projectName}/attributes/{attributeId}
DELETE /{orgName}/projects/{projectName}/attributes/{attributeId}
GET returns the same shape as List Attributes above. PUT accepts the same body as Create Attribute. DELETE takes no body.
List Event Attributes
GET /{orgName}/projects/{projectName}/event-attributes
Returns event attributes for a collection.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collectionId | string | Yes | The event collection to list attributes for |
Search Event Attributes
POST /{orgName}/projects/{projectName}/event-attributes
Despite the POST method, this searches and filters existing event attributes rather than creating one. Use this when you need filters beyond what collectionId alone supports on the GET endpoint above.
📘 Good to know
The GET and POST methods on this same path do different things: GET lists by collection, POST searches by a filter body. Don't assume POST here means create.
