1. API reference
  2. Opportunities

Create an opportunity

POSThttps://howdybell.com/api/v1/opportunities

Creates a new opportunity for a contact within a specific pipeline and stage. The contact, pipeline, and stage must belong to the specified location. If the stage is a lost stage, lost_reason is required.

Request body

  • location_idintegerRequired

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

  • contact_idintegerRequired

    The ID of the contact associated with this opportunity.

  • pipeline_idintegerRequired

    The ID of the pipeline for this opportunity.

  • stage_idintegerRequired

    The ID of the stage for this opportunity.

  • namestring

    Optional name for the opportunity.

  • value_centsinteger

    Optional value of the opportunity in cents.

  • owner_user_idinteger

    Optional ID of the user who owns this opportunity.

  • lost_reasonstring

    Reason for loss. Required if stage_id is a lost stage.

Responses

201

  • 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 POST "https://howdybell.com/api/v1/opportunities" \
  -H "Authorization: Bearer $HOWDYBELL_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 1,
  "contact_id": 1,
  "pipeline_id": 1,
  "stage_id": 1,
  "name": "Ada Lovelace",
  "value_cents": 1,
  "owner_user_id": 1,
  "lost_reason": "string"
}'
Response201
{
  "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"
}
Create an opportunity (POST /api/v1/opportunities) | HowdyBell Developers