Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

Path Parameters

id
string
required

The id of the requested resource

Body

application/json
name
string
description
string

Description of the fact table

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.

projects
string[]

List of associated project ids

tags
string[]

List of associated tags

userIdTypes
string[]

List of identifier columns in this table. For example, "id" or "anonymous_id"

userIdColumns
object

Maps an identifier type to the column holding it, for SQL that does not alias its columns to the identifier type names, e.g. {"user_id": "userId"}. May also be a single-level field path into a JSON column (properties.userId). Unmapped types use the identifier type name as the column name.

aggregatedFactTableSettings
object

Settings for maintaining shared daily aggregated tables (a subset of userIdTypes plus the daily update time and restate lookback window) used to speed up CUPED. Requires the data pipeline (pipeline-mode) feature.

sql
string

The SQL query for this fact table

timestampColumn
string

The column holding the event timestamp. Must be a date column on this fact table. Defaults to "timestamp" when unset.

eventName
string

The event name used in SQL template variables

columns
object[]

Optional array of columns to upsert by column: existing columns are patched, new columns are created, and columns not included are left unchanged. Omit datatype to leave an existing column's type untouched; send "" to reset it for auto-detection; new columns are auto-detected when datatype is omitted or "". Slice-related properties require an enterprise license.

managedBy
enum<string>

Set this to "api" to disable editing in the GrowthBook UI

Available options:
,
api,
admin
archived
boolean

Response

200 - application/json

Resource created

factTable
object
required