Update the ContactId Based Opportunities

From docs
Revision as of 06:00, 17 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Update Contact Opportunity == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contacts/{id}/opportunities/{opportunity_id} === Purpose === Updates...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Update Contact Opportunity

Base URL

https://apimobile.callproof.com

Endpoint

/api/contacts/{id}/opportunities/{opportunity_id}

Purpose

Updates an existing sales opportunity for a specific contact. The request can change opportunity name, stage, type, owner, value, probability, closing date, notes, linked accounts, linked people, and custom field values. Existing linked accounts and people are replaced with the values provided in the request.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

Parameter Type Required Description
id integer Yes Unique identifier of the contact associated with the opportunity
opportunity_id integer Yes Unique identifier of the opportunity to update

Query Parameters

None.

Request Body

Parameter Type Required Description
opportunity_stage_id string / integer Yes Opportunity stage identifier. Must exist in the company’s opportunity stages
owner_id string / integer Yes User identifier of the opportunity owner. Must exist as a valid user
form_data string Yes Custom field values for the opportunity, typically provided as a JSON string
opportunity_name string No Name of the opportunity
opportunity_type_id string / integer No Opportunity type identifier
linked_accounts string No JSON array of related account / contact IDs to link to the opportunity. Replaces existing linked accounts. The primary contact ID is included automatically if omitted
linked_contacts string No JSON array of people / personnel IDs to link to the opportunity. Replaces existing linked people
value number No Opportunity value / amount. Must be numeric when provided
probability string / number No Win probability percentage (0–100)
close_date string No Expected closing date. Must be a valid date when provided
notes string No Notes associated with the opportunity

Successful Response (200)

Indicates that the opportunity was updated successfully for the specified contact.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
message string Confirmation message (for example, "Opportunities Updated Successfully")
uri string Requested resource URI

Error Responses

Status Code Meaning
200 Validation failure – request body failed validation (returned with an error payload and clientStatusCode 401)
400 Bad Request – the opportunity could not be updated (for example, contact not found, opportunity not found, or processing error)
401 Unauthorized – missing, invalid, or expired Bearer token
  • 200 (validation failure) – Required fields are missing or invalid (for example, missing stage, owner, or form data; invalid close date; non-numeric value; or probability outside 0–100).
  • 400 – The contact or opportunity was not found, custom field processing failed, or another error occurred while updating the opportunity.
  • 401 – Authentication failed or the access token is missing/expired.