ClientSphereDocs
API reference/Opportunities

Update opportunity

Updates an opportunity by its id and returns the updated record, including any change to its stage or value.

PUT
/opportunities/{id}

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Request Body

application/jsonRequired
titlestring
descriptionstring
valuestring

Decimal as string

stagestring
Default: "discovery"Value in: "discovery" | "qualification" | "technical_evaluation" | "proposal" | "negotiation" | "closed_won" | "closed_lost"
probabilityinteger
Minimum: 0Maximum: 100
expectedCloseDatestring
Format: "date-time"
accountIdstring
Format: "uuid"
leadSourcestring
Value in: "website" | "referral" | "cold_outreach" | "marketing" | "trade_show" | "partner"
dealSizestring
Value in: "small" | "medium" | "large" | "enterprise"

Path Parameters

idRequiredstring

Resource ID

Format: "uuid"
curl -X PUT "https://clientsphere.io/api/v1/opportunities/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Enterprise Deal",
    "description": "string",
    "value": "50000.00",
    "stage": "discovery",
    "probability": 100,
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
    "leadSource": "website",
    "dealSize": "small"
  }'

Updated opportunity

{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",
    "pipelineId": "621ef2b0-ba1d-48e5-89dc-b778e6ed42fd",
    "title": "string",
    "description": "string",
    "value": "50000.00",
    "stage": "discovery",
    "probability": 100,
    "expectedCloseDate": "2019-08-24T14:15:22Z",
    "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
    "leadSource": "string",
    "dealSize": "small",
    "forecastCategory": "pipeline",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}