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

# Create opportunity

`POST /v1/opportunities`

## Request

- Base URL: `https://api.octolane.com`
- URL: `https://api.octolane.com/v1/opportunities`
- Auth: API key in header `x-api-key`

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.

## Changes

- **2026-06-16** `9647d7c49947`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/octolane-org/apis/octolane-public-api/changes/v1/opportunities/post.md)

---

[API](https://skmtc.dev/octolane-org/apis/octolane-public-api.md) - [All operations](https://skmtc.dev/octolane-org/apis/octolane-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octolane-org/apis/octolane-public-api/revisions/d248d0a2be5d?raw)
