openapi: 3.1.0 info: title: API Endpoints subpackage_activities subpackage_exports API version: 1.0.0 servers: - url: https://api.close.com/api/v1 tags: - name: subpackage_exports paths: /export/: get: operationId: list summary: List all the exports tags: - subpackage_exports parameters: - name: _limit in: query description: Number of results to return. required: false schema: type: integer default: 100 - name: _skip in: query description: Number of results to skip before returning, for pagination. required: false schema: type: integer default: 0 - name: _fields in: query description: Comma-separated list of fields to include in the response. required: false schema: type: string - name: Authorization in: header description: Use your API key as the username and leave the password empty. required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/exports_list_Response_200' '400': description: Bad request content: application/json: schema: description: Any type '401': description: Unauthorized content: application/json: schema: description: Any type '404': description: Not found content: application/json: schema: description: Any type /export/lead/: post: operationId: create-lead summary: Export leads based on a search query description: "You will receive a link to the generated file via email once the export is done.\n\nThe exported file is GZIP compressed to make your download and our upload faster. The `content-encoding` HTTP header will be set to `gzip` and the `content-type` HTTP header will be set to `text/csv` for CSV exports or `application/json` for JSON exports.\n\nParameters:\n - `s_query/results_limit/sort` (optional) - The [Advanced Filtering API](https://developer.close.com/api/resources/advanced-filtering) parameters used to narrow the exported results down. By default, all leads are exported.\n - `format` - Format of the exported file. The choices are: `csv`, `json`. JSON is recommended for raw backups or data migrations.\n - `type` - Type of the export.\n - `leads` - For CSV exports, it results in one row per lead. For JSON exports, this is the recommended type and is a superset of the other two types.\n - `contacts` - For CSV exports, it results in one row per contact.\n - `lead_opps` - For CSV exports, it results in one row per opportunity.\n - `date_format` (optional) - Controls the format of date objects. Note: this only works with the `csv` format.\n - `original` (default) - A date format that includes microseconds and timezone information.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss.sssss]±[hh]:[mm]`\n - `iso8601` (recommended) - An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compatible date representation that does not include microseconds.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]±[hh]:[mm]`\n - `excel` - An Excel compatible date format. Dates are always in UTC, do not include timezone information or microseconds, and use a 12 hour clock with an AM or PM designation.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss] [AM|PM]`\n - `fields` (optional) - By default we return all the data fields in each export type. If you only need specific fields exported, you can explicitly list them in `fields` to get smaller exports.\n - `include_activities` (optional) - Activities aren't included in any exports by default. If you want all your Activities exported as well, pass `\"include_activities\": true`. Note: this only works for `leads` type with `json` format.\n - `include_smart_fields` (optional) - Smart Fields aren't included in any exports by default. If you want all of them exported as well, pass `\"include_smart_fields\": true`. Note: this only works for `leads` type with `json` format or any type formatted as `csv`. Smart fields are calculated fields, like number of emails on a lead.\n - `send_done_email` - Set to `false` if you don't want to get a confirmation email after the bulk action is done." tags: - subpackage_exports parameters: - name: Authorization in: header description: Use your API key as the username and leave the password empty. required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/exports_createLead_Response_200' '400': description: Bad request content: application/json: schema: description: Any type '401': description: Unauthorized content: application/json: schema: description: Any type '404': description: Not found content: application/json: schema: description: Any type requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateExportFlags' /export/opportunity/: post: operationId: create-opportunity summary: Export opportunities, based on opportunity filters description: "Parameters:\n - `params` (optional) - A dictionary of filters, which would be used for the `/opportunity/` endpoint.\n - `format` - Format of the exported file. The choices are: `csv`, `json`\n - `date_format` (optional) - Controls the format of date objects. Note: this only works with the `csv` format.\n - `original` (default) - A date format that includes microseconds and timezone information.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss.sssss]±[hh]:[mm]`\n - `iso8601` (recommended) - An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compatible date representation that does not include microseconds.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]±[hh]:[mm]`\n - `excel` - An Excel compatible date format. Dates are always in UTC, do not include timezone information or microseconds, and use a 12 hour clock with an AM or PM designation.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss] [AM|PM]`\n - `fields` (optional) - By default we return all the data fields. If you only need specific fields exported, you can explicitly list them in fields to get smaller exports.\n - `send_done_email` - Set to `false` if you don't want to get a confirmation email after the bulk action is done." tags: - subpackage_exports parameters: - name: Authorization in: header description: Use your API key as the username and leave the password empty. required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/exports_createOpportunity_Response_200' '400': description: Bad request content: application/json: schema: description: Any type '401': description: Unauthorized content: application/json: schema: description: Any type '404': description: Not found content: application/json: schema: description: Any type requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateExportFlags' /export/{id}/: get: operationId: get summary: Get a single Export description: "You can get a single export to do things like check its `status` or get a `download_url`\n\n - `status` can have one of these values: `created`, `started`, `in_progress`, `done`, `error`." tags: - subpackage_exports parameters: - name: id in: path required: true schema: type: string - name: _fields in: query description: Comma-separated list of fields to include in the response. required: false schema: type: string - name: Authorization in: header description: Use your API key as the username and leave the password empty. required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/exports_get_Response_200' '400': description: Bad request content: application/json: schema: description: Any type '401': description: Unauthorized content: application/json: schema: description: Any type '404': description: Not found content: application/json: schema: description: Any type components: schemas: exports_get_Response_200: type: object properties: {} description: Empty response body title: exports_get_Response_200 CreateExportFlags: type: object properties: include_activities: type: boolean default: false include_addresses: type: boolean include_custom_objects: type: boolean default: false include_smart_fields: type: boolean default: false title: CreateExportFlags exports_createLead_Response_200: type: object properties: {} description: Empty response body title: exports_createLead_Response_200 exports_list_Response_200: type: object properties: {} description: Empty response body title: exports_list_Response_200 exports_createOpportunity_Response_200: type: object properties: {} description: Empty response body title: exports_createOpportunity_Response_200 securitySchemes: ApiKeyAuth: type: http scheme: basic description: Use your API key as the username and leave the password empty. OAuth2: type: http scheme: bearer