Reopen a deal
curl --request POST \
--url https://app.leonar.app/api/v1/deals/{id}/reopen \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.leonar.app/api/v1/deals/{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://app.leonar.app/api/v1/deals/{id}/reopen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.leonar.app/api/v1/deals/{id}/reopen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.leonar.app/api/v1/deals/{id}/reopen"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.leonar.app/api/v1/deals/{id}/reopen")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leonar.app/api/v1/deals/{id}/reopen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "c3d4e5f6-7890-12ab-cdef-345678901bcd",
"title": "Recruitment - 3 Senior Engineers",
"status": "open",
"amount": 45000,
"signed_amount": null,
"currency": "EUR",
"expected_amount": 45000,
"expected_close_date": "2025-03-15",
"probability": 60,
"pipeline_id": "d4e5f6a7-8901-23bc-defa-456789012cde",
"stage_id": "e5f6a7b8-9012-34cd-efab-567890123def",
"company_id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
"owner_id": "f6a7b8c9-0123-45de-fabc-678901234ef0",
"primary_source_id": "a7b8c9d0-1234-56ef-abcd-789012345ef1",
"closed_at": null,
"created_at": "2025-02-01T10:00:00Z",
"updated_at": "2025-02-10T15:30:00Z",
"archived_at": null
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Deals
Reopen a deal
Reopens a closed deal, setting status back to open.
POST
/
deals
/
{id}
/
reopen
Reopen a deal
curl --request POST \
--url https://app.leonar.app/api/v1/deals/{id}/reopen \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.leonar.app/api/v1/deals/{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://app.leonar.app/api/v1/deals/{id}/reopen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.leonar.app/api/v1/deals/{id}/reopen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.leonar.app/api/v1/deals/{id}/reopen"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.leonar.app/api/v1/deals/{id}/reopen")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leonar.app/api/v1/deals/{id}/reopen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "c3d4e5f6-7890-12ab-cdef-345678901bcd",
"title": "Recruitment - 3 Senior Engineers",
"status": "open",
"amount": 45000,
"signed_amount": null,
"currency": "EUR",
"expected_amount": 45000,
"expected_close_date": "2025-03-15",
"probability": 60,
"pipeline_id": "d4e5f6a7-8901-23bc-defa-456789012cde",
"stage_id": "e5f6a7b8-9012-34cd-efab-567890123def",
"company_id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
"owner_id": "f6a7b8c9-0123-45de-fabc-678901234ef0",
"primary_source_id": "a7b8c9d0-1234-56ef-abcd-789012345ef1",
"closed_at": null,
"created_at": "2025-02-01T10:00:00Z",
"updated_at": "2025-02-10T15:30:00Z",
"archived_at": null
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Authorizations
API key starting with leo_
Path Parameters
Deal ID
Response
Deal reopened
Show child attributes
Show child attributes
Example:
{
"id": "c3d4e5f6-7890-12ab-cdef-345678901bcd",
"title": "Recruitment - 3 Senior Engineers",
"status": "open",
"amount": 45000,
"signed_amount": null,
"currency": "EUR",
"expected_amount": 45000,
"expected_close_date": "2025-03-15",
"probability": 60,
"pipeline_id": "d4e5f6a7-8901-23bc-defa-456789012cde",
"stage_id": "e5f6a7b8-9012-34cd-efab-567890123def",
"company_id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
"owner_id": "f6a7b8c9-0123-45de-fabc-678901234ef0",
"primary_source_id": "a7b8c9d0-1234-56ef-abcd-789012345ef1",
"closed_at": null,
"created_at": "2025-02-01T10:00:00Z",
"updated_at": "2025-02-10T15:30:00Z",
"archived_at": null
}
⌘I