---
title: "Create opportunity"
method: POST
path: "/v1/opportunities"
tags: ["CRM"]
---

# Create opportunity

`POST /v1/opportunities`

Creates an opportunity in a pipeline and resolves related account, primary contact, additional contacts, owner, and stage from the supplied identifiers.

## Request body

- OpportunityInput
  - `pipeline_id` string, uuid, required — Target pipeline ID.
  - `opportunity` OpportunityFields, required
    - `name` string, nullable — Opportunity name. Derived if omitted.
    - `stage_id` string, uuid, nullable
    - `stage_name` string, nullable — Stage label fallback.
    - `deal_size` number, nullable
    - `close_date` integer, nullable — Unix timestamp in seconds.
    - `next_action_date` integer, nullable — Unix timestamp in seconds.
    - `next_steps` string, nullable
    - `custom_attributes` object
  - `related_objects` OpportunityRelatedObjects, required
    - `account_domain` string, nullable
    - `primary_contact_email` string, email, nullable
    - `additional_contact_emails` string[], nullable
    - `owner_email` string, email, nullable
    - `owner_id` string, uuid, nullable

## Response `200`

Opportunity was created.

- ApiResponse
  - `success` boolean
  - `message` string
  - `data` unknown

## Other responses

- `201` — Opportunity was created.
- `400` — The request failed validation.
- `401` — The API key is missing, invalid, or not allowed to access this route.
- `429` — The route rate limit was exceeded.

---

[API](https://skmtc.net/octolane-org/apis/octolane-public-api.md) · [All operations](https://skmtc.net/octolane-org/apis/octolane-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octolane-org/octolane-public-api/versions/8c7700f1eeec/schema)
