Update an opportunity
PATCH
/v1/workspace/opportunities/{opportunity_id}
const url = 'https://api.vocapable.com/v1/workspace/opportunities/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expected_revision":1,"title":"example","stage":"new","amount_minor":1,"currency":"example","need":"example","next_step":"example","next_step_due_at":"2026-04-15T12:00:00Z","primary_contact_id":"example","owner_user_id":"example","lost_reason":"example","deferred_until":"2026-04-15T12:00:00Z","accepted_scope":"example","reason":"example","scope_accepted":true,"handoff":{"recipient_user_id":"example","fallback_user_id":"example","target_start":"2026-04-15T12:00:00Z","first_milestone":"example","respond_by":"2026-04-15T12:00:00Z","prerequisites":["example"]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.vocapable.com/v1/workspace/opportunities/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expected_revision": 1, "title": "example", "stage": "new", "amount_minor": 1, "currency": "example", "need": "example", "next_step": "example", "next_step_due_at": "2026-04-15T12:00:00Z", "primary_contact_id": "example", "owner_user_id": "example", "lost_reason": "example", "deferred_until": "2026-04-15T12:00:00Z", "accepted_scope": "example", "reason": "example", "scope_accepted": true, "handoff": { "recipient_user_id": "example", "fallback_user_id": "example", "target_start": "2026-04-15T12:00:00Z", "first_milestone": "example", "respond_by": "2026-04-15T12:00:00Z", "prerequisites": [ "example" ] } }'An explicit change under the lifecycle rules of the Pipeline slice
(workspace_pipeline.lifecycle): won needs accepted scope and opens one delivery
handoff, lost needs a reason, deferred a return date, an accepted sale is locked.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”opportunity_id
required
Opportunity Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
WorkspaceOpportunityUpdate
object
expected_revision
required
Expected Revision
integer
handoff
Any of:
WorkspaceHandoffPlan
Who delivers a sale and how it starts (J2). Sent with the change that records it.
null
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
WorkspaceOpportunity
object
id
required
Id
string
organization_id
required
Organization Id
string
organization_name
required
Organization Name
string
owner
required
Any of:
WorkspacePersonRef
A teammate named on a record: the id the server holds and the name to show.
object
user_id
required
User Id
string
name
required
Name
string
null
title
required
Title
string
stage
required
Stage
string
amount_minor
required
Amount Minor
integer
currency
required
Currency
string
revision
required
Revision
integer
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
scope_accepted_by
Any of:
WorkspacePersonRef
A teammate named on a record: the id the server holds and the name to show.
object
user_id
required
User Id
string
name
required
Name
string
null
Example
{ "stage": "new"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}