Opportunities
Reopen a closed opportunity
Moves it to the pipeline’s first open stage and clears closedAt. Use PATCH to choose a specific stage.
POST
/
opportunities
/
{id}
/
reopen
Reopen a closed opportunity
curl --request POST \
--url https://backend.leadey.ai/v1/opportunities/{id}/reopen \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend.leadey.ai/v1/opportunities/{id}/reopen"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend.leadey.ai/v1/opportunities/{id}/reopen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"name": "<string>",
"value": "15000.50",
"currency": "GBP",
"status": "open",
"probability": 40,
"pipelineId": "<string>",
"stageId": "<string>",
"stageLabel": "<string>",
"ownerId": "<string>",
"companyId": "<string>",
"contactId": "<string>",
"sourceLeadId": "<string>",
"expectedCloseDate": "2023-12-25",
"closedAt": "2023-11-07T05:31:56Z",
"lostReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "One of email, phone or linkedinUrl is required",
"details": null
}
}{
"error": {
"message": "Invalid or revoked API key.",
"details": null
}
}{
"error": {
"message": "This API key is read-only. Create a key with write access in Settings → API Keys.",
"details": null
}
}{
"error": {
"message": "Lead not found",
"details": null
}
}⌘I
Reopen a closed opportunity
curl --request POST \
--url https://backend.leadey.ai/v1/opportunities/{id}/reopen \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend.leadey.ai/v1/opportunities/{id}/reopen"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend.leadey.ai/v1/opportunities/{id}/reopen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"name": "<string>",
"value": "15000.50",
"currency": "GBP",
"status": "open",
"probability": 40,
"pipelineId": "<string>",
"stageId": "<string>",
"stageLabel": "<string>",
"ownerId": "<string>",
"companyId": "<string>",
"contactId": "<string>",
"sourceLeadId": "<string>",
"expectedCloseDate": "2023-12-25",
"closedAt": "2023-11-07T05:31:56Z",
"lostReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "One of email, phone or linkedinUrl is required",
"details": null
}
}{
"error": {
"message": "Invalid or revoked API key.",
"details": null
}
}{
"error": {
"message": "This API key is read-only. Create a key with write access in Settings → API Keys.",
"details": null
}
}{
"error": {
"message": "Lead not found",
"details": null
}
}