v1

latestOpenAPI 3.1.0MIT2026-07-243952451019.0 KB
Sales::Opportunity

Create Opportunity

Create Opportunity

post/workspaces/{workspace_id}/sales/opportunities

Path parameters

workspace_idinteger required

Request body

Example request

{
  "sales_opportunity": {
    "sales_opportunity": {
      "name": "Example Opportunity",
      "pipelines_stage_id": 42,
      "primary_contact_id": 26,
      "value": "100.0",
      "closed_at": "2025-01-01T00:00:00.000Z",
      "assignee_id": 42
    }
  }
}

Response

Created

idinteger

Opportunity ID

public_idstring nullable

Opportunity public ID

namestring

Name

workspace_idinteger

Workspace ID

pipeline_idstring nullable

Pipeline ID

pipelines_stage_idinteger

Pipeline Stage

primary_contact_idinteger

Primary Contact

valuenumber nullable

The potential value of this opportunity in the default currency of the workspace

sort_orderinteger nullable

The position of the opportunity in its pipeline stage

closed_atstring date-time nullable

Close date

created_atstring date-time nullable

Added

updated_atstring date-time nullable

Updated

assignee_idstring nullable

The ID of the Team-Membership to whom the opportunity is assigned.

Example response

{
  "id": 17,
  "public_id": "eMKZhP",
  "name": "Example Opportunity",
  "workspace_id": 42000,
  "pipeline_id": null,
  "pipelines_stage_id": 42,
  "primary_contact_id": 26,
  "value": "100.0",
  "sort_order": 0,
  "closed_at": "2025-01-01T00:00:00.000Z",
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:00:00.000Z",
  "pipeline": {
    "id": 3,
    "public_id": "KIaXjp",
    "name": "Example Pipeline"
  },
  "pipelines_stage": {
    "id": 42,
    "public_id": "rebCDY",
    "name": "Example Stage"
  },
  "primary_contact": {
    "$ref": "#/components/schemas/ContactBaseAttributes/example"
  },
  "assignee_id": null,
  "notes": [
    {
      "id": 33,
      "public_id": "TNibqR",
      "content": "Example note",
      "created_by_id": 37,
      "created_at": "2025-01-01T00:00:00.000Z",
      "updated_at": "2025-01-01T00:00:00.000Z"
    },
    {
      "id": 34,
      "public_id": "jrHtbW",
      "content": "Example note",
      "created_by_id": 38,
      "created_at": "2025-01-01T00:00:00.000Z",
      "updated_at": "2025-01-01T00:00:00.000Z"
    }
  ]
}