Base URL: https://api.cornerspot.net
Authentication: requests use a bearer token, for example Authorization: Bearer YOUR_API_KEY.
List opportunities
GET /c/api/v1/opportunities
Returns a paginated, filterable, searchable page of the team's deals. Supports full-text search and rich filters. Requires the opportunities_read scope and the CRM module.
Query parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
query | string | Full-text search over deal name. |
filter[account_id] | string | Comma-separated account ids. |
filter[owner_id] | string | Comma-separated owner (user) ids. |
filter[pipeline_stage_id] | string | Comma-separated pipeline-stage ids. |
filter[pipeline_id] | string | Comma-separated pipeline ids; returns deals in any stage of these pipelines. |
filter[expected_close_date_from] | string | Only deals with expected_close_date on or after this date. |
filter[expected_close_date_to] | string | Only deals with expected_close_date on or before this date. |
filter[tags] | string | Comma-separated tag ids; returns deals carrying any of them. |
sort | string | Sort column, - prefix for descending. One of name, amount, expected_close_date, created_at, updated_at. Default -updated_at. |
page | integer | 1-based page number. |
per_page | integer | Page size (1–100, default 25). |
Code samples
curl --request GET \
--url 'https://api.cornerspot.net/c/api/v1/opportunities' \
--header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/opportunities"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, headers=headers, method="GET")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/opportunities")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/opportunities',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
200 OK | a page of deals |
401 Unauthorized | missing or invalid API key |
402 Payment Required | the team's plan doesn't include the CRM module |
403 Forbidden | the key lacks the opportunities_read scope |
Create a deal
POST /c/api/v1/opportunities
Creates a new deal. name, account_id, owner_id, and pipeline_stage_id are required.
Optionally initiates the e-signature flow in the same request when esign_enabled: true and esign_template_id are both present — in that case the body MUST also carry esign.recipients mapping every template role to a signer (returns 422 esign_recipients_required if omitted). Requires opportunities_write; e-signature initiation additionally requires esign_write + the E-Signature module.
Request body
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
opportunity | object | |
opportunity.name | string · required | Required. |
opportunity.account_id | string · required | Required. |
opportunity.owner_id | string · required | Required. |
opportunity.pipeline_stage_id | string · required | Required. |
opportunity.amount | number | |
opportunity.amount_source | string one of manual, from_line_items | |
opportunity.currency_id | string | |
opportunity.expected_close_date | string | |
opportunity.closed_at | string | |
opportunity.esign_enabled | boolean | |
opportunity.esign_template_id | string | |
opportunity.esign_auto_send_stage_id | string | |
opportunity.esign_success_stage_id | string | |
opportunity.esign_failure_stage_id | string | |
opportunity.custom_fields | object | |
opportunity.tag_ids[] | array of string | |
esign | object | Required when initiating the e-signature flow on create. |
esign.recipients[] | array of object | Maps each template role to a signer. |
esign.recipients[].role_label | string · required | Must match a recipient_roles label on the template. |
esign.recipients[].name | string · required | |
esign.recipients[].email | string · required | |
esign.recipients[].contact_id | string | |
esign.subject | string | |
esign.message | string |
Code samples
curl --request POST \
--url 'https://api.cornerspot.net/c/api/v1/opportunities' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
},
"esign": {
"recipients": [
{}
],
"subject": "string",
"message": "string"
}
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
},
"esign": {
"recipients": [
{}
],
"subject": "string",
"message": "string"
}
})
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
},
"esign": {
"recipients": [
{}
],
"subject": "string",
"message": "string"
}
})
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/opportunities"
payload = json.dumps({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
},
"esign": {
"recipients": [
{}
],
"subject": "string",
"message": "string"
}
}).encode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, data=payload, headers=headers, method="POST")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/opportunities")
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
},
"esign": {
"recipients": [
{}
],
"subject": "string",
"message": "string"
}
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/opportunities',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => json_encode([
'opportunity' => [
'name' => 'string',
'account_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'owner_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'pipeline_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'amount' => 1.0,
'amount_source' => 'manual',
'currency_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'expected_close_date' => '2026-01-15',
'closed_at' => '2026-01-15T09:30:00Z',
'esign_enabled' => true,
'esign_template_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'esign_auto_send_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'esign_success_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'esign_failure_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'custom_fields' => [],
'tag_ids' => [
'abc123',
],
],
'esign' => [
'recipients' => [
[],
],
'subject' => 'string',
'message' => 'string',
],
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
201 Created | created |
422 Unprocessable Content | validation errors (missing required fields or associations) |
Get a deal
GET /c/api/v1/opportunities/{id}
Returns a single deal. Requires opportunities_read.
Path parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
id | string · required | Opportunity id (UUID). |
Code samples
curl --request GET \
--url 'https://api.cornerspot.net/c/api/v1/opportunities/abc123' \
--header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities/abc123', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities/abc123', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/opportunities/abc123"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, headers=headers, method="GET")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/opportunities/abc123")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/opportunities/abc123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
200 OK | the deal |
404 Not Found | no such deal in this team |
Update a deal
PATCH /c/api/v1/opportunities/{id}
Updates a deal. If the change moves the deal forward across its configured esign_auto_send_stage, the draft envelope is automatically sent and the response includes delivery details under esign.delivery. Requires opportunities_write.
Path parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
id | string · required | Opportunity id (UUID). |
Request body
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
opportunity | object | |
opportunity.name | string | |
opportunity.account_id | string | |
opportunity.owner_id | string | |
opportunity.pipeline_stage_id | string | |
opportunity.amount | number | |
opportunity.amount_source | string one of manual, from_line_items | |
opportunity.currency_id | string | |
opportunity.expected_close_date | string | |
opportunity.closed_at | string | |
opportunity.esign_enabled | boolean | |
opportunity.esign_template_id | string | |
opportunity.esign_auto_send_stage_id | string | |
opportunity.esign_success_stage_id | string | |
opportunity.esign_failure_stage_id | string | |
opportunity.custom_fields | object | |
opportunity.tag_ids[] | array of string |
Code samples
curl --request PATCH \
--url 'https://api.cornerspot.net/c/api/v1/opportunities/abc123' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
}
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities/abc123', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
}
})
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities/abc123', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
}
})
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/opportunities/abc123"
payload = json.dumps({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
}
}).encode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, data=payload, headers=headers, method="PATCH")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/opportunities/abc123")
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
"opportunity": {
"name": "string",
"account_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"owner_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"pipeline_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"amount": 1.0,
"amount_source": "manual",
"currency_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"expected_close_date": "2026-01-15",
"closed_at": "2026-01-15T09:30:00Z",
"esign_enabled": true,
"esign_template_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_auto_send_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_success_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"esign_failure_stage_id": "1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d",
"custom_fields": {},
"tag_ids": [
"abc123"
]
}
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/opportunities/abc123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => json_encode([
'opportunity' => [
'name' => 'string',
'account_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'owner_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'pipeline_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'amount' => 1.0,
'amount_source' => 'manual',
'currency_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'expected_close_date' => '2026-01-15',
'closed_at' => '2026-01-15T09:30:00Z',
'esign_enabled' => true,
'esign_template_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'esign_auto_send_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'esign_success_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'esign_failure_stage_id' => '1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d',
'custom_fields' => [],
'tag_ids' => [
'abc123',
],
],
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
200 OK | updated |
404 Not Found | no such deal in this team |
Delete (soft) a deal
DELETE /c/api/v1/opportunities/{id}
Soft-deletes the deal. Requires opportunities_write.
Path parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
id | string · required | Opportunity id (UUID). |
Code samples
curl --request DELETE \
--url 'https://api.cornerspot.net/c/api/v1/opportunities/abc123' \
--header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities/abc123', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/opportunities/abc123', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/opportunities/abc123"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, headers=headers, method="DELETE")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/opportunities/abc123")
request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/opportunities/abc123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
204 No Content | deleted |
404 Not Found | no such deal in this team |
