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.
objectstringAlways pipeline.
idstringnamestringstagesarray of objector nullIn order, left to right.
idstringnamestringwin_chanceintegerIts deals' default chance of winning, in percent.
deal_probabilitybooleanWhether a deal may set its own win probability.
workspace_accessstringWhat the rest of the workspace may do: none, viewer or editor.
urlstringcreated_attime
{ "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.
Returns
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.
objectstringAlways deal.
idstringtitlestringstatusstringlead, open, won or lost.
pipeline{id, name}or nullNull for a lead.
stage{id, name}or nullThe stage it's in, or closed at; null for a lead.
valuemoneyor nullWhole minor units with its currency: 1250000 GBP is £12,500.00.
base_valuemoneyor nullIts value in the workspace's currency, at the exchange rate of its close day; null without a value or a rate.
probabilityintegeror nullIts own win chance in percent, when its pipeline allows one; null to use its stage's.
win_chanceintegerWhat weighs its value: 100 won, 0 lost, else its own probability or its stage's.
close_ondateor nullExpected close day, YYYY-MM-DD.
owner{id, name}or nullcontact{id, name}or nullThe main contact, in the directory.
company{id, name}or nullIn the directory.
contactsarray of {id, name}or nullThe other people on it, in the directory.
aboutstringMarkdown.
tagsarray of {id, name}or nullIts tags, in order: see
GET /tags?record_type=deal(leads share deals').labelsarray of {id, name}or nullThe same as tags, under their old name.
fieldsobjectCustom field values the key's person can see, by field ID: see
GET /fields?record_type=deal.sourcestringWhere it came from: manual, api, email, import, lead, or the channel it was imported with.
next_stepobjector nullIts earliest planned activity.
idstringAn activity's ID.
type{id, name}One of the workspace's activity types.
titlestringdue_ondateor nulldue_attimeor null
rottingbooleanOpen with no activity for longer than its stage allows.
lost_reason{id, name}or nullWhy it was lost: one of the workspace's lost reasons, or the words given (with an empty id).
lost_notestringor nullwon_attimeor nulllost_attimeor nullarchivedbooleanLeads only.
commentsintegercreated_by{id, name}or nullurlstringcreated_attimeupdated_attime
{ "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_idstringstage_idstringstatusstringopen, won, lost, or all (the default: all three); lead for leads instead.
include_archivedbooleanWith status=lead: archived leads too.
owner_idstringA member's ID, me, or none for deals nobody owns.
contact_idstringDeals a contact is on (as the main contact or another).
company_idstringDeals with a company, or with its people.
qstringPart of the title.
tagarray of stringsOnly those with these tags, by ID or name (
GET /tagslists 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_modestringWith 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.
fieldobjectOnly those whose custom field matches, with the field by ID or name (
GET /fieldslists 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.limitintegerHow many to return, 1 to 100. Default 25.
cursorstringnext_cursor from the previous page.
sortstringcreated_at (the default: in the order they were made) or updated_at (by when they last changed).
orderstringdesc (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_sincetimeOnly what changed at or after this time (RFC 3339, e.g. 2026-11-06T09:00:00Z): for polling.
Returns
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.
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
idstringYour own ID for it (deal_…), or leave it out. Sending the same ID again returns the first deal.
titlestringrequiredleadbooleanMake a lead: not yet in a pipeline.
pipeline_idstringDefault the first pipeline.
stage_idstringA stage of the pipeline. Default its first.
valuemoneyWhole minor units with its currency, both always: {"amount": 1250000, "currency": "GBP"} is £12,500.00.
probabilityintegerIts own win chance in percent, if its pipeline allows one.
close_ondateExpected close day, YYYY-MM-DD.
owner_idstringA member, or me. Default the key's person.
contact_idstringThe main contact, in the directory.
company_idstringIn the directory. Default the contact's company.
contact_idsarray of stringsOther people on it, in the directory.
aboutstringMarkdown.
tagsobjectTags to give it: {add: [IDs or names]}.
addarray of stringsTags to add, by ID or name (see
GET /tags): a new name makes a tag.removearray of stringsTags to take off, by ID or name.
label_idsarray of stringsIts tags, by ID (the old way: see tags).
fieldsobjectCustom field values, by field ID or name: see
GET /fields?record_type=deal.
Returns
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
idstringrequiredThe deal's ID.
Body
titlestringor nullvaluemoneyor nullWhole minor units with its currency, both always, or null.
probabilityintegeror nullIts own win chance in percent, or null for its stage's.
close_ondateor nullYYYY-MM-DD, or null.
owner_idstringor nullA member, me, or null.
contact_idstringor nullThe main contact, or null.
company_idstringor nullA company, or null.
aboutstringor nullMarkdown.
contact_idsarray of stringsor nullThe other people on it: replaces them all; null or [] for none.
tagsobjector nullTags to add and take off: {add, remove}, by ID or name.
addarray of stringsor nullTags to add, by ID or name (see
GET /tags): a new name makes a tag.removearray of stringsor nullTags to take off, by ID or name.
label_idsarray of stringsor nullIts tags, by ID: replaces them all; null or [] for none (the old way: see tags).
fieldsobjector nullCustom field values by field ID or name, merged into its others: a null value clears that field.
pipeline_idstringor nullMove it to another pipeline (with stage_id, or into its first stage).
stage_idstringor nullMove it to another stage. Its status stays as it is.
Returns
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
idstringrequiredThe deal's ID.
Body
valuemoneyWhat it was won for, if not its value: amount and currency both.
fieldsobjectValues for the deal fields the workspace asks for when winning, by field ID or name.
Returns
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
idstringrequiredThe deal's ID.
Body
reasonstringOne of the workspace's lost reasons, by ID or name, or your own words if it allows any.
notestring
Returns
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
idstringrequiredThe deal's ID.
Body
stage_idstringThe stage to reopen it in. Default the one it closed at.
Returns
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
idstringrequiredThe deal's ID.
Body
pipeline_idstringDefault the first pipeline the key's person can add deals to.
stage_idstringA stage of the pipeline. Default its first.
Returns
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.
objectstringAlways lost_reason.
idstringnamestring
{ "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.
Returns
curl https://app.mavatu.com/api/v1/lost_reasons \ -H "Authorization: Bearer $MAVATU_API_KEY"