Skip to content

Workspace API

Workspace Views

Shared Dynamic and Static Views over Accounts, Contacts, and Projects — definitions, Favorites, and follow semantics.

A View is a named, workspace-shared scope over exactly one dataset (account, contact, or project). Dataset and type are immutable after creation. Names are trimmed, non-empty, and case-insensitively unique within a workspace and dataset.

TypeMembership
DynamicLive query. Stores a search term and a where condition. Membership is re-evaluated against current data on every open or search.
StaticExplicit set of record IDs in workspace_view_records. Membership changes only through add/remove.

Definitions and Static membership are shared and editable by every workspace member. Favorites are personal: each member may favorite either type, order their Favorites, and use the resulting sidebar section. Favorites require a user-authenticated session (JWT); API keys cannot manage them.

In this API, follow means putting a record in a Static View (and, when useful, favoriting that View). It does not mean notifications, alerts, or activity subscriptions.

Contact visibility and Static follow

Ordinary POST /workspace/contacts/search remains book-only (workspace_contacts). Static Contact membership is an additional visibility source for web Contacts browse, Contact detail, and View execution: a Contact stays visible after its last project link or book overlay disappears until the last same-workspace Static Contact membership is removed. Adding the first membership still requires the Contact to already be visible; a candidate row cannot bootstrap access.

Removing a record from its last Static View does not delete an existing workspace overlay. Deleting an overlay does not remove Static membership.

Dynamic definitions

A Dynamic definition is { "version": 2, "q": "...", "where": {...} }: the Search chip (q, free text over names, empty for none) and a where condition checked against the View’s dataset. It is the same condition workspace search takes, so a table’s filters, a saved View and an API search are one format.

Account definition
{
"version": 2,
"q": "",
"where": {
"combinator": "and",
"rules": [
{ "field": "type", "operator": "in", "value": ["developer"] },
{ "field": "project.city", "operator": "in", "value": ["Boston"] },
{ "field": "score", "operator": "between", "value": [75, 100] }
]
}
}

A condition may name other saved Views with the field view (“In a saved View”): a Static View counts its members, a Dynamic View its own condition. Views nest at most three deep, never include themselves (view_cycle), and must list the same kind of record (view_dataset_mismatch).

The flat format with version: 1 and fields is gone. Saving it returns 400 invalid_view_definition, and a Dynamic View still stored that way answers 400 invalid_view_definition (“Recreate it”) when searched. Field, operator or value errors name the rule, for example where: Unknown field "atlas_bucket" for projects.

Static definitions are only:

{ "version": 1 }

Membership lives in the records table, not in the definition.

Presentation

Both types may store versioned presentation:

{
"version": 1,
"sorting": [],
"column_visibility": {}
}

sorting uses TanStack { id, desc } column IDs. Presentation is web UI state. Public and MCP View-record searches ignore presentation sorting and use an explicit request sort or the dataset executor default.

Scopes and credits

SurfaceAuthCredits
List / get Viewsworkspace:read (API key or member JWT)0
Upsert / delete Views, add/remove membershipworkspace:write0
FavoritesUser JWT + membership only0
POST /workspace/views/{id}/records/searchSame as other Workspace searchesAs the dataset’s search