Update an opportunity

PUT https://api.zenoti.com/v1/opportunities/{opportunity_id}

Updates the stage, notes, or assigned employee for an existing opportunity.

Before you begin

Permission: Manage API Keys (under Administrator) — Required to access Zenoti APIs.

Endpoint

PUT /v1/opportunities/{opportunity_id}

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
opportunity_id string (GUID) Yes Opportunity identifier

Request body

Field Type Required Description
stage_id string (GUID) No New pipeline stage
assigned_to string (GUID) No Assigned employee
notes string No Notes or comments
follow_up_date date No Next follow-up date

Response

Success (200 OK)

{
  "id": "f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f9a0b1c",
  "stage": "Negotiation",
  "error": null
}

Response fields

Field Type Description
id string (GUID) Opportunity identifier
stage string Updated pipeline stage

Example

curl --request PUT \
  --url 'https://api.zenoti.com/v1/opportunities/f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f9a0b1c' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{ "stage_id": "c3d4e5f6-a7b8-9012-cdef-345678901234", "notes": "Follow up next week" }'
const response = await fetch('https://api.zenoti.com/v1/opportunities/{opportunity_id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ stage_id: 'c3d4e5f6-a7b8-9012-cdef-345678901234', notes: 'Follow up next week' })
});
const data = await response.json();
import requests

response = requests.put(
    'https://api.zenoti.com/v1/opportunities/{opportunity_id}',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'stage_id': 'c3d4e5f6-a7b8-9012-cdef-345678901234', 'notes': 'Follow up next week'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new { stageId = "c3d4e5f6-a7b8-9012-cdef-345678901234", notes = "Follow up next week" }),
    Encoding.UTF8, "application/json");
var response = await client.PutAsync(
    "https://api.zenoti.com/v1/opportunities/{opportunity_id}", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/opportunities/{opportunity_id}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { stage_id: 'c3d4e5f6-a7b8-9012-cdef-345678901234', notes: 'Follow up next week' }.to_json
response = http.request(request)
data = JSON.parse(response.body)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.zenoti.com/v1/opportunities/{opportunity_id}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: bearer {{access_token}}',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['stage_id' => 'c3d4e5f6-a7b8-9012-cdef-345678901234', 'notes' => 'Follow up next week']));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);

Error codes

Status Description
401 Unauthorized — invalid or expired access token
404 Resource not found
429 Too many requests — rate limit exceeded (60/min)