openapi: 3.2.0 info: description: Close CRM REST API title: Close Bulk Actions.edit API version: 1.0.0 servers: - url: https://api.close.com/api/v1 security: - ApiKeyAuth: [] - OAuth2: [] tags: - name: bulk_actions.edit externalDocs: url: https://developer.close.com/api/resources/bulk-actions paths: /bulk_action/edit/: get: operationId: bulk_actions.edit_list tags: - bulk_actions.edit summary: List bulk edits parameters: - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/SkipParam' - $ref: '#/components/parameters/FieldsParam' responses: '200': content: application/json: example: data: - created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA custom_field_name: null custom_field_value: null date_created: '2015-03-16T00:19:50.141000+00:00' date_updated: '2015-03-16T00:20:09.442000+00:00' id: bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET lead_status_id: stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8 n_leads: 100 n_leads_processed: 100 n_objects: 100 n_objects_processed: 100 organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH query: lead_status:Potential results_limit: null s_query: queries: - object_type: lead type: object_type - condition: mode: full_words type: text value: ACME Inc. field: field_name: name object_type: lead type: regular_field type: field_condition type: and send_done_email: false sort: [] status: done type: set_lead_status updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA has_more: false schema: type: object properties: data: items: $ref: '#/components/schemas/BulkEditAction' 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: bulk_actions.edit_create tags: - bulk_actions.edit summary: Initiate a new bulk edit description: "Pass additional parameters depending on which `type` is passed:\n\n - `set_lead_status` will set the Lead Status on all leads. It expects:\n - `lead_status_id` - ID of the Lead Status to use.\n - `clear_custom_field` will clear/remove/unset a specific custom field from all leads. It expects:\n - `custom_field_id` or `custom_field_name` - ID or exact name of the custom field to remove.\n - `set_custom_field` will set/update/add a specific custom field on all leads. It expects:\n - `custom_field_id` or `custom_field_name` - ID or exact name of the custom field to set/update.\n - `custom_field_value` - New value. Use `custom_field_values` to pass multiple values to custom fields that support it.\n - `custom_field_operation` - `replace`, `add`, or `remove` (defaults to `replace`). Only applicable for custom fields that accept multiple values.\n\nUse `\"send_done_email\": false` if you don't want to get a confirmation email after the bulk action is done." requestBody: content: application/json: example: lead_status_id: stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8 results_limit: null s_query: queries: - object_type: lead type: object_type - condition: mode: full_words type: text value: ACME Inc. field: field_name: name object_type: lead type: regular_field type: field_condition type: and sort: - direction: desc field: field_name: date_created object_type: lead type: regular_field type: set_lead_status required: true responses: '200': content: application/json: example: created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA custom_field_name: null custom_field_value: null date_created: '2015-03-16T00:19:50.141000+00:00' date_updated: '2015-03-16T00:20:09.442000+00:00' id: bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET lead_status_id: stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8 n_leads: null n_leads_processed: 0 n_objects: null n_objects_processed: 0 organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH query: lead_status:Potential results_limit: null s_query: queries: - object_type: lead type: object_type - condition: mode: full_words type: text value: ACME Inc. field: field_name: name object_type: lead type: regular_field type: field_condition type: and send_done_email: true sort: - direction: desc field: field_name: date_created object_type: lead type: regular_field status: created type: set_lead_status updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA schema: $ref: '#/components/schemas/BulkEditAction' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found /bulk_action/edit/{id}/: get: operationId: bulk_actions.edit_get tags: - bulk_actions.edit summary: Fetch a single bulk edit object parameters: - in: path name: id required: true schema: type: string - $ref: '#/components/parameters/FieldsParam' responses: '200': content: application/json: example: created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA custom_field_name: null custom_field_value: null date_created: '2015-03-16T00:19:50.141000+00:00' date_updated: '2015-03-16T00:20:09.442000+00:00' id: bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET lead_status_id: stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8 n_leads: 100 n_leads_processed: 100 n_objects: 100 n_objects_processed: 100 organization_id: orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH query: lead_status:Potential results_limit: null s_query: queries: - object_type: lead type: object_type - condition: mode: full_words type: text value: ACME Inc. field: field_name: name object_type: lead type: regular_field type: field_condition type: and send_done_email: false sort: [] status: done type: set_lead_status updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA schema: $ref: '#/components/schemas/BulkEditAction' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found components: schemas: BulkActionStatus: title: BulkActionStatus type: string enum: - created - loading - processing - done - paused - resuming - error BulkEditActionType: title: BulkEditActionType type: string enum: - set_custom_field - clear_custom_field - set_lead_status - set_contact_custom_field - clear_contact_custom_field - set_activity_custom_field - clear_activity_custom_field - set_global_custom_field - clear_global_custom_field - set_opportunity_custom_field - clear_opportunity_custom_field - set_custom_object_custom_field - clear_custom_object_custom_field BulkEditAction: title: BulkEditAction type: object properties: created_by: title: Created By anyOf: - type: string - type: 'null' custom_field_name: title: Custom Field Name anyOf: - type: string - type: 'null' custom_field_value: title: Custom Field Value anyOf: - type: string - type: 'null' date_created: title: Date Created anyOf: - type: string format: date-time - type: 'null' date_updated: title: Date Updated anyOf: - type: string format: date-time - type: 'null' id: title: ID type: string lead_status_id: title: Lead Status ID anyOf: - type: string - type: 'null' n_leads: title: N Leads anyOf: - type: integer - type: 'null' n_leads_processed: title: N Leads Processed type: integer n_objects: title: N Objects anyOf: - type: integer - type: 'null' n_objects_processed: title: N Objects Processed type: integer organization_id: title: Organization ID type: string query: title: Query anyOf: - type: string - type: 'null' results_limit: title: Results Limit anyOf: - type: integer - type: 'null' s_query: title: S Query type: object additionalProperties: true send_done_email: title: Send Done Email type: boolean sort: title: Sort type: array items: type: object additionalProperties: true status: anyOf: - $ref: '#/components/schemas/BulkActionStatus' - type: 'null' type: $ref: '#/components/schemas/BulkEditActionType' updated_by: title: Updated By anyOf: - type: string - type: 'null' required: - created_by - custom_field_name - custom_field_value - date_created - date_updated - id - lead_status_id - n_leads - n_leads_processed - n_objects - n_objects_processed - organization_id - query - results_limit - s_query - send_done_email - sort - status - type - updated_by parameters: FieldsParam: description: Comma-separated list of fields to include in the response. in: query name: _fields required: false schema: type: string 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 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