Warehouse
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
POST | |
POST | |
POST | |
POST |
List all warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:readQuery parameters
- limitinteger
- offsetinteger
- searchstring
Response
Example request
GET /api /projects /:project_id /warehouse_tablesExample response
Status 200
Create warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writeRequest parameters
- deletedboolean | null
- namestring
- format
- url_patternstring
- credential
- optionsobject
Response
Example request
POST /api /projects /:project_id /warehouse_tablesExample response
Status 201
Retrieve warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /warehouse_tables /:idExample response
Status 200
Update warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Request parameters
- deletedboolean | null
- namestring
- format
- url_patternstring
- credential
- optionsobject
Response
Example request
PATCH /api /projects /:project_id /warehouse_tables /:idExample response
Status 200
Delete warehouse tables
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /warehouse_tables /:idExample response
Status 204 No response body
Create warehouse tables refresh schema
Re-introspect a self-managed (manually linked) warehouse table's schema from its underlying source files and overwrite its stored column list. Use when the source schema has evolved (e.g. new columns in the underlying Delta/Parquet/CSV files) but queries still can't see the new columns, because PostHog serves a cached column snapshot until the table is refreshed. Not for tables managed by an external data source sync — those refresh on their own schedule.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Example request
POST /api /projects /:project_id /warehouse_tables /:id /refresh_schemaExample response
Status 200 Schema refreshed from the table's underlying source
Create warehouse tables replace file
Point a table made from an uploaded file at a new upload, then import it with one full refresh. Upload the new file with upload_file first. The table keeps its id and its name, and its rows are replaced when the sync finishes. The old file is deleted only after that sync succeeds. The sync bills its rows like any other import.
Required API key scopes
warehouse_table:writePath parameters
- idstring
Request parameters
- upload_idstring
- filenamestring
- file_format
Response
Example request
POST /api /projects /:project_id /warehouse_tables /:id /replace_fileExample response
Status 202
Create warehouse tables update schema
Create, Read, Update and Delete Warehouse Tables.
Path parameters
- idstring
Request parameters
- deletedboolean | null
- namestring
- format
- url_patternstring
- credential
- optionsobject
Example request
POST /api /projects /:project_id /warehouse_tables /:id /update_schemaExample response
Status 200 No response body
Create warehouse tables create from upload
Turn a previously uploaded file into a self-managed warehouse table.
The file already sits in PostHog's own bucket (see upload_file), so the table points straight
at it and is read in place — no import pipeline and no recurring sync, the same shape as a linked
S3/GCS bucket. The read location is always derived from the caller's own team, so a client-supplied
upload_id can only resolve inside that team's folder, and the table carries no credential (reads
fall back to the node role, never a user-supplied key).
For a team with object storage sources, the table also gets a file upload source. Its first sync imports the file and turns the same table row into a managed table.
Required API key scopes
warehouse_table:writeRequest parameters
- upload_idstring
- filenamestring
- file_format
- table_namestring
Response
Example request
POST /api /projects /:project_id /warehouse_tables /create_from_uploadExample response
Status 201
Create warehouse tables file
Create, Read, Update and Delete Warehouse Tables.
Required API key scopes
warehouse_table:writeExample request
Example response
Status 200 No response body
Create warehouse tables upload file
Store an uploaded file in object storage so a self-managed table can be created from it.
Uploading is a separate first step from create_from_upload so the create call stays JSON-only:
this returns an upload_id the caller passes back to build the table. The file is written under
a team-scoped prefix, so a table can only ever read back its own team's uploads.
Required API key scopes
warehouse_table:write










