Skip to main content
PATCH
/
v1
/
opportunities
/
{id}
Update an opportunity
curl --request PATCH \
  --url https://api.slant.app/v1/opportunities/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated opportunity",
  "value": 750000,
  "probability": 80,
  "target_close_date": "2023-11-07T05:31:56Z",
  "pipeline_stage_id": "<string>",
  "assigned_to_id": "<string>",
  "owner_id": "<string>",
  "household_id": "<string>",
  "custom_fields": {}
}
'
{
  "id": "abc123xyz",
  "name": "New Investment Opportunity",
  "book_id": "book123xyz",
  "pipeline": {
    "id": "pipeline123xyz",
    "name": "Sales Pipeline",
    "pipeline_type": "prospect",
    "book_id": "book123xyz",
    "pipeline_stages": [
      {
        "id": "stage123xyz",
        "name": "Qualified",
        "stage_order": 1,
        "visible": true,
        "default_probability": 50
      }
    ]
  },
  "pipeline_stage": {
    "id": "stage123xyz",
    "name": "Qualified",
    "stage_order": 1,
    "visible": true,
    "default_probability": 50
  },
  "assigned_to": {
    "id": "abc123xyz",
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "api_access": {
      "auth_type": "personal_access_token",
      "scope": "read_write"
    }
  },
  "value": 5000,
  "probability": 75,
  "target_close_date": "2023-11-07T05:31:56Z",
  "stage_updated_at": "2023-11-07T05:31:56Z",
  "household_id": "household123xyz",
  "custom_fields": {
    "lead_source": "Referral"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.slant.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

OAuth 2.0 Bearer Token from Clerk authentication

Headers

Idempotency-Key
string

Unique key to ensure idempotent request handling. If a request with the same key was already processed, the original response will be returned.

Path Parameters

id
string
required

The opportunity ID

Body

application/json
name
string

Name of the opportunity

Example:

"Updated opportunity"

value
integer

The monetary value of the opportunity in whole dollars, not cents

Example:

750000

probability
integer

The probability of closing (0-100)

Example:

80

target_close_date
string<date-time>

Expected close date

pipeline_stage_id
string

The pipeline stage ID. Must belong to the opportunity pipeline.

assigned_to_id
string

The assigned user ID from the relevant book users list. Prefer this over owner_id.

owner_id
string

Alias for assigned_to_id

household_id
string

The household ID

custom_fields
object

Custom field values as key-value pairs

Response

opportunity updated

id
string
required

The opportunity ID

Example:

"abc123xyz"

name
string
required

The name of the opportunity

Example:

"New Investment Opportunity"

book_id
string
required

The book ID

Example:

"book123xyz"

pipeline
object
required
pipeline_stage
object
required
assigned_to
object
required

The user assigned to this opportunity. Set this with assigned_to_id on create or update.

value
integer | null

The monetary value of the opportunity in dollars

Example:

5000

probability
integer | null

The probability of closing (0-100)

Example:

75

target_close_date
string<date-time> | null

Expected close date

stage_updated_at
string<date-time> | null

When the opportunity last moved stages. Useful for stage aging and pipeline reporting.

household_id
string | null

The household ID (null for unassociated opportunities)

Example:

"household123xyz"

custom_fields
object

Custom field values as key-value pairs

Example:
{ "lead_source": "Referral" }
created_at
string<date-time>

When the opportunity was created

updated_at
string<date-time>

When the opportunity was last updated