Skip to main content
POST
Declare Pipeline

Authorizations

Authorization
string
header
required

A Turtle API key (sk_...) as a bearer token.

Path Parameters

organizationId
string<uuid>
required
Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

Body

application/json
type
string
required

The board — the kind of relationship it tracks, e.g. liquidity_deal | distributor | partner | exchange | lp | internal.

Required string length: 1 - 200
Pattern: ^(?:[^<\p{C}]|‍|<+(?:[^<A-Za-z/!?\p{C}]|‍|$))*$
aggregates
object[]

The board's rollups over its deals: each {key, label?, source?, op?, stages?, groupBy?}. op is sum (default) | min | max | avg | median | count; source is a money, percent, number or (min/max) date field, or expectedRevenue, optional for count; stages narrows to some columns; groupBy: stage turns the number into one point per column.

color
string

The board's hue, from the chip palette.

description
string

What the board is for: which relationships go on it. Sonar reads it to pick the board for a new deal.

Maximum string length: 20000
Pattern: ^(?:[^<\p{C}]|[\t\n\r‍]|<+(?:[^<A-Za-z/!?\p{C}]|[\t\n\r‍]|$))*$
draft
boolean

Hold this write as a draft, even where the permissions would let it through: the agent's waits for a person to approve, a person's own waits for them to confirm it (owner: its author). The response is applied=false with the draft.

evidence
object[] | null
fieldSchema
object[]

The board's card: an ordered list of {key, kind, entity?, set?, required?, label?, options?, unit?, section?, format?, description?, onCard?, deprecated?}. kind is text|number|money|percent|bool|date|enum|ref|stage; ref needs entity (contact|organization|document|engagement|task); enum needs options, each a string or {value, label?, color?, deprecated?}: value is what a card stores, label the words people read, which may be written in its place; unit is free text, required on money and optional on number; set:true makes the field hold several values; format (multiline|url|email) is a text rendering hint; section is the heading the field groups under. No card, no fields: a board with none carries its deals' columns alone.

rationale
string
Maximum string length: 20000
Pattern: ^(?:[^<\p{C}]|[\t\n\r‍]|<+(?:[^<A-Za-z/!?\p{C}]|[\t\n\r‍]|$))*$
revenueFormula
null | string

Computes a deal's expectedRevenue from its card when nobody wrote one: card keys and numbers joined by + - * /, with parentheses and max(a, b).

revenueUnit
string

What every deal's expectedRevenue on this board is counted in, e.g. USD.

Maximum string length: 200
Pattern: ^(?:[^<\p{C}]|‍|<+(?:[^<A-Za-z/!?\p{C}]|‍|$))*$
source
enum<string>

With a personal API key only: ai records the write as the key owner's agent's (source ai, with the owner as its user), owing the rationale and evidence, and passing the permissions, of any agent write. Omit for a person's own write.

Available options:
ai
stages
object[]

The funnel in order.

template
string

A template to start from, by its type in GET /pipeline-templates: its funnel, color, description, card, rollups and revenue are copied once, and each of those sent here replaces that part of the template. Omit to start with only what is sent.

Response

OK

applied
boolean
budgets
object[]

How full each budgeted text the write set is, in characters (a note in a list is its own entry, notes[2].text). Never enforced: a text over its budget was written as sent; tighten it when you next rewrite it.

draft
object
entityId
string<uuid>
Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

migrated
integer
mutation
object