openapi: 3.2.0 info: description: Close CRM REST API title: Close Opportunities API version: 1.0.0 servers: - url: https://api.close.com/api/v1 security: - ApiKeyAuth: [] - OAuth2: [] tags: - name: opportunities externalDocs: url: https://developer.close.com/api/resources/opportunities paths: /opportunity/: get: operationId: opportunities_list tags: - opportunities summary: List or filter opportunities description: "* All opportunity list responses contain the following aggregate values about all the matching objects (regardless of pagination / limits):\n * `total_results`: the total number of objects,\n * `count_by_value_period`: a dictionary containing the number of opportunities by value period, e.g. `{ 'one_time': 2, 'annual': 1, 'monthly': 1 }`,\n * `total_value_one_time`: the sum of the values of all one time opportunities,\n * `total_value_monthly`: the sum of the values of all monthly opportunities,\n * `total_value_annual`: the sum of the values of all annual opportunities,\n * `total_value_annualized`: the sum of the values of all opportunities where monthly opportunity values are multiplied by 12,\n * `expected_value_one_time`: the sum of the values of all one time opportunities multiplied by their confidence,\n * `expected_value_monthly`: the sum of the values of all monthly opportunities multiplied by their confidence,\n * `expected_value_annual`: the sum of the values of all annual opportunities multiplied by their confidence,\n * `expected_value_annualized`: the sum of the values of all opportunities multiplied by their confidence where monthly opportunity values are multiplied by 12,\n* `query` is an optional search query filter. Only opportunity properties may be used in the filter. For example, `note:important` will only show opportunities which contain the text `important` in their note. Or, `status_change(old_status:active new_status:won date:yesterday)` will only show opportunities that transitioned from status `active` to status `won` on the previous day.\n* `_order_by` allows: `date_won`, `date_updated`, `date_created`, `confidence`, `user_name`, `value`, `annualized_value`, `annualized_expected_value` (each of them allows descending order by prepending a minus, e.g. `_order_by=-date_won`).\n* `value_period` allows: `one_time`, `monthly`, `annual`.\n* Multiple values for `user_id`, `status_id`, `status_label`, `status_type` and `value_period` can be specified using the *in* operator, e.g. `status_type__in=active,won`.\n* `_group_by` allows: `user_id`, `date_won__week`, `date_won__month`, `date_won__quarter` `date_won__year` to group results by the given criteria.\n\n When grouping results, the `data` array contains a list of groups instead of objects. A group consists of the following fields:\n * `key` containing a unique group key,\n * `objects` containing the list of objects for the given group,\n * `total_results` containing the number of total objects for the given group,\n * all aggregate values for the given group,\n * if grouping by year: `year`, containing the year for the given group,\n * if grouping by month: `year` and `month`, containing the year and month (1-12) for the given group,\n * if grouping by quarter: `year` and `quarter`, containing the year and quarter (1-4) for the given group,\n * if grouping by week: `weekyear` and `week`, containing the ISO week year and ISO week number for the given group,\n * if grouping by user: `user_id` and `user_name`, containing the user ID and full name of the user for the given group.\n\n Note that pagination still applies to objects and not groups. The last or first group may be cut off during pagination, therefore `total_results` may not match the length of `objects`. When paginating, the `key` value may be used to combine groups across multiple pages. Sorting using `_order_by` may be applied and sorts the items within each of the groups. Group order can be reversed by prepending a minus. For example, `_group_by=-date_won__week` will show the most recent weeks first. When grouping by `user_id`, results are ordered by the user's full name.\n* `lead_saved_search_id` is an optional lead Smart View filter.\n* (deprecated) `lead_query` is an optional lead search text-based query filter. This parameter is now deprecated in favor of using the `lead_saved_search_id` Smart View ID parameter." parameters: - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/SkipParam' - $ref: '#/components/parameters/FieldsParam' - in: query name: lead_id required: false schema: title: Lead ID default: null anyOf: - type: string - type: 'null' - $ref: '#/components/parameters/ActivityFilters_OrganizationIdParam' - in: query name: user_id required: false schema: title: User ID default: null anyOf: - type: string - type: 'null' - in: query name: user_id__in required: false schema: title: User ID (In) default: null anyOf: - type: string - type: 'null' - in: query name: status_id required: false schema: title: Status ID default: null anyOf: - type: string - type: 'null' - in: query name: status_id__in required: false schema: title: Status ID (In) default: null anyOf: - type: string - type: 'null' - in: query name: status_type required: false schema: title: Status Type default: null anyOf: - type: string - type: 'null' - in: query name: status_type__in required: false schema: title: Status Type (In) default: null anyOf: - type: string - type: 'null' - in: query name: status_label required: false schema: title: Status Label default: null anyOf: - type: string - type: 'null' - in: query name: status_label__in required: false schema: title: Status Label (In) default: null anyOf: - type: string - type: 'null' - in: query name: status required: false schema: title: Status default: null anyOf: - type: string - type: 'null' - in: query name: status__in required: false schema: title: Status (In) default: null anyOf: - type: string - type: 'null' - in: query name: date_won required: false schema: title: Date Won default: null anyOf: - type: string - type: 'null' - in: query name: date_won__gte required: false schema: title: Date Won (>=) default: null anyOf: - type: string - type: 'null' - in: query name: date_won__gt required: false schema: title: Date Won (>) default: null anyOf: - type: string - type: 'null' - in: query name: date_won__lte required: false schema: title: Date Won (<=) default: null anyOf: - type: string - type: 'null' - in: query name: date_won__lt required: false schema: title: Date Won (<) default: null anyOf: - type: string - type: 'null' - in: query name: date_created required: false schema: title: Date Created default: null anyOf: - type: string - type: 'null' - in: query name: date_created__gte required: false schema: title: Date Created (>=) default: null anyOf: - type: string - type: 'null' - in: query name: date_created__gt required: false schema: title: Date Created (>) default: null anyOf: - type: string - type: 'null' - in: query name: date_created__lte required: false schema: title: Date Created (<=) default: null anyOf: - type: string - type: 'null' - in: query name: date_created__lt required: false schema: title: Date Created (<) default: null anyOf: - type: string - type: 'null' - in: query name: date_updated required: false schema: title: Date Updated default: null anyOf: - type: string - type: 'null' - in: query name: date_updated__gte required: false schema: title: Date Updated (>=) default: null anyOf: - type: string - type: 'null' - in: query name: date_updated__gt required: false schema: title: Date Updated (>) default: null anyOf: - type: string - type: 'null' - in: query name: date_updated__lte required: false schema: title: Date Updated (<=) default: null anyOf: - type: string - type: 'null' - in: query name: date_updated__lt required: false schema: title: Date Updated (<) default: null anyOf: - type: string - type: 'null' - in: query name: value_period required: false schema: title: Value Period default: null anyOf: - type: string - type: 'null' - in: query name: value_period__in required: false schema: title: Value Period (In) default: null anyOf: - type: string - type: 'null' - in: query name: query required: false schema: title: Query default: null anyOf: - type: string - type: 'null' - in: query name: lead_query required: false schema: title: Lead Query default: null anyOf: - type: string - type: 'null' - in: query name: lead_saved_search_id required: false schema: title: Lead Saved Search ID default: null anyOf: - type: string - type: 'null' - in: query name: is_stalled required: false schema: title: Is Stalled default: null anyOf: - type: string - type: 'null' - in: query name: _order_by required: false schema: title: Order By default: null anyOf: - type: string - type: 'null' - in: query name: _group_by required: false schema: title: Group By default: null anyOf: - type: string - type: 'null' responses: '200': content: application/json: example: count_by_value_period: annual: 1 monthly: 1 one_time: 1 data: - annualized_expected_value: 225000 annualized_value: 300000 confidence: 75 contact_id: null created_by: null date_created: '2013-02-01T00:54:51.321000+00:00' date_lost: null date_updated: '2013-02-01T00:54:51.321000+00:00' date_won: null expected_value: 225000 id: oppo_KXyJj2PT74U1wOPvhBDO37jCC89mmrnoW0DylcDDWrL lead_id: lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp lead_name: Bluth Company (Sample Lead) note: Gob's ready to buy a $3,000 suit. note_html:
Gob's ready to buy a $3,000 suit.
organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf pipeline_name: Sales status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk status_label: Active status_type: active updated_by: null user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_name: John Doe value: 300000 value_currency: USD value_formatted: $3,000 value_period: one_time - annualized_expected_value: 37500 annualized_value: 50000 confidence: 75 contact_id: null created_by: null date_created: '2013-02-01T00:54:51.337000+00:00' date_lost: null date_updated: '2013-02-01T00:54:51.337000+00:00' date_won: null expected_value: 37500 id: oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O lead_name: Wayne Enterprises (Sample Lead) note: Bruce needs new software for the Bat Cave. note_html:Bruce needs new software for the Bat Cave.
organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf pipeline_name: Sales status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk status_label: Active status_type: active updated_by: null user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_name: John Doe value: 50000 value_currency: USD value_formatted: $500 value_period: annual - annualized_expected_value: 30000 annualized_value: 60000 confidence: 50 contact_id: null created_by: null custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj: https://www.example.com/contract.pdf date_created: '2013-02-01T00:54:51.337000+00:00' date_lost: null date_updated: '2013-02-01T00:54:51.337000+00:00' date_won: null expected_value: 2500 id: oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O lead_name: Wayne Enterprises (Sample Lead) note: Bat Cave monthly maintenance cost note_html:Bat Cave monthly maintenance cost
organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf pipeline_name: Sales status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk status_label: Active status_type: active updated_by: null user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_name: John Doe value: 5000 value_currency: USD value_formatted: $50 monthly value_period: monthly expected_value_annual: 37500 expected_value_annual_formatted: $375 expected_value_annualized: 292500 expected_value_annualized_formatted: $2,925 expected_value_monthly: 2500 expected_value_monthly_formatted: $25 expected_value_one_time: 225000 expected_value_one_time_formatted: $2,250 has_more: false total_results: 3 total_value_annual: 50000 total_value_annual_formatted: $500 total_value_annualized: 410000 total_value_annualized_formatted: $4,100 total_value_monthly: 5000 total_value_monthly_formatted: $50 total_value_one_time: 300000 total_value_one_time_formatted: $3,000 schema: type: object properties: data: items: $ref: '#/components/schemas/Opportunity' type: array has_more: type: boolean required: - data - has_more description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found post: operationId: opportunities_create tags: - opportunities summary: Create an opportunity description: 'Create an opportunity, optionally linked to an existing lead. **custom.FIELD_ID** (optional): Set custom fields by setting `custom.FIELD_ID` to the field value, where FIELD_ID is the ID of the custom field, e.g.: ```json { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": "value", "custom.cf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F": "other value" } ``` If a custom field has `accepts_multiple_values: true`, the entire value will be replaced. For example, given an Opportunity has a Custom Choice Field with value `["A", "B"]`, adding choice `"C"` would mean setting the value to `["A", "B", "C"]`. Note that using the `custom` field dict or the `custom.FIELD_NAME` syntax (instead of custom field IDs) is deprecated and will be removed from the API. See [Custom Fields](https://developer.close.com/api/resources/custom-fields) for more details.' requestBody: content: application/json: example: confidence: 90 custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj: https://www.example.com/contract.pdf lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O note_html:i hope this deal closes...
status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk value: 500 value_period: monthly schema: $ref: '#/components/schemas/CreateOpportunity' required: true responses: '200': content: application/json: example: annualized_expected_value: 540000 annualized_value: 600000 confidence: 90 contact_id: null created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj: https://www.example.com/contract.pdf date_created: '2013-02-20T10:11:50.520000+00:00' date_lost: null date_updated: '2013-02-20T10:11:50.520000+00:00' date_won: null expected_value: 45000 id: oppo_bJoqD4QX21AfA2fAGX5HmPQ1EgGoWBannvLj4khIfPH lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O lead_name: Wayne Enterprises (Sample Lead) note: i hope this deal closes... note_html:i hope this deal closes...
organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf pipeline_name: Sales status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk status_label: Active status_type: active updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_name: Anthony Nemitz value: 50000 value_currency: USD value_formatted: $50 monthly value_period: monthly schema: $ref: '#/components/schemas/Opportunity' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found /opportunity/{id}/: get: operationId: opportunities_get tags: - opportunities summary: Retrieve an opportunity parameters: - in: path name: id required: true schema: type: string - $ref: '#/components/parameters/FieldsParam' responses: '200': content: application/json: example: annualized_expected_value: 37500 annualized_value: 50000 confidence: 75 contact_id: null created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj: https://www.example.com/contract.pdf date_created: '2013-02-01T00:54:51.337000+00:00' date_lost: null date_updated: '2013-02-01T00:54:51.337000+00:00' date_won: null expected_value: 37500 id: oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O lead_name: Wayne Enterprises (Sample Lead) note: Bruce needs new software for the Bat Cave. note_html:Bruce needs new software for the Bat Cave.
organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf pipeline_name: Sales status_id: stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk status_label: Active status_type: active updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_name: John Doe value: 50000 value_currency: USD value_formatted: $500 value_period: one_time schema: $ref: '#/components/schemas/Opportunity' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found put: operationId: opportunities_update tags: - opportunities summary: Update an opportunity description: '**custom.FIELD_ID** (optional) - See description for `custom.FIELD_ID` in `POST /opportunity/` above. - Additionally, you can unset a single field by using `{ "custom.FIELD_ID": null }`, e.g.: ``` { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": null } ``` If you''re trying to update a custom field and that custom field accepts multiple values, you can also specify `.add` or `.remove` as part of the field key to add/remove a single value to/from a list of values, e.g.: ``` { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" } ```' parameters: - in: path name: id required: true schema: type: string requestBody: content: application/json: example: status_id: stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk schema: $ref: '#/components/schemas/UpdateOpportunity' required: true responses: '200': content: application/json: example: annualized_expected_value: 37500 annualized_value: 50000 confidence: 75 contact_id: null created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA date_created: '2013-02-01T00:54:51.337000+00:00' date_lost: null date_updated: '2013-02-20T10:06:25.248000+00:00' date_won: '2013-02-20' expected_value: 37500 id: oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt lead_id: lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O lead_name: Wayne Enterprises (Sample Lead) note: Bruce needs new software for the Bat Cave. note_html:Bruce needs new software for the Bat Cave.
organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH pipeline_id: pipe_04fC628PVB0HjK2Qq5EqEf pipeline_name: Sales status_id: stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk status_label: Won status_type: won updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_id: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA user_name: John Doe value: 50000 value_currency: USD value_formatted: $500 value_period: one_time schema: $ref: '#/components/schemas/Opportunity' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found delete: operationId: opportunities_delete tags: - opportunities summary: Delete an opportunity parameters: - in: path name: id required: true schema: type: string responses: '200': description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found components: schemas: StalledOpportunityActionTypeV1: title: StalledOpportunityActionTypeV1 type: string enum: - mark_as_lost - change_status - follow_up - adjust_close_date - ask_someone_else_to_reach_out - change_communication_method Opportunity: title: Opportunity type: object properties: annualized_expected_value: title: Annualized Expected Value anyOf: - type: integer - type: 'null' annualized_value: title: Annualized Value anyOf: - type: integer - type: 'null' attachments: title: Attachments type: array items: $ref: '#/components/schemas/Attachment' comment_summary: title: Comment Summary anyOf: - $ref: '#/components/schemas/CommentSummary' - type: 'null' confidence: title: Confidence type: integer contact_id: title: Contact ID anyOf: - type: string - type: 'null' contact_name: title: Contact Name anyOf: - type: string - type: 'null' created_by: title: Created By anyOf: - type: string - type: 'null' created_by_name: title: Created By Name anyOf: - type: string - type: 'null' date_created: title: Date Created type: string format: date-time date_lost: title: Date Lost anyOf: - type: string format: date-time - type: 'null' date_updated: title: Date Updated type: string format: date-time date_won: title: Date Won anyOf: - type: string format: date - type: 'null' expected_value: title: Expected Value anyOf: - type: integer - type: 'null' id: title: ID type: string integration_links: title: Integration Links type: array items: $ref: '#/components/schemas/RenderedIntegrationLink' is_stalled: title: Is Stalled type: boolean lead_id: title: Lead ID type: string lead_name: title: Lead Name anyOf: - type: string - type: 'null' lead_primary_email: title: Lead Primary Email anyOf: - $ref: '#/components/schemas/ContactEmail' - type: 'null' lead_primary_phone: title: Lead Primary Phone anyOf: - type: array items: $ref: '#/components/schemas/ContactPhone' - type: 'null' note: title: Note anyOf: - type: string - type: 'null' note_html: title: Note Html anyOf: - type: string - type: 'null' organization_id: title: Organization ID type: string pipeline_id: title: Pipeline ID anyOf: - type: string - type: 'null' pipeline_name: title: Pipeline Name anyOf: - type: string - type: 'null' stall_status: title: Stall Status anyOf: - $ref: '#/components/schemas/StalledOpportunityActionItems' - type: 'null' status_display_name: title: Status Display Name type: string status_id: title: Status ID type: string status_label: title: Status Label type: string status_type: title: Status Type $ref: '#/components/schemas/OpportunityStatusType' suggested_action: title: Suggested Action anyOf: - $ref: '#/components/schemas/OpportunitySuggestedAction' - type: 'null' updated_by: title: Updated By anyOf: - type: string - type: 'null' updated_by_name: title: Updated By Name anyOf: - type: string - type: 'null' user_id: title: User ID type: string user_name: title: User Name anyOf: - type: string - type: 'null' value: title: Value anyOf: - type: integer - type: 'null' value_currency: title: Value Currency anyOf: - type: string - type: 'null' value_formatted: title: Value Formatted anyOf: - type: string - type: 'null' value_period: $ref: '#/components/schemas/OpportunityValuePeriod' required: - annualized_expected_value - annualized_value - confidence - contact_id - created_by - date_created - date_lost - date_updated - date_won - expected_value - id - lead_id - note - note_html - organization_id - status_id - updated_by - user_id - value - value_period OpportunityStatusType: title: OpportunityStatusType type: string enum: - won - lost - active OpportunityFollowUpCallActionDetails: title: OpportunityFollowUpCallActionDetails type: object properties: call_plan: title: Call Plan type: string contact_id: title: Contact ID type: string required: - call_plan - contact_id CommentSummary: title: CommentSummary type: object properties: comment_count: title: Comment Count type: integer thread_id: title: Thread ID type: string required: - comment_count - thread_id UpdateOpportunity: title: UpdateOpportunity type: object properties: attachments: title: Attachments type: array items: $ref: '#/components/schemas/AttachmentIn' confidence: title: Confidence type: integer contact_id: title: Contact ID anyOf: - type: string - type: 'null' date_won: title: Date Won description: If not set on the resource or in the request, `date_won` will be set automatically to today's date when setting `status_id` to a status with type `won`. The `x-tz-offset` header, used to pass your timezone's UTC offset, will be taken into account. anyOf: - type: string format: date-time - type: 'null' note: title: Note description: Plaintext/markdown version of the note. If `note_html` is also provided in the same request, this value is ignored and `note` is derived from the HTML instead. type: string note_html: title: Note HTML description: Rich-text HTML version of the note. When set, `note` is automatically populated with the plaintext version (tags become markdown), overriding any `note` value passed in the same request. Pass `null` to clear `note_html`; `note` is cleared as well. anyOf: - type: string - type: 'null' status: title: Status type: string status_id: title: Status ID description: Setting the `status_id` to a status with a type of `won` will automatically set the `date_won` field if it is not already set or provided in the request. Reverting it from a `won` status to an `active` or `lost` will not automatically change `date_won`. type: string user_id: title: User ID anyOf: - type: string - type: 'null' value: title: Value type: integer value_period: title: Value Period $ref: '#/components/schemas/OpportunityValuePeriod' additionalProperties: false patternProperties: ^custom\.: not: type: object StalledOpportunityActionItems: title: StalledOpportunityActionItems deprecated: true type: object properties: communication_issue: description: The communication issue that is causing the stalled opportunity. If there is no issue, set to NoIssue. $ref: '#/components/schemas/StalledOpportunityCommunicationIssue' next_action: description: An action item recommended to progress or resolve the stalled opportunity. $ref: '#/components/schemas/ActionItem' required: - communication_issue - next_action ActionItem: title: ActionItem deprecated: true type: object properties: action: description: The recommended next step to progress or resolve the stalled opportunity $ref: '#/components/schemas/StalledOpportunityActionTypeV1' justification: title: Justification description: A short justification for the recommended action in the sales pipeline. Maximum 2 sentences. type: string required: - action - justification CreateOpportunity: title: CreateOpportunity type: object properties: attachments: title: Attachments default: null anyOf: - type: array items: $ref: '#/components/schemas/AttachmentIn' - type: 'null' confidence: title: Confidence default: null anyOf: - type: integer - type: 'null' contact_id: title: Contact ID default: null anyOf: - type: string - type: 'null' created_by: title: Created By default: null anyOf: - type: string - type: 'null' date_created: title: Date Created default: null anyOf: - type: string format: date-time - type: 'null' date_won: title: Date Won description: If not set on the resource or in the request, `date_won` will be set automatically to today's date when setting `status_id` to a status with type `won`. The `x-tz-offset` header, used to pass your timezone's UTC offset, will be taken into account. default: null anyOf: - type: string format: date-time - type: 'null' lead_id: title: Lead ID description: Opportunities belong to exactly one Lead. If not provided, a new lead will be created (appearing as "Untitled" in the UI). default: null anyOf: - type: string - type: 'null' note: title: Note description: Plaintext/markdown version of the note. If `note_html` is also provided in the same request, this value is ignored and `note` is derived from the HTML instead. default: null anyOf: - type: string - type: 'null' note_html: title: Note HTML description: Rich-text HTML version of the note. When set, `note` is automatically populated with the plaintext version (tags become markdown), overriding any `note` value passed in the same request. default: null anyOf: - type: string - type: 'null' pipeline_id: title: Pipeline ID description: Specify which pipeline this opportunity should belong to. When supplied without `status_id`, the opportunity will be created with the first available status of that pipeline. When supplied with `status_id`, the status must belong to the specified pipeline or a 400 error will be returned. If the pipeline does not exist, a 400 error will be returned. See the [Pipelines API](https://developer.close.com/api/resources/pipelines). default: null anyOf: - type: string - type: 'null' status_id: title: Status ID description: Post a `status_id` to create an opportunity with a specific status. If omitted, the organization's default (first) status will be used (or the first status of the `pipeline_id` if provided). See the [Opportunity Status API](https://developer.close.com/api/resources/opportunity-statuses). default: null anyOf: - type: string - type: 'null' user_id: title: User ID default: null anyOf: - type: string - type: 'null' value: title: Value default: null anyOf: - type: integer - type: 'null' value_period: default: null anyOf: - $ref: '#/components/schemas/OpportunityValuePeriod' - type: 'null' additionalProperties: false patternProperties: ^custom\.: not: type: object AttachmentIn: title: AttachmentIn type: object properties: content_type: title: Content Type type: string default: '' filename: title: Filename type: string url: title: Url type: string required: - filename - url StalledOpportunityActionTypeV2: title: StalledOpportunityActionTypeV2 type: string enum: - change_status - adjust_close_date - follow_up_email - follow_up_call - follow_up_sms ContactEmail: title: ContactEmail type: object properties: email: title: Email type: string is_unsubscribed: title: Is Unsubscribed type: boolean type: title: Type type: string required: - email - is_unsubscribed - type OpportunityAdjustCloseDateActionDetails: title: OpportunityAdjustCloseDateActionDetails type: object properties: close_date: title: Close Date type: string format: date required: - close_date OpportunityFollowUpEmailActionDetails: title: OpportunityFollowUpEmailActionDetails type: object properties: contact_id: title: Contact ID type: string message_draft: title: Message Draft type: string subject_draft: title: Subject Draft type: string required: - contact_id - message_draft - subject_draft RenderedIntegrationLink: title: RenderedIntegrationLink type: object properties: name: title: Name type: string url: title: Url type: string required: - name - url ContactPhone: title: ContactPhone type: object properties: country: title: Country anyOf: - type: string - type: 'null' outbound_sms_blocked: title: Outbound SMS Blocked type: boolean phone: title: Phone type: string phone_formatted: title: Phone Formatted type: string type: title: Type type: string tz_ids: title: TZ IDs type: array items: type: string required: - phone - type OpportunityValuePeriod: title: OpportunityValuePeriod type: string enum: - one_time - monthly - annual StalledOpportunityCommunicationIssue: title: StalledOpportunityCommunicationIssue type: string enum: - no_issue - cant_get_in_touch - no_communication_attempts OpportunityChangeStatusActionDetails: title: OpportunityChangeStatusActionDetails type: object properties: status_id: title: Status ID type: string required: - status_id OpportunitySuggestedAction: title: OpportunitySuggestedAction type: object properties: action: $ref: '#/components/schemas/StalledOpportunityActionTypeV2' details: title: Details anyOf: - $ref: '#/components/schemas/OpportunityChangeStatusActionDetails' - $ref: '#/components/schemas/OpportunityFollowUpEmailActionDetails' - $ref: '#/components/schemas/OpportunityFollowUpSMSActionDetails' - $ref: '#/components/schemas/OpportunityFollowUpCallActionDetails' - $ref: '#/components/schemas/OpportunityAdjustCloseDateActionDetails' - type: 'null' justification: title: Justification type: string required: - action - details - justification OpportunityFollowUpSMSActionDetails: title: OpportunityFollowUpSMSActionDetails type: object properties: contact_id: title: Contact ID type: string message_draft: title: Message Draft type: string required: - contact_id - message_draft Attachment: title: Attachment type: object properties: content_type: title: Content Type anyOf: - type: string - type: 'null' filename: title: Filename anyOf: - type: string - type: 'null' size: title: Size anyOf: - type: integer - type: 'null' thumbnail_url: title: Thumbnail URL anyOf: - type: string - type: 'null' url: title: URL type: string required: - content_type - filename - size - url parameters: ActivityFilters_OrganizationIdParam: in: query name: organization_id required: false schema: title: Organization ID default: null anyOf: - type: string - type: 'null' LimitParam: description: Number of results to return. in: query name: _limit required: false schema: default: 100 type: integer SkipParam: description: Number of results to skip before returning, for pagination. in: query name: _skip required: false schema: default: 0 type: integer FieldsParam: description: Comma-separated list of fields to include in the response. in: query name: _fields required: false schema: type: string securitySchemes: ApiKeyAuth: description: Use your API key as the username and leave the password empty. scheme: basic type: http OAuth2: flows: authorizationCode: authorizationUrl: https://app.close.com/oauth2/authorize/ scopes: all.full_access: Full access to all resources offline_access: Request a refresh token tokenUrl: https://api.close.com/oauth2/token/ type: oauth2