Skip to content

Reopen a won or lost deal

POST
/deals/{id}/reopen
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/deals/example/reopen \
--header 'Authorization: Bearer <token>'

Returns a won or lost deal to the last open stage it stood in (the pipeline’s first open stage when none is left), with outcome OPEN and the win or loss cleared: wonAt, lostAt, lostReason and finalAmount. The move is recorded on the deal’s timeline. Orders, invoices, agreements, onboarding, the kickoff project and the company’s status that the win created are never touched, and winning the deal again opens no second order or invoice for a proposal that already has one, and no second kickoff project. Requires deals.manage.

id
required

Deal identifier (CUID2).

string
>= 1 characters

Deal identifier (CUID2).

Reopened deal.

Media typeapplication/json
object
data
required
object
amount
required
number | null
clientId
required
string
createdAt
required
string
expectedCloseDate
required
string | null
fields

The deal’s field values. Present on GET /deals/{id} only; absent on lists, on write responses and on an older server.

Array<object>

One deal field with a deal’s value for it.

object
definitionId
required

The deal field this value belongs to.

string
hasValue
required

True when the deal holds a value, or at least one checklist item, for the field.

boolean
items
required

The items of a CHECKLIST field, in order; null while it has none and on every other kind.

Any of:
Array<object>
object
done
required
boolean
id
required
string
text
required
string
kind
required

What a deal field holds: a short text, a long text, a link, a day, one option of a list, a yes or no, or a checklist.

string
Allowed values: TEXT MULTILINE URL DATE DROPDOWN CHECKBOX CHECKLIST
name
required
string
options
required

The options of a DROPDOWN field; empty for every other kind.

Array<string>
value
required

The value of every kind but CHECKLIST, null while the field is empty: the text (TEXT, MULTILINE), the address (URL), the day as YYYY-MM-DD (DATE), the chosen option (DROPDOWN), or “true” or “false” (CHECKBOX). Always null on a CHECKLIST field.

string | null
finalAmount
required
number | null
id
required
string
isGeneral

True when no project was kicked off from the deal, so it sits in its company’s General section, as the company’s Deals tab marks it. Returned by the list only; absent on an older server.

boolean
kickoffProjectId
required

The kickoff project the won deal was handed to delivery in.

string | null
kickoffProjectName

The name of the kickoff project, when the caller reaches that project; null otherwise. Returned by the list only; absent on an older server.

string | null
leadSourceId
required
string | null
lostAt
required
string | null
lostReason
required

The optional note written beside the lost reason. A deal lost before reasons existed keeps its old text here.

string | null
lostReasonId

The reason the deal was lost, an id from the lost reasons list; null on an open or won deal and on a deal lost before reasons existed. Absent on an older server.

string | null
outcome
required
string
Allowed values: OPEN WON LOST
ownerId
required
string
projectTypeId
required
string | null
stageId
required
string
title
required
string | null
updatedAt
required
string
wonAt
required
string | null

Example

{
"data": {
"fields": [
{
"kind": "TEXT"
}
],
"outcome": "OPEN"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.