Skip to main content
POST
Change deal

Authorizations

Authorization
string
header
required

An API key, starting ak_. Create one under Settings > MCP and API in Steerco.

Headers

X-Workspace-Id
string
required

The workspace id. GET /v1/workspaces lists yours.

Body

application/json
changes
object[]

One entry per deal, 100 at most. Put every deal the person asked about in this one call.

Required array length: 1 - 100 elements
dealId
string

Deprecated: the older one-deal shape, with that deal's fields beside it. Pass changes instead.

Pattern: ^[0-9a-fA-F]{24}$
owner
string | null

The teammate who owns the deal, by userId. null leaves it with no owner.

Pattern: ^[0-9a-fA-F]{24}$
amount
number | null

The deal's amount. null clears it.

Required range: x >= 0
currency
string

The deal's currency, as a 3-letter code such as USD.

Pattern: ^[A-Z]{3}$
recurringMonthly
number | null

The recurring revenue per month, in the deal's currency. null clears it.

Required range: x >= 0
companyId
string

The company the deal is with.

Pattern: ^[0-9a-fA-F]{24}$
addPeople
string[]

People to add to the deal, by id.

Minimum array length: 1
Pattern: ^[0-9a-fA-F]{24}$
removePeople
string[]

People to take off the deal, by id.

Minimum array length: 1
Pattern: ^[0-9a-fA-F]{24}$
expectedCloseOn
string<date> | null

The day the deal is expected to close, YYYY-MM-DD. null clears it.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
confirmDraftLoss
boolean

Set true only when the preview said this deal's new owner loses a teammate's edits to a waiting follow-up, and the person agreed.

confirmationToken
string

The confirmationToken from this tool's preview. Leave it out to get a preview; nothing changes until you send it.

Required string length: 1 - 256

Response

A preview, when the body has no confirmationToken. The applied write, when it has one.

status
enum<string>
required
Available options:
preview
confirmationToken
string
required

Send this back with the same input to apply the write. It works for this call only.

expiresAt
string
required

When the token stops working, 10 minutes after the preview.

preview
any

What the write would change. Nothing has changed yet.