Infusionsoft (Keap) Opportunity API

Opportunities-Endpoint

Operations 52

GET /rest/v2/opportunities List Opportunities #
POST /rest/v2/opportunities Create an Opportunity #
GET /rest/v2/opportunities/stages List of Opportunity Stages #
POST /rest/v2/opportunities/stages Create an Opportunity Stage #
POST /rest/v2/opportunities/model/customFields Create an Opportunity Custom Field #
GET /rest/v2/opportunities/model/customFields/tabs List Opportunity Custom Field Tabs #
POST /rest/v2/opportunities/model/customFields/tabs Create an Opportunity Custom Field Tab #
GET /rest/v2/opportunities/model/customFields/groups List Opportunity Custom Field Groups #
POST /rest/v2/opportunities/model/customFields/groups Create an Opportunity Custom Field Group #
GET /rest/v2/opportunities/{opportunity_id} Retrieve a Opportunity #
DELETE /rest/v2/opportunities/{opportunity_id} Delete an Opportunity #
PATCH /rest/v2/opportunities/{opportunity_id} Update an opportunity #
GET /rest/v2/opportunities/stages/{stage_id} Retrieve an Opportunity Stage #
DELETE /rest/v2/opportunities/stages/{stage_id} Delete an Opportunity Stage #
PATCH /rest/v2/opportunities/stages/{stage_id} Update an Opportunity Stage #
DELETE /rest/v2/opportunities/model/customFields/{custom_field_id} Delete an Opportunity Custom Field #
PATCH /rest/v2/opportunities/model/customFields/{custom_field_id} Update a Opportunity's Custom Field #
GET /rest/v2/opportunities/model/customFields/tabs/{tab_id} Retrieve an Opportunity Custom Field Tab #
DELETE /rest/v2/opportunities/model/customFields/tabs/{tab_id} Delete an Opportunity Custom Field Tab #
PATCH /rest/v2/opportunities/model/customFields/tabs/{tab_id} Update an Opportunity Custom Field Tab #
GET /rest/v2/opportunities/model/customFields/groups/{group_id} Retrieve an Opportunity Custom Field Group #
DELETE /rest/v2/opportunities/model/customFields/groups/{group_id} Delete an Opportunity Custom Field Group #
PATCH /rest/v2/opportunities/model/customFields/groups/{group_id} Update an Opportunity Custom Field Group #
GET /rest/v2/opportunities/stageMoves List Opportunity Stage Moves #
GET /rest/v2/opportunities/stageMoves/{stage_move_id} Retrieve an Opportunity Stage Move #
GET /rest/v2/opportunities/model Retrieve Opportunity Custom Field Model #
GET /v1/opportunities List Opportunities #
PUT /v1/opportunities Replace an Opportunity #
POST /v1/opportunities Create an Opportunity #
GET /v1/opportunities/model Retrieve Opportunity Model #
GET /v1/opportunities/{opportunityId} Retrieve an Opportunity #
PATCH /v1/opportunities/{opportunityId} Update an Opportunity #
GET /v1/opportunity/stage_pipeline List Opportunity Stage Pipeline #
GET /rest/v1/opportunities List Opportunities #
PUT /rest/v1/opportunities Replace an Opportunity #
POST /rest/v1/opportunities Create an Opportunity #
GET /rest/v1/opportunities/{opportunityId} Retrieve an Opportunity #
PATCH /rest/v1/opportunities/{opportunityId} Update an Opportunity #
GET /rest/v1/opportunity/stage_pipeline List Opportunity Stage Pipeline #
GET /rest/v1/opportunities/model Retrieve Opportunity Model #
GET /v2/opportunities List Opportunities #
POST /v2/opportunities Create an Opportunity #
POST /v2/opportunities/model/customFields Create an Opportunity Custom Field #
PATCH /v2/opportunities/model/customFields/{custom_field_id} Update a Opportunity's Custom Field #
GET /v2/opportunities/stages List of Opportunity Stages #
POST /v2/opportunities/stages Create an Opportunity Stage #
GET /v2/opportunities/stages/{stage_id} Retrieve an Opportunity Stage #
DELETE /v2/opportunities/stages/{stage_id} Delete an Opportunity Stage #
PATCH /v2/opportunities/stages/{stage_id} Update an Opportunity Stage #
GET /v2/opportunities/{opportunity_id} Retrieve a Opportunity #
DELETE /v2/opportunities/{opportunity_id} Delete an Opportunity #
PATCH /v2/opportunities/{opportunity_id} Update an opportunity #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/infusionsoft-opportunity-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

infusionsoft-opportunity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Infusionsoft Opportunity API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '1.0'
  description: 'Operations tagged Opportunity across 7 of this provider''s published API definitions: infusionsoft-keap-sdk-v2-swagger-original.yml, infusionsoft-rest-v1-2025-11-05-openapi-original.json, infusionsoft-rest-v1-openapi-original.json, infusionsoft-rest-v1-openapi.json, infusionsoft-rest-v2-2025-11-05-openapi-original.json, infusionsoft-rest-v2-openapi-original.json, infusionsoft-rest-v2-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.keap.com/crm
