openapi: 3.2.0 info: description: Close CRM REST API title: Close Bulk Actions.email API version: 1.0.0 servers: - url: https://api.close.com/api/v1 security: - ApiKeyAuth: [] - OAuth2: [] tags: - name: bulk_actions.email externalDocs: url: https://developer.close.com/api/resources/bulk-actions paths: /bulk_action/email/: get: operationId: bulk_actions.email_list tags: - bulk_actions.email summary: List bulk emails parameters: - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/SkipParam' - $ref: '#/components/parameters/FieldsParam' - in: query name: template_id required: false schema: title: Template ID default: null anyOf: - type: string - type: 'null' responses: '200': content: application/json: example: data: - contact_preference: lead created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA date_created: '2013-12-05T18:34:41.753000+00:00' date_updated: '2013-12-05T19:33:29.357000+00:00' email_account_id: emailacct_qwSIFLEjbJXBJOGb0KsqSvnxX5P9DTXUMnb6mFBLxNt id: bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy n_leads: 824 n_leads_processed: 523 n_objects: 824 n_objects_processed: 523 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 sender: sender@example.com sort: [] status: processing template_id: tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA has_more: false schema: type: object properties: data: items: $ref: '#/components/schemas/BulkEmailAction' 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.email_create tags: - bulk_actions.email summary: Initiate a new bulk email description: '`contact_preference` can be set to `lead` (only email the primary/first contact email of the lead) or `contact` (email the first contact email of each contact of the lead).' requestBody: content: application/json: example: contact_preference: lead 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: - direction: desc field: field_name: date_created object_type: lead type: regular_field template_id: tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn required: true responses: '200': content: application/json: example: contact_preference: lead created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA date_created: '2013-12-05T18:34:41.753000+00:00' date_updated: '2013-12-05T19:33:29.357000+00:00' email_account_id: emailacct_qwSIFLEjbJXBJOGb0KsqSvnxX5P9DTXUMnb6mFBLxNt id: bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy 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: false sender: sender@example.com sort: - direction: desc field: field_name: date_created object_type: lead type: regular_field status: created template_id: tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA schema: $ref: '#/components/schemas/BulkEmailAction' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found /bulk_action/email/{id}/: get: operationId: bulk_actions.email_get tags: - bulk_actions.email summary: Fetch a single bulk email object parameters: - in: path name: id required: true schema: type: string - $ref: '#/components/parameters/FieldsParam' responses: '200': content: application/json: example: contact_preference: lead created_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA date_created: '2013-12-05T18:34:41.753000+00:00' date_updated: '2013-12-05T19:33:29.357000+00:00' email_account_id: emailacct_qwSIFLEjbJXBJOGb0KsqSvnxX5P9DTXUMnb6mFBLxNt id: bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy n_leads: 824 n_leads_processed: 523 n_objects: 824 n_objects_processed: 523 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 sender: sender@example.com sort: [] status: processing template_id: tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn updated_by: user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA schema: $ref: '#/components/schemas/BulkEmailAction' 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 BulkEmailAction: title: BulkEmailAction type: object properties: contact_preference: anyOf: - $ref: '#/components/schemas/BulkEmailContactPreference' - type: 'null' created_by: title: Created By 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' email_account_id: title: Email Account ID anyOf: - type: string - type: 'null' id: title: ID type: string 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 sender: title: Sender anyOf: - type: string - type: 'null' sort: title: Sort type: array items: type: object additionalProperties: true status: anyOf: - $ref: '#/components/schemas/BulkActionStatus' - type: 'null' template_id: title: Template ID anyOf: - type: string - type: 'null' updated_by: title: Updated By anyOf: - type: string - type: 'null' required: - contact_preference - created_by - date_created - date_updated - email_account_id - id - n_leads - n_leads_processed - n_objects - n_objects_processed - organization_id - query - results_limit - s_query - send_done_email - sender - sort - status - template_id - updated_by BulkEmailContactPreference: title: BulkEmailContactPreference type: string enum: - lead - contact - all 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