Skip to content

Deals and pipelines

Pipelines and their stages, leads and deals: win them, lose them, open them again. Every request needs an API key; the examples read it from $MAVATU_API_KEY. How lists, dates, money and errors work is in the API guide.

The pipeline object

A pipeline: the stages its deals move through, left to right, and their chances of winning.

objectstring

Always pipeline.

idstring
namestring
stagesarray of objector null

In order, left to right.

idstring
namestring
win_chanceinteger

Its deals' default chance of winning, in percent.

deal_probabilityboolean

Whether a deal may set its own win probability.

workspace_accessstring

What the rest of the workspace may do: none, viewer or editor.

urlstring
created_attime
The pipeline object
{
"object": "pipeline",
"id": "pip_01jc9ngk80y3zh6dzjjxxx7ck5",
"name": "New business",
"stages": [
{
"id": "stg_01jcy1jx4whrdd459gq8h7qezz",
"name": "First chat",
"win_chance": 10
},
{
"id": "stg_01jcs1a0zwsk9tprm7n0mns7c0",
"name": "Proposal sent",
"win_chance": 40
},
{
"id": "stg_01jcjgq4sr4qvh3h63j9fhvmcq",
"name": "Negotiating",
"win_chance": 70
}
],
"deal_probability": false,
"workspace_access": "editor",
"url": "https://app.mavatu.com/kettle-kite/crm/pipelines/pip_01jc9ngk80y3zh6dzjjxxx7ck5",
"created_at": "2021-09-06T09:20:00Z"
}

List pipelines

GET/pipelines

The pipelines the key's person can see, in board order, with their stages: the IDs to create deals in and move them through.

GET /pipelines
curl https://app.mavatu.com/api/v1/pipelines \
-H "Authorization: Bearer $MAVATU_API_KEY"

The deal object

A deal in a pipeline, or a lead that isn't in one yet. Its status says which, and whether it's been won or lost.

objectstring

Always deal.

idstring
titlestring
statusstring

lead, open, won or lost.

pipeline{id, name}or null

Null for a lead.

stage{id, name}or null

The stage it's in, or closed at; null for a lead.

valuemoneyor null

Whole minor units with its currency: 1250000 GBP is £12,500.00.

base_valuemoneyor null

Its value in the workspace's currency, at the exchange rate of its close day; null without a value or a rate.

probabilityintegeror null

Its own win chance in percent, when its pipeline allows one; null to use its stage's.

win_chanceinteger

What weighs its value: 100 won, 0 lost, else its own probability or its stage's.

close_ondateor null

Expected close day, YYYY-MM-DD.

owner{id, name}or null
contact{id, name}or null

The main contact, in the directory.

company{id, name}or null

In the directory.

contactsarray of {id, name}or null

The other people on it, in the directory.

aboutstring

Markdown.

tagsarray of {id, name}or null

Its tags, in order: see GET /tags?record_type=deal (leads share deals').

labelsarray of {id, name}or null

The same as tags, under their old name.

fieldsobject

Custom field values the key's person can see, by field ID: see GET /fields?record_type=deal.

sourcestring

Where it came from: manual, api, email, import, lead, or the channel it was imported with.

next_stepobjector null

Its earliest planned activity.

idstring

An activity's ID.

type{id, name}

One of the workspace's activity types.

titlestring
due_ondateor null
due_attimeor null
rottingboolean

Open with no activity for longer than its stage allows.

lost_reason{id, name}or null

Why it was lost: one of the workspace's lost reasons, or the words given (with an empty id).

lost_notestringor null
won_attimeor null
lost_attimeor null
archivedboolean

Leads only.

commentsinteger
created_by{id, name}or null
urlstring
created_attime
updated_attime
The deal object
{
"object": "deal",
"id": "deal_01jcfkys7aa4dzewnwv8cf5bn5",
"title": "Honeybee Bakery rebrand",
"status": "open",
"pipeline": {
"id": "pip_01jc9ngk80y3zh6dzjjxxx7ck5",
"name": "New business"
},
"stage": {
"id": "stg_01jcs1a0zwsk9tprm7n0mns7c0",
"name": "Proposal sent"
},
"value": {
"amount": 1850000,
"currency": "GBP"
},
"base_value": {
"amount": 1850000,
"currency": "GBP"
},
"probability": null,
"win_chance": 40,
"close_on": "2026-11-28",
"owner": {
"id": "mem_01jcm9s346q3d25vt4f5v37e3s",
"name": "Imogen Hale"
},
"contact": {
"id": "ctc_01jc1rnj47e65gh2bh8vgs9zm5",
"name": "Priya Shah"
},
"company": {
"id": "cmp_01jc7ag3bckkdjwbhp1g201cyf",
"name": "Honeybee Bakery"
},
"contacts": [
{
"id": "ctc_01jch3bv4h15g5e4g7x0nth82f",
"name": "Tom Okafor"
}
],
"about": "Shops, packaging and the website. Budget agreed in principle.",
"tags": [],
"labels": [],
"fields": {
"fld_01jcnr5yhcf05g59s2s1kke59r": "opt_01jcmz9j92v81e5128q6rw31fz"
},
"source": "manual",
"next_step": {
"id": "act_01jcmfqgc1trtdrhn3zhq8d5hf",
"type": {
"id": "call",
"name": "Call"
},
"title": "Walk Priya through the proposal",
"due_on": "2026-11-10",
"due_at": "2026-11-10T10:00:00Z"
},
"rotting": false,
"lost_reason": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"archived": false,
"comments": 4,
"created_by": {
"id": "mem_01jcm9s346q3d25vt4f5v37e3s",
"name": "Imogen Hale"
},
"url": "https://app.mavatu.com/kettle-kite/crm/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5",
"created_at": "2026-10-12T15:46:02Z",
"updated_at": "2026-11-05T17:10:33Z"
}

List deals

GET/deals

Deals the key's person can see, newest first: open, won and lost unless status says which (status=lead lists leads instead, archived ones only with include_archived). Filter by pipeline, stage, owner, contact or company.

Filters and paging

pipeline_idstring
stage_idstring
statusstring

open, won, lost, or all (the default: all three); lead for leads instead.

include_archivedboolean

With status=lead: archived leads too.

owner_idstring

A member's ID, me, or none for deals nobody owns.

contact_idstring

Deals a contact is on (as the main contact or another).

company_idstring

Deals with a company, or with its people.

qstring

Part of the title.

tagarray of strings

Only those with these tags, by ID or name (GET /tags lists them): repeat it, or separate them with commas, up to 50. tag_mode says whether they need all of them, any or none. A tag not used on this kind of record is refused.

tag_modestring

With tag: all (the default) for those with every one of the tags, any for those with at least one, none for those with none of them.

fieldobject

Only those whose custom field matches, with the field by ID or name (GET /fields lists them), e.g. field[Phase]=Design. Options are by ID or name, people by ID, me, email or name, contacts by ID, email or name, and companies by ID, domain or name: up to 50, repeated or comma-separated, match any of them. Commas always separate values, so give one with a comma in its name by ID. A checkbox is true or false. Text matches when it contains the value, ignoring case. A number, amount or date matches exactly, and field[…][from] and field[…][to] give an inclusive range. Dates are YYYY-MM-DD; amounts are in the workspace's currency, in its smallest unit (500000 is 5,000.00), with other currencies converted at today's rate. none matches those with no value, any those with one. Every filter must match.

limitinteger

How many to return, 1 to 100. Default 25.

cursorstring

next_cursor from the previous page.

sortstring

created_at (the default: in the order they were made) or updated_at (by when they last changed).

orderstring

desc (the default: newest first) or asc (oldest first). To sync everything that changed, use sort=updated_at&order=asc with updated_since: what changes while you page through comes again at the end.

updated_sincetime

Only what changed at or after this time (RFC 3339, e.g. 2026-11-06T09:00:00Z): for polling.

Returns

A list of deals.

GET /deals
curl "https://app.mavatu.com/api/v1/deals?pipeline_id=pip_01jc9ngk80y3zh6dzjjxxx7ck5&status=open&owner_id=me" \
-H "Authorization: Bearer $MAVATU_API_KEY"

Get a deal

GET/deals/{id}

One deal or lead, with its pipeline, stage, value, people and next step.

Path

idstringrequired

The deal's ID.

Returns

The deal.

GET /deals/{id}
curl https://app.mavatu.com/api/v1/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5 \
-H "Authorization: Bearer $MAVATU_API_KEY"

Create a deal

POST/deals

Add a deal to a pipeline (default the first, in its first stage), or a lead with lead true. Owned by the key's person unless owner_id says otherwise.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Body

idstring

Your own ID for it (deal_…), or leave it out. Sending the same ID again returns the first deal.

titlestringrequired
leadboolean

Make a lead: not yet in a pipeline.

pipeline_idstring

Default the first pipeline.

stage_idstring

A stage of the pipeline. Default its first.

valuemoney

Whole minor units with its currency, both always: {"amount": 1250000, "currency": "GBP"} is £12,500.00.

probabilityinteger

Its own win chance in percent, if its pipeline allows one.

close_ondate

Expected close day, YYYY-MM-DD.

owner_idstring

A member, or me. Default the key's person.

contact_idstring

The main contact, in the directory.

company_idstring

In the directory. Default the contact's company.

contact_idsarray of strings

Other people on it, in the directory.

aboutstring

Markdown.

tagsobject

Tags to give it: {add: [IDs or names]}.

addarray of strings

Tags to add, by ID or name (see GET /tags): a new name makes a tag.

removearray of strings

Tags to take off, by ID or name.

label_idsarray of strings

Its tags, by ID (the old way: see tags).

fieldsobject

Custom field values, by field ID or name: see GET /fields?record_type=deal.

Returns

The deal, with 201 Created.

POST /deals
curl -X POST https://app.mavatu.com/api/v1/deals \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Honeybee Bakery rebrand",
"pipeline_id": "pip_01jc9ngk80y3zh6dzjjxxx7ck5",
"value": {
"amount": 1850000,
"currency": "GBP"
},
"close_on": "2026-11-28",
"contact_id": "ctc_01jc1rnj47e65gh2bh8vgs9zm5"
}'

Update a deal

PATCH/deals/{id}

Change a deal or lead, or move a deal to another stage or pipeline. Only the fields you send change; null clears one. Winning, losing, reopening and converting a lead are their own endpoints.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The deal's ID.

Body

titlestringor null
valuemoneyor null

Whole minor units with its currency, both always, or null.

probabilityintegeror null

Its own win chance in percent, or null for its stage's.

close_ondateor null

YYYY-MM-DD, or null.

owner_idstringor null

A member, me, or null.

contact_idstringor null

The main contact, or null.

company_idstringor null

A company, or null.

aboutstringor null

Markdown.

contact_idsarray of stringsor null

The other people on it: replaces them all; null or [] for none.

tagsobjector null

Tags to add and take off: {add, remove}, by ID or name.

addarray of stringsor null

Tags to add, by ID or name (see GET /tags): a new name makes a tag.

removearray of stringsor null

Tags to take off, by ID or name.

label_idsarray of stringsor null

Its tags, by ID: replaces them all; null or [] for none (the old way: see tags).

fieldsobjector null

Custom field values by field ID or name, merged into its others: a null value clears that field.

pipeline_idstringor null

Move it to another pipeline (with stage_id, or into its first stage).

stage_idstringor null

Move it to another stage. Its status stays as it is.

Returns

The deal.

PATCH /deals/{id}
curl -X PATCH https://app.mavatu.com/api/v1/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5 \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_id": "stg_01jcs1a0zwsk9tprm7n0mns7c0",
"value": {
"amount": 2100000,
"currency": "GBP"
},
"tags": {
"add": [
"tag_01jcw6vzskdenc8sp3804gva35"
]
}
}'

Win a deal

POST/deals/{id}/win

Mark an open deal won, optionally at a final value and with the fields the workspace asks for when winning. Its followers hear about it.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The deal's ID.

Body

valuemoney

What it was won for, if not its value: amount and currency both.

fieldsobject

Values for the deal fields the workspace asks for when winning, by field ID or name.

Returns

The deal.

POST /deals/{id}/win
curl -X POST https://app.mavatu.com/api/v1/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5/win \
-H "Authorization: Bearer $MAVATU_API_KEY"

Lose a deal

POST/deals/{id}/lose

Mark a deal lost, with a reason: one of the workspace's lost reasons (by ID or name, from lost_reasons), or your own words if it allows any.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The deal's ID.

Body

reasonstring

One of the workspace's lost reasons, by ID or name, or your own words if it allows any.

notestring

Returns

The deal.

POST /deals/{id}/lose
curl -X POST https://app.mavatu.com/api/v1/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5/lose \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Went with another agency",
"note": "Keen to talk again about the website next year."
}'

Reopen a deal

POST/deals/{id}/reopen

Open a won or lost deal again, in the stage it closed at or another.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The deal's ID.

Body

stage_idstring

The stage to reopen it in. Default the one it closed at.

Returns

The deal.

POST /deals/{id}/reopen
curl -X POST https://app.mavatu.com/api/v1/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5/reopen \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_id": "stg_01jcs1a0zwsk9tprm7n0mns7c0"
}'

Convert a lead

POST/deals/{id}/convert

Turn a lead into a deal in a pipeline (default the first) and stage (default its first), keeping everything on it.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The deal's ID.

Body

pipeline_idstring

Default the first pipeline the key's person can add deals to.

stage_idstring

A stage of the pipeline. Default its first.

Returns

The deal.

POST /deals/{id}/convert
curl -X POST https://app.mavatu.com/api/v1/deals/deal_01jcfkys7aa4dzewnwv8cf5bn5/convert \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pipeline_id": "pip_01jc9ngk80y3zh6dzjjxxx7ck5"
}'

The lost reason object

One of the workspace's reasons for losing a deal. Pass its ID or name when you lose one.

objectstring

Always lost_reason.

idstring
namestring
The lost reason object
{
"object": "lost_reason",
"id": "opt_01jcg0x454yg4gfdexzr4yj2c4",
"name": "Went with another agency"
}

List lost reasons

GET/lost_reasons

The workspace's reasons for losing a deal, to pass to lose. When only_these is true, a deal can only be lost for one of them; otherwise any words do.

GET /lost_reasons
curl https://app.mavatu.com/api/v1/lost_reasons \
-H "Authorization: Bearer $MAVATU_API_KEY"