Skip to main content
POST
Create a record view

Authorizations

hookie_session
string
cookie
required

The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.

Headers

Idempotency-Key
string

Makes a POST safe to retry for 24 hours: the same key, credential, path and body returns the stored response (Idempotent-Replayed: true) instead of running again. 422 if the key was used for a different request; 409 while the first is in flight.

Required string length: 1 - 255

Path Parameters

project_id
string
required

Project id (UUID) belonging to the caller workspace.

Body

application/json
dataset
string
required

The dataset this view reads (a valid dataset name). Sending webhook_id instead is a 400 that says so.

name
string
required
Required string length: 1 - 80
columns
(string | object)[]
required

Payload keys, or the meta columns _id, _received_at, _source. Keys must be unique; a bare string is shorthand for {key, label:key}.

Required array length: 1 - 40 elements
Maximum string length: 128
sort_key
string | null

A column key to sort by, or null/empty for arrival order. Must satisfy the same key rules.

sort_dir
enum<string>
default:desc

Any value other than asc is stored as desc.

Available options:
asc,
desc
is_default
boolean
default:false

Only the literal true counts. Setting it clears the default flag on every other view of the same webhook in the same batch.

portal_shared
boolean

Share this view with the project's portal customer (#376, read-only). A project is one customer's space with one portal, so this is a flag: the customer sees this view's columns over the project's rows of the dataset, provided the portal exposes it. Default false (private).

Response

Created. The echoed view uses the same snake_case keys as the list (id, dataset, name, columns, sort_key, sort_dir, is_default).

view
object
required