Opportunities
Opportunities represent deals or pipeline records. The publicrecord_type is opportunity.
Supported actions
| Action | Endpoint |
|---|---|
| Create | POST /api/v2/opportunity |
| Read | GET /api/v2/opportunity/{opportunity_id} |
| Query | POST /api/v2/opportunity/_query |
| Update | PATCH /api/v2/opportunity/{opportunity_id} |
| Archive | DELETE /api/v2/opportunity/{opportunity_id} |
| Create or update | Not available |
| Relationships | /api/v2/opportunity/{opportunity_id}/relationship/{api_name} |
Common fields
| Field | Value type | Notes |
|---|---|---|
display_name | string | Deal name |
amount | currency | Deal value |
stage | opportunity_stage | Required on create; patchable |
stage_last_shifted_at | timestamp | Read-only where available |
outcome | enum-like value | Read-only |
status | enum-like value | Read-only |
closed_at | timestamp | Read-only |
owner_user_id | record_reference | Owner user reference |
GET /api/v2/_schema/opportunity for the complete field list in your workspace.
Create an opportunity
Change stage
Patch thestage attribute. Do not write outcome, status, closed_at, or stage_last_shifted_at directly.
Contacts relationship
Opportunities expose typed contact relationship routes.Common errors
| Error code | Usually means |
|---|---|
field_required_missing | Required opportunity field, such as display_name, stage, or account_id, was omitted |
field_value_invalid | Stage or field value could not be resolved |
field_not_updatable | Request tried to write a read-only field |
unknown_relationship | Relationship API name is not declared |