- url: https://api.infusionsoft.com/crm/rest
- url: https://api.infusionsoft.com/crm
tags:
- name: Opportunity
paths:
  /rest/v2/opportunities:
    get:
      tags:
      - Opportunity
      summary: List Opportunities
      description: Retrieves a list of all Opportunities.
      operationId: listOpportunities
      parameters:
      - name: fields
        in: query
        description: 'Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time'
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - custom_fields
            - created_by
            - last_updated_by
            - status_id
            - monthly_revenue
            - order_revenue
            - objection
            - status
            - stage_entrance_time
          uniqueItems: true
      - name: filter
        in: query
        description: 'Filter to apply, allowed fields are:

          - (String) `stage_id`

          - (String) `user_id`

          - (String) `contact_id`

          - (String) `opportunity_title` — supports wildcard prefix search (e.g. `opportunity_title==Deal*`)

          - (String) `lead_source_name` — supports wildcard prefix search (e.g. `lead_source_name==Web*`)

          - (String) `affiliate_id` — exact match only (e.g. `affiliate_id==123`)

          - (String) `opportunity_id` — supports comparison operators: `==`, `>`, `<`, `>=`, `<=`

          - (String) `ids` — comma-separated list of opportunity IDs (e.g. `ids==1,2,3`), maximum 100 IDs

          - (String) `contact_phone` — matches the contact''s phone. By default it is an exact match against the stored value, including any formatting characters (e.g. `contact_phone==(480) 123-4567`); it does not normalize or search across an unformatted number. Supports wildcard prefix search for partial matches (e.g. `contact_phone==480*`)

          - (String) `contact_city` — matches the contact''s city; supports wildcard prefix search (e.g. `contact_city==Chand*`)

          - (String) `contact_state` — matches the contact''s state; supports wildcard prefix search (e.g. `contact_state==AZ*`)

          - (String) `projected_revenue_high` — projected revenue high; supports comparison operators: `==`, `>`, `<`, `>=`, `<=` (e.g. `projected_revenue_high>=1000`)

          - (String) `projected_revenue_low` — projected revenue low; supports comparison operators: `==`, `>`, `<`, `>=`, `<=` (e.g. `projected_revenue_low<=500`)

          Note: `opportunity_id` and `ids` cannot be used together in the same request.


          **Custom fields:** opportunities may also be filtered by any custom field defined on the Opportunity record, referenced by its field name (e.g. `cf_priority==10`). Both indexed and non-indexed custom fields are filterable. The supported operator and value depend on the field''s data type:

          - Text-like fields (Text, Text Area, Name, Email, Website, Phone, Social Security Number) and choice fields with text options (Dropdown, Radio, State) — equals (`==`) and prefix wildcard (e.g. `cf_company==Acme*`)

          - Numeric fields (Whole Number, Decimal, Currency, Percent, Year, Month, Day of Week, User) — equals and comparison (`==`, `>`, `<`, `>=`, `<=`)

          - Date and Date/Time fields — equals and comparison; the value must be a full ISO-8601 date-time with milliseconds and a timezone offset (e.g. `cf_renewDate<=2026-01-01T00:00:00.000Z`). Date-only values such as `2026-01-01` are rejected

          - Yes/No fields — equals only, value `0` (No) or `1` (Yes)

          - Drilldown fields — equals only, integer value

          - Multi-select fields (List Box, User List Box) — equals only, matched as a contains search over the stored selections (e.g. `cf_tags==red`)

          A custom field that does not exist, an operator unsupported for the field''s type, or a value that does not match the field''s type returns `400 Bad Request`.

          '
        required: false
        schema:
          type: string
      - name: order_by
        in: query
        description: 'Attribute and direction to opportunities items.

          One of the following fields:

          - `next_action_time`

          - `contact_name`

          - `opportunity_title`

          - `created_time`

          - `update_time`


          One of the following directions:

          - `asc`

          - `desc`'
        required: false
        schema:
          type: string
      - name: page_size
        in: query
        description: Total number of items to return per page
        required: false
        schema:
          type: integer
          format: int32
          maximum: 1000
          minimum: 0
        example: 0
      - name: page_token
        in: query
        description: Page token
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOpportunitiesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    post:
      tags:
      - Opportunity
      summary: Create an Opportunity
      description: Creates a new opportunity as the authenticated user.
      operationId: createOpportunity
      parameters:
      - name: fields
        in: query
        description: 'Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time'
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - custom_fields
            - created_by
            - last_updated_by
            - status_id
            - monthly_revenue
            - order_revenue
            - objection
            - status
            - stage_entrance_time
          uniqueItems: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOpportunityRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestV2Opportunity'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    servers:
    - url: https://api.keap.com/crm
  /rest/v2/opportunities/stages:
    get:
      tags:
      - Opportunity
      summary: List of Opportunity Stages
      description: Retrieves a list of Opportunity Stages.
      operationId: listOpportunityStages
      parameters:
      - name: filter
        in: query
        description: 'Filter to apply, allowed fields are:

          - (String) `opportunity_stage_name` — supports wildcard prefix search (e.g. `opportunity_stage_name==Qualified*`)

          - (String) `opportunity_stage_id` — supports comparison operators: `==`, `>`, `<`, `>=`, `<=` (e.g. `opportunity_stage_id>5`)

          '
        required: false
        schema:
          type: string
      - name: order_by
        in: query
        description: 'Attribute and direction to order stage items.

          One of the following fields:

          - `stage_order`


          One of the following directions:

          - `asc`

          - `desc`'
        required: false
        schema:
          type: string
      - name: page_size
        in: query
        description: Total number of items to return per page
        required: false
        schema:
          type: integer
          format: int32
          maximum: 1000
          minimum: 0
        example: 0
      - name: page_token
        in: query
        description: Page token
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOpportunityStagesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    post:
      tags:
      - Opportunity
      summary: Create an Opportunity Stage
      description: Creates a new Opportunity Stage
      operationId: createOpportunityStage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOpportunityStageRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestOpportunityStage'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    servers:
    - url: https://api.keap.com/crm
  /rest/v2/opportunities/model/customFields:
    post:
      tags:
      - Opportunity
      summary: Create an Opportunity Custom Field
      description: Creates a custom field of the specified type and options to the Opportunity object
      operationId: createOpportunityCustomFields
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldMetaData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    servers:
    - url: https://api.keap.com/crm
  /rest/v2/opportunities/model/customFields/tabs:
    get:
      tags:
      - Opportunity
      summary: List Opportunity Custom Field Tabs
      description: Retrieves a list of custom field tabs for the Opportunity record type.
      operationId: listOpportunityCustomFieldTabs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomFieldTabsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    post:
      tags:
      - Opportunity
      summary: Create an Opportunity Custom Field Tab
      description: Creates a new custom field tab for the Opportunity record type.
      operationId: createOpportunityCustomFieldTab
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldTabRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldTab'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    servers:
    - url: https://api.keap.com/crm
  /rest/v2/opportunities/model/customFields/groups:
    get:
      tags:
      - Opportunity
      summary: List Opportunity Custom Field Groups
      description: Retrieves a list of custom field groups for the Opportunity record type. Optionally filter by tab_id to scope to a specific tab.
      operationId: listOpportunityCustomFieldGroups
      parameters:
      - name: tab_id
        in: query
        description: Optional tab id to scope groups to a single tab
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomFieldGroupsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    post:
      tags:
      - Opportunity
      summary: Create an Opportunity Custom Field Group
      description: Creates a new custom field group for the Opportunity record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab.
      operationId: createOpportunityCustomFieldGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldGroupRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldGroup'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    servers:
    - url: https://api.keap.com/crm
  /rest/v2/opportunities/{opportunity_id}:
    get:
      tags:
      - Opportunity
      summary: Retrieve a Opportunity
      description: Retrieves the specified Opportunity
      operationId: getOpportunity
      parameters:
      - name: opportunity_id
        in: path
        required: true
        schema:
          type: string
      - name: fields
        in: query
        description: 'Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time'
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - custom_fields
            - created_by
            - last_updated_by
            - status_id
            - monthly_revenue
            - order_revenue
            - objection
            - status
            - stage_entrance_time
          uniqueItems: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestV2Opportunity'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    delete:
      tags:
      - Opportunity
      summary: Delete an Opportunity
      description: Deletes the specified Opportunity
      operationId: deleteOpportunity
      parameters:
      - name: opportunity_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - oauth2: []
    patch:
      tags:
      - Opportunity
      summary: Update an opportunity
      description: Updates specified values of a given opportunity
      operationId: updateOpportunity
      parameters:
      - name: opportunity_id
        in: path
        required: true
        schema:
          type: string
      - name: update_mask
        in: query
        description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - opportunity_title
            - next_action_time
            - next_action_notes
            - opportunity_notes
            - estimated_close_time
            - include_in_forecast
            - projected_revenue_low
            - projected_revenue_high
            - contact_id
            - stage_id
            - user_id
            - custom_fields
            - affiliate_id
          uniqueItems: true
      - name: fields
        in: query
        description: 'Comma-delimited list of optional Opportunities properties to include in the response. Legacy field names are supported for optional fields only if legacy opportunities feature is enabled. Allowed optional values: custom_fields,created_by,last_updated_by,status_id. Allowed legacy optional values: monthly_revenue,order_revenue,objection,status,stage_entrance_time'
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - custom_fields
            - created_by
            - last_updated_by
            - status_id
            - monthly_revenue
            - order_revenue
            - objection
            - status
            - stage_entrance_time
          uniqueItems: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOpportunityRequestV2'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schema

# --- truncated at 32 KB (510 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/infusionsoft/refs/heads/main/openapi/infusionsoft-opportunity-api-openapi.yml