openapi: 3.1.0 info: title: Keap Opportunity API description: Keap Public API Documentation termsOfService: https://www.thryv.com/terms-of-use contact: name: Keap url: https://developer.keap.com/get-support email: api.keap@thryv.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: v2 servers: - 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: 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: page_token in: query description: Page token 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: 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListOpportunitiesResponse' 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/RestV2Opportunity' /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: page_token in: query description: Page token 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 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListOpportunityStagesResponse' 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/RestOpportunityStage' /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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldMetaData' /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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListCustomFieldTabsResponse' 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldTab' /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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListCustomFieldGroupsResponse' 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldGroup' /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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestV2Opportunity' 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content 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: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestV2Opportunity' /rest/v2/opportunities/stages/{stage_id}: get: tags: - Opportunity summary: Retrieve an Opportunity Stage description: Retrieves the specified Opportunity Stage operationId: getOpportunityStage parameters: - name: stage_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestOpportunityStage' delete: tags: - Opportunity summary: Delete an Opportunity Stage description: Deletes the specified Opportunity Stage operationId: deleteOpportunityStage parameters: - name: stage_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Opportunity summary: Update an Opportunity Stage description: Updates specified values of a given Opportunity Stage operationId: updateOpportunityStage parameters: - name: stage_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: - name - order - target_number_days - probability - checklist_items uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateOpportunityStageRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestOpportunityStage' /rest/v2/opportunities/model/customFields/{custom_field_id}: delete: tags: - Opportunity summary: Delete an Opportunity Custom Field description: Deletes a Custom Field from Opportunity. operationId: deleteOpportunitiesCustomField parameters: - name: custom_field_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Opportunity summary: Update a Opportunity's Custom Field description: Updates a custom field of the specified type and options to the Opportunity object. operationId: updateOpportunityCustomField parameters: - name: custom_field_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: - group_id - label - options uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldMetaDataRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldMetaData' /rest/v2/opportunities/model/customFields/tabs/{tab_id}: get: tags: - Opportunity summary: Retrieve an Opportunity Custom Field Tab description: Retrieves a single custom field tab by id for the Opportunity record type. operationId: getOpportunityCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldTab' delete: tags: - Opportunity summary: Delete an Opportunity Custom Field Tab description: Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups. operationId: deleteOpportunityCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Opportunity summary: Update an Opportunity Custom Field Tab description: Updates an existing custom field tab. Only fields listed in `update_mask` are applied. operationId: updateOpportunityCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string - name: update_mask in: query description: Comma-separated list of fields to update required: true schema: type: array items: type: string enum: - name - order uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldTabRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldTab' /rest/v2/opportunities/model/customFields/groups/{group_id}: get: tags: - Opportunity summary: Retrieve an Opportunity Custom Field Group description: Retrieves a single custom field group by id for the Opportunity record type. operationId: getOpportunityCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldGroup' delete: tags: - Opportunity summary: Delete an Opportunity Custom Field Group description: Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields. operationId: deleteOpportunityCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Opportunity summary: Update an Opportunity Custom Field Group description: Updates an existing custom field group. Only fields listed in `update_mask` are applied. operationId: updateOpportunityCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string - name: update_mask in: query description: Comma-separated list of fields to update required: true schema: type: array items: type: string enum: - name - tab_id - order uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldGroupRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldGroup' /rest/v2/opportunities/stageMoves: get: tags: - Opportunity summary: List Opportunity Stage Moves description: Returns a paginated list of historical stage-move records. operationId: listOpportunityStageMoves parameters: - name: filter in: query description: 'Filter to apply. Allowed fields: - (Id) `opportunity_id` — supports `==` - (Id) `user_id` — supports `==` Separate multiple filters with semicolons: `opportunity_id==7;user_id==1` ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Field and direction to order results. Supported fields: `move_date`, `id` Directions: `asc` | `desc` Example: `move_date 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 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListOpportunityStageMoveResponse' /rest/v2/opportunities/stageMoves/{stage_move_id}: get: tags: - Opportunity summary: Retrieve an Opportunity Stage Move description: Retrieves a single historical record of an opportunity being moved from one pipeline stage to another. operationId: getOpportunityStageMove parameters: - name: stage_move_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OpportunityStageMove' /rest/v2/opportunities/model: get: tags: - Opportunity summary: Retrieve Opportunity Custom Field Model description: Get the custom fields for the Opportunity object operationId: retrieveOpportunityCustomFieldModel responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden 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' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ObjectModel' components: schemas: CheckListItemDetails: type: object properties: id: type: integer format: int64 description: type: string required: type: boolean instance_id: type: integer format: int64 item_order: type: integer format: int32 done_date: type: string format: date-time ChecklistItem: type: object properties: id: type: string description: Checklist item ID example: 101 description: type: string description: Item description example: Send proposal document required: type: boolean description: Whether item is required example: true order: type: integer format: int32 description: Display order example: 1 CreateCustomFieldGroupRequest: type: object properties: name: type: string tab_id: type: string CreateCustomFieldOptionRequest: type: object properties: label: type: string CreateCustomFieldRequest: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CreateCustomFieldOptionRequest' field_type: type: string enum: - CURRENCY - DATE - DATE_TIME - DAY_OF_WEEK - DECIMAL_NUMBER - DRILLDOWN - DROPDOWN - EMAIL - LIST_BOX - MONTH - NAME - PERCENT - PHONE_NUMBER - RADIO - SOCIAL_SECURITY_NUMBER - STATE - TEXT - TEXT_AREA - USER - USER_LIST_BOX - WEBSITE - WHOLE_NUMBER - YEAR - YES_NO group_id: type: string description: An optional tab group to place the field under in the interface. If not specified, will default to the 'Custom Fields' tab. user_group_id: type: string description: An optional user group to choose from when selecting values for User or UserListBox fields. required: - field_type - label CreateCustomFieldTabRequest: type: object properties: name: type: string CreateOpportunityRequest: type: object description: opportunity properties: opportunity_title: type: string description: Opportunity title example: New Business Deal next_action_time: type: string description: Next action timestamp (ISO-8601) example: '2024-03-20T10:00:00Z' next_action_notes: type: string description: Notes for next action example: Schedule demo call opportunity_notes: type: string description: General notes example: Prospect from website inquiry estimated_close_time: type: string description: Estimated close timestamp (ISO-8601) example: '2024-04-15T00:00:00Z' include_in_forecast: type: boolean description: Include in sales forecast example: true projected_revenue_low: type: number format: double description: Low revenue estimate example: 5000.0 projected_revenue_high: type: number format: double description: High revenue estimate example: 10000.0 contact_id: type: string description: Associated contact ID example: 1001 stage_id: type: string description: Pipeline stage ID example: 2 user_id: type: string description: Assigned user ID example: 456 custom_fields: type: array items: $ref: '#/components/schemas/CustomField' affiliate_id: type: string description: Affiliate ID example: 789 required: - contact_id - opportunity_title - stage_id CreateOpportunityStageChecklistItem: type: object properties: description: type: string required: type: boolean example: true order: type: integer format: int32 description: Must be Numeric could be negative values as well for ordering examples: - '-2' - '1' required: - description - order - required CreateOpportunityStageRequest: type: object description: opportunity properties: name: type: string example: Won order: type: integer format: int32 example: 5 target_number_days: type: integer format: int32 example: 10 minimum: 0 probability: type: integer format: int32 example: 42 maximum: 100 minimum: 0 checklist_items: type: array items: $ref: '#/components/schemas/CreateOpportunityStageChecklistItem' required: - name - order - probability - target_number_days CustomField: type: object properties: content: {} id: type: string CustomFieldGroup: type: object properties: id: type: string name: type: string order: type: integer format: int32 tab_id: type: string record_type: type: string enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION CustomFieldMetaData: type: object description: Metadata describing a custom field, including its type and options properties: id: type: string description: The unique identifier of the custom field example: 123 label: type: string description: The display label of the custom field example: Favorite Color options: type: array description: The list of available options for select/radio/multiselect/drilldown field types items: $ref: '#/components/schemas/CustomFieldOption' record_type: type: string description: The entity type this custom field belongs to (e.g. CONTACT, COMPANY) enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION field_type: type: string description: The data type of the custom field (e.g. Text, Number, Date, Select) enum: - CURRENCY - DATE - DATE_TIME - DAY_OF_WEEK - DECIMAL_NUMBER - DRILLDOWN - DROPDOWN - EMAIL - LIST_BOX - MONTH - NAME - PERCENT - PHONE_NUMBER - RADIO - SOCIAL_SECURITY_NUMBER - STATE - TEXT - TEXT_AREA - USER - USER_LIST_BOX - WEBSITE - WHOLE_NUMBER - YEAR - YES_NO default_value: type: string description: The default value for this custom field, if any group_id: type: string description: The ID of the group this custom field belongs to example: 45 group_name: type: string description: The name of the group this custom field belongs to example: Personal Info field_name: type: string description: The database column name for this custom field. Use this value when filtering contacts (e.g. for field_name 'firstName1', filter with 'firstName1==John'). example: firstName1 CustomFieldOption: type: object properties: id: type: string label: type: string CustomFieldTab: type: object properties: id: type: string description: The unique identifier of the custom field tab example: 123 name: type: string description: The name of the custom field tab example: Personal Info order: type: integer format: int32 description: The display order of the tab example: 1 record_type: type: string description: The record type this tab belongs to (e.g., CONTACT, COMPANY, OPPORTUNITY, REFERRAL_PARTNER, ORDER, SUBSCRIPTION, TASK_NOTE_APPOINTMENT) enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION example: CONTACT Error: type: object properties: code: type: integer format: int32 message: type: string status: type: string details: type: array items: $ref: '#/components/schemas/ErrorDetails' ErrorDetails: type: object properties: domain: type: string resource: type: string ListCustomFieldGroupsResponse: type: object properties: groups: type: array items: $ref: '#/components/schemas/CustomFieldGroup' ListCustomFieldTabsResponse: type: object properties: tabs: type: array items: $ref: '#/components/schemas/CustomFieldTab' ListOpportunitiesResponse: type: object properties: opportunities: type: array items: $ref: '#/components/schemas/RestV2Opportunity' next_page_token: type: string ListOpportunityStageMoveResponse: type: object properties: stage_moves: type: array items: $ref: '#/components/schemas/OpportunityStageMove' next_page_token: type: string ListOpportunityStagesResponse: type: object properties: stages: type: array items: $ref: '#/components/schemas/RestOpportunityStage' next_page_token: type: string ObjectModel: type: object properties: custom_fields: type: array items: $ref: '#/components/schemas/CustomFieldMetaData' optional_properties: type: array description: These fields are not transmitted by default on this model, but can be requested by specifying them in a comma-separated list in the optional_properties query parameter. items: type: string uniqueItems: true OpportunityContact: type: object properties: id: type: string description: Contact ID example: 1001 email: type: string description: Email address example: john.smith@example.com city: type: string description: City example: Chandler state: type: string description: State example: AZ first_name: type: string description: First name example: John last_name: type: string description: Last name example: Smith company_name: type: string description: Company name example: Acme Corp job_title: type: string description: Job title example: Sales Manager phone_number: type: string description: Phone number example: 5551234567 required: - id OpportunityStage: type: object properties: id: type: string description: Stage ID example: 1 name: type: string description: Stage name example: Qualified details: $ref: '#/components/schemas/StageDetails' description: Stage details reasons: type: array description: Stage change reasons items: type: string required: - id OpportunityStageMove: type: object description: Historical record of an opportunity moving from one pipeline stage to another properties: id: type: string description: Unique ID of this stage-move record example: 42 opportunity_id: type: string description: ID of the opportunity that was moved example: 7 move_time: type: string description: Date-time when the move occurred (ISO-8601 UTC) example: 2024-03-15T10:30:00.000+0000 move_from_stage_id: type: string description: ID of the stage moved FROM. 0 = no previous stage (first move) example: 3 move_to_stage_id: type: string description: ID of the stage moved TO example: 5 prev_stage_move_time: type: string description: Date-time of the previous stage-move (ISO-8601 UTC). Null if first move. example: 2024-02-10T08:00:00.000+0000 user_id: type: string description: ID of the user associated with this move example: 1 created_by: type: string description: ID of the user who created this record example: 1 create_time: type: string description: Date-time this record was created (ISO-8601 UTC) example: 2024-03-15T10:30:00.000+0000 RestOpportunityStage: type: object properties: id: type: string description: Stage ID example: 1 name: type: string description: Stage name example: Qualified order: type: integer format: int32 description: Stage order in pipeline example: 2 target_number_days: type: integer format: int32 description: Target days in stage example: 14 probability: type: integer format: int32 description: Win probability (0-100) example: 50 created_time: type: string description: Creation timestamp (ISO-8601) example: '2024-01-10T08:00:00Z' updated_time: type: string description: Last update timestamp (ISO-8601) example: '2024-03-15T10:30:00Z' checklist_items: type: array description: Stage checklist items items: $ref: '#/components/schemas/ChecklistItem' RestV2Opportunity: type: object properties: id: type: string description: Opportunity ID example: 123 contact: $ref: '#/components/schemas/OpportunityContact' stage: $ref: '#/components/schemas/OpportunityStage' user: $ref: '#/components/schemas/RestV2User' opportunity_title: type: string description: Opportunity title example: New Business Deal next_action_time: type: string description: Next action timestamp (ISO-8601) example: '2024-03-20T10:00:00Z' next_action_notes: type: string description: Notes for next action example: Follow up with decision maker opportunity_notes: type: string description: General notes example: High-value prospect from trade show estimated_close_time: type: string description: Estimated close timestamp (ISO-8601) example: '2024-04-15T00:00:00Z' include_in_forecast: type: boolean description: Include in sales forecast example: true projected_revenue_low: type: number format: double description: Low revenue estimate example: 5000.0 projected_revenue_high: type: number format: double description: High revenue estimate example: 10000.0 custom_fields: type: array items: $ref: '#/components/schemas/CustomField' created_time: type: string description: Creation timestamp (ISO-8601) example: '2024-01-10T08:00:00Z' last_updated_time: type: string description: Last update timestamp (ISO-8601) example: '2024-03-15T14:30:00Z' affiliate_id: type: string description: Affiliate ID example: 456 lead_source: type: string description: Lead source example: Web Form monthly_revenue: type: number format: double description: Monthly recurring revenue example: 500.0 order_revenue: type: number format: double description: Order revenue example: 2500.0 objection: type: string description: Objection reason example: Price status: type: string description: Status name example: Active status_id: type: string description: Status ID example: 123 stage_entrance_time: type: string description: Timestamp when the opportunity entered its current stage (ISO-8601) example: '2024-03-20T10:00:00Z' last_updated_by: type: string description: User who last updated the opportunity record example: 945 created_by: type: string description: User who created the opportunity record example: 852 required: - contact - opportunity_title - stage RestV2User: type: object properties: id: type: string description: User ID example: 456 first_name: type: string description: First name example: Jane last_name: type: string description: Last name example: Doe StageDetails: type: object properties: probability: type: integer format: int32 description: Win probability (0-100) example: 50 stage_order: type: integer format: int32 description: Stage order in pipeline example: 2 target_num_days: type: integer format: int32 description: Target days in stage example: 14 checklist_items: type: array description: Stage checklist items items: $ref: '#/components/schemas/CheckListItemDetails' UpdateCustomFieldGroupRequest: type: object properties: name: type: string order: type: integer format: int32 tab_id: type: string UpdateCustomFieldMetaDataRequest: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CustomFieldOption' group_id: type: string required: - group_id UpdateCustomFieldTabRequest: type: object properties: name: type: string order: type: integer format: int32 UpdateOpportunityRequestV2: type: object properties: opportunity_title: type: string description: Opportunity title example: New Business Deal next_action_time: type: string description: Next action timestamp (ISO-8601) example: '2024-03-20T10:00:00Z' next_action_notes: type: string description: Notes for next action example: Schedule demo call opportunity_notes: type: string description: General notes example: Prospect from website inquiry estimated_close_time: type: string description: Estimated close timestamp (ISO-8601) example: '2024-04-15T00:00:00Z' include_in_forecast: type: boolean description: Include in sales forecast example: true projected_revenue_low: type: number format: double description: Low revenue estimate example: 5000.0 projected_revenue_high: type: number format: double description: High revenue estimate example: 10000.0 contact_id: type: string description: Associated contact ID example: 1001 stage_id: type: string description: Pipeline stage ID example: 2 user_id: type: string description: Assigned user ID example: 456 custom_fields: type: array items: $ref: '#/components/schemas/CustomField' affiliate_id: type: string description: Affiliate ID example: 789 UpdateOpportunityStageChecklistItem: type: object properties: id: type: string description: Checklist item ID example: 101 description: type: string description: Item description example: Review contract terms required: type: boolean description: Whether item is required example: true order: type: integer format: int32 description: Display order position example: 1 required: - description - order - required UpdateOpportunityStageRequest: type: object properties: name: type: string example: Qualified order: type: integer format: int32 probability: type: integer format: int32 description: must be an integer between 0 and 100. example: 2 target_number_days: type: integer format: int32 description: Value should be >=0. checklist_items: type: array items: $ref: '#/components/schemas/UpdateOpportunityStageChecklistItem' securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize tokenUrl: https://api.infusionsoft.com/token scopes: {} security: - oauth2: []