Leads
Lead rows inside a lead table.
/lead-tables/{tableId}/leadsList leads in a table
Returns a cursor-paginated list of lead rows belonging to the given lead table, ordered by document id. Soft-deleted rows are excluded. Reads Firestore directly so a just-created row appears immediately. Requires scope: leads:read.
Parameters
Path
tableIdrequiredResponse 200
Errors
/lead-tables/{tableId}/leadsCreate a lead
Creates a new lead row in the given table. The row is fully populated in one call by writing the dynamic `fields` cell values verbatim. The target tab resolves from an explicit `tabId` (must match a tab on the table) or falls back to the table's first tab. The writer is the API key's issuing member. Requires scope: leads:write.
Parameters
Path
tableIdrequiredRequest body
tabIdfieldsdisplayOrderResponse 201
idrequiredobjectrequiredtableIdrequiredtabIdfieldsrequiredstarredrequireddisplayOrdercreatedAtupdatedAtErrors
/lead-tables/{tableId}/leads/{leadId}Retrieve a lead
Returns a single lead row by id. The row must belong to both the caller's organization and the table in the path, so a valid row id under the wrong table returns 404. Requires scope: leads:read.
Parameters
Path
tableIdrequiredleadIdrequiredResponse 200
idrequiredobjectrequiredtableIdrequiredtabIdfieldsrequiredstarredrequireddisplayOrdercreatedAtupdatedAtErrors
/lead-tables/{tableId}/leads/{leadId}Update a lead
Updates a lead row's dynamic cells and/or its `tabId`, `starred`, and `displayOrder`. The `fields` map is merged onto the row verbatim (raw values, no type coercion). Reserved keys can never be written through `fields`. A supplied non-empty `tabId` must match a tab on the table. Requires scope: leads:write.
Parameters
Path
tableIdrequiredleadIdrequiredRequest body
fieldstabIdstarreddisplayOrderResponse 200
idrequiredobjectrequiredtableIdrequiredtabIdfieldsrequiredstarredrequireddisplayOrdercreatedAtupdatedAtErrors
/lead-tables/{tableId}/leads/{leadId}Delete a lead
Soft-deletes a lead row (sets `deletedAt` so it drops out of every read surface while staying recoverable). Returns 404 if the row is missing, cross-organization, belongs to a different table, or already soft-deleted. Requires scope: leads:write.
Parameters
Path
tableIdrequiredleadIdrequiredResponse 200
idrequiredobjectrequireddeletedrequired