Skip to main content
POST
/
fact-tables
/
{id}
cURL
curl -X POST https://api.growthbook.io/api/v1/fact-tables/ftb_abc123 \
  -d '{"name": "New Fact Table Name"}' \
  -u secret_abc123DEF456:
{
  "factTable": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "owner": "<unknown>",
    "projects": [
      "<string>"
    ],
    "tags": [
      "<string>"
    ],
    "datasource": "<string>",
    "userIdTypes": [
      "<string>"
    ],
    "sql": "<string>",
    "managedBy": "",
    "dateCreated": "2023-11-07T05:31:56Z",
    "dateUpdated": "2023-11-07T05:31:56Z",
    "eventName": "<string>",
    "columns": [
      {
        "column": "<string>",
        "datatype": "number",
        "deleted": false,
        "numberFormat": "",
        "jsonFields": {},
        "name": "<string>",
        "description": "<string>",
        "alwaysInlineFilter": false,
        "isAutoSliceColumn": false,
        "autoSlices": [
          "<string>"
        ],
        "lockedAutoSlices": [
          "<string>"
        ],
        "dateCreated": "2023-11-07T05:31:56Z",
        "dateUpdated": "2023-11-07T05:31:56Z"
      }
    ],
    "columnsError": "<string>",
    "archived": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"

Path Parameters

id
string
required

The id of the requested resource

Body

application/json
name
string
description
string

Description of the fact table

owner
any
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"

sql
string

The SQL query for this fact table

eventName
string

The event name used in SQL template variables

columns
object[]

Optional array of columns that you want to update. Only allows updating properties of existing columns. Cannot create new columns or delete existing ones. Columns cannot be added or deleted; column structure is determined by SQL parsing. Slice-related properties require an enterprise license.

columnsError
string | null

Error message if there was an issue parsing the SQL schema

managedBy
enum<string>

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

Available options:
,
api,
admin
archived
boolean

Response

200 - application/json

Success

factTable
object
required