> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flozy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Opportunities

> Pipeline deals linked to leads and pipeline stages.

An **opportunity** represents a deal in a pipeline stage. It is always linked to a lead. Use `GET /pipelines` to discover valid `stage_id` values before creating opportunities.

## Opportunity object

| Field                 | Type           | Description                   |
| --------------------- | -------------- | ----------------------------- |
| `id`                  | integer        | Unique opportunity ID.        |
| `stage_id`            | integer        | Pipeline stage ID.            |
| `lead_id`             | integer        | Linked lead ID.               |
| `value`               | number         | Monetary value.               |
| `confidence`          | integer        | Win probability 0–100.        |
| `expected_close_date` | string         | ISO 8601 expected close date. |
| `note`                | string \| null | Optional note.                |
| `created_at`          | string         | ISO 8601 creation timestamp.  |

## Endpoints

<CardGroup cols={2}>
  <Card title="List opportunities" icon="list" href="/api-reference/opportunities/list">`GET /opportunities`</Card>
  <Card title="Get opportunity" icon="magnifying-glass" href="/api-reference/opportunities/get">`GET /opportunities/{id}`</Card>
  <Card title="Create opportunity" icon="plus" href="/api-reference/opportunities/create">`POST /opportunities`</Card>
  <Card title="Update opportunity" icon="pen" href="/api-reference/opportunities/update">`PUT /opportunities/{id}`</Card>
  <Card title="Delete opportunity" icon="trash" href="/api-reference/opportunities/delete">`DELETE /opportunities/{id}`</Card>
</CardGroup>
