1. API reference
  2. Opportunities

Update an opportunity

PATCHhttps://howdybell.com/api/v1/opportunities/{id}

Updates an existing opportunity. You can change the stage, name, value, owner, or lost reason. The opportunity must belong to the specified location.

Parameters

  • idstringRequiredpath

Request body

  • location_idintegerRequired

    The location to work in. Must belong to your workspace.

  • stage_idinteger

    New stage ID for the opportunity.

  • lost_reasonstring

    Reason for loss. Required if moving to a lost stage.

  • namestring

    New name for the opportunity.

  • value_centsinteger

    New value of the opportunity in cents.

  • owner_user_idinteger

    New ID of the user who owns this opportunity.

Responses

200

  • idinteger
  • contactobject, nullable
    • idinteger
    • namestring
  • pipelineobject, nullable
    • idinteger
    • namestring
  • stageobject
    • idinteger
    • namestring
    • kindstring
    • colorstring, nullable
  • namestring, nullable
  • value_centsinteger
  • ownerobject, nullable
    • idinteger
    • namestring
  • statusstring
  • lost_reasonstring, nullable
  • stage_entered_atstring, nullable
  • closed_atstring, nullable
  • created_atstring, nullable
  • updated_atstring, nullable

422 Validation error

  • messagestring

    Errors overview.

  • errorsobject

    A detailed description of each field that failed validation.

RequestcURL
curl -X PATCH "https://howdybell.com/api/v1/opportunities/123" \
  -H "Authorization: Bearer $HOWDYBELL_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 1,
  "stage_id": 1,
  "lost_reason": "string",
  "name": "Ada Lovelace",
  "value_cents": 1,
  "owner_user_id": 1
}'
Response200
{
  "id": 1,
  "contact": {
    "id": 1,
    "name": "Ada Lovelace"
  },
  "pipeline": {
    "id": 1,
    "name": "Ada Lovelace"
  },
  "stage": {
    "id": 1,
    "name": "Ada Lovelace",
    "kind": "string",
    "color": "string"
  },
  "name": "Ada Lovelace",
  "value_cents": 1,
  "owner": {
    "id": 1,
    "name": "Ada Lovelace"
  },
  "status": "string",
  "lost_reason": "string",
  "stage_entered_at": "string",
  "closed_at": "string",
  "created_at": "string",
  "updated_at": "string"
}
Update an opportunity (PATCH /api/v1/opportunities/{id}) | HowdyBell Developers