Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Pass your API key as the Bearer token. See Authentication.

Body

application/json
name
string
required

Short display name. Put details in description.

datasourceId
string
required

ID of the datasource this dimension belongs to

identifierType
string
required

Type of identifier (user, anonymous, etc.)

query
string
required

SQL query or equivalent for the dimension

description
string

Description of the dimension

Maximum string length: 10000
owner
string

The userId or email address of the owner. If an email address is provided, it will be used to look up the userId of the matching organization member. If an ID is provided, it will be validated as existing in the organization.

timing
enum<string>

What the query returns and how the value at a unit's first exposure is resolved. none (default): one value per unit, resolved with MAX(value). rowTimestamp: timestamped rows; the query also returns a timestamp column and the latest row at or before first exposure is used. validityRange: validity ranges; the query also returns start_timestamp and end_timestamp (NULL = still valid) columns and the row valid at first exposure is used. Only supported for SQL Data Sources.

Available options:
none,
rowTimestamp,
validityRange
nullLabel
string

Label used in experiment results for units with no dimension value. Leave empty to use the default null label.

Maximum string length: 100
managedBy
enum<string>

Where this dimension must be managed from. If not set (empty string), it can be managed from anywhere.

Available options:
,
api

Response

Resource created

dimension
object
required