openapi: 3.2.0 info: title: rest-api Deal API version: 1.0.0 description: "Refer to our website to know more about [Clari Copilot](https://www.clari.com/products/copilot/).\n\n**To learn how to use the Clari Copilot API, please follow this integration guide (link).**
It explains how you get your API key, gives context on how the endpoints work together, and provides example code.\n\n# Authentication\n\nYou need to pass both API key and password in specified headers to authenticate with Clari Copilot API.\n\nExample curl command fetching users:\n\n
\n \n curl -H \"X-Api-Key:<your_api_key>\" -H \"X-Api-Password:<your_api_password>\" \"https://rest-api.copilot.clari.com/users\"\n \n
\n\nYou'll find API key and secret in workspace settings > integrations > Clari Copilot API\n\n\n\n\n\n# Rate limit\n\nDefault rate limit is 10 per second.\n\nAlso 100k requests per week is also imposed. Week starts every Sunday 0 GMT.\n\n# Example\n\nHere is a python script that demonstrate how to fetch calls and print csv: Calls example\n\nHere is a python script that demonstrate how to use CRM endpoints: CRM example\n\n# Deprecation\n\nThis api's old domain https://rest-api.trywingman.com is deprecated and will be supported till end of 2023 to allow existing clients to migrate.\n" contact: name: Support email: copilot-support@clari.com url: https://api-doc.copilot.clari.com x-logo: url: /logo.png servers: - url: https://rest-api.copilot.clari.com tags: - name: deal description: Deals in CRM paths: /create-deal: post: tags: - deal summary: Create deal description: Creates a data for new deal in Copilot system requestBody: content: application/json: schema: $ref: '#/components/schemas/DealWithoutId' responses: 200: description: 200 response content: application/json: schema: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 500: $ref: '#/components/responses/500' security: - api_key: [] api_password: [] /get-deal: get: tags: - deal summary: Read deal description: Returns details of deal with source id passed as query param parameters: - name: id in: query description: source id of the deal required: true schema: type: string responses: 200: description: 200 response content: application/json: schema: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 404: description: Not found content: application/json: schema: type: object 500: $ref: '#/components/responses/500' security: - api_key: [] api_password: [] /update-deal: put: tags: - deal summary: Update deal description: Update a data for new deal in Copilot system requestBody: content: application/json: schema: $ref: '#/components/schemas/Deal' responses: 200: description: 200 response content: application/json: schema: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 500: $ref: '#/components/responses/500' security: - api_key: [] api_password: [] /delete-deal: delete: tags: - deal summary: Delete deal description: Returns details of last snapshot of the deleted deal requestBody: content: application/json: schema: properties: id: type: string description: source id of deal responses: 200: description: 200 response content: application/json: schema: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 404: description: Not found content: application/json: schema: type: object 500: $ref: '#/components/responses/500' security: - api_key: [] api_password: [] components: schemas: CloseDateChangeHistory: title: Stage change history object type: object properties: close_date: type: string format: date-time prev_close_date: type: string format: date-time date_changed: type: string format: date-time Deal: title: Deal object type: object allOf: - type: object properties: id: description: Id in Copilot system type: string - $ref: '#/components/schemas/DealWithoutId' DealWithoutId: title: Deal object type: object properties: crm_id: description: Id of the deal in the source CRM/system type: string owner_crm_id: description: Id of the deal owner in the source type: string deal_name: description: Name of the deal type: string amount: description: Amount of the deal type: string close_date: description: Close date of the deal type: string format: date-time created_date: description: Creation date of the deal type: string format: date-time last_contacted: description: Last contacted date wrt the deal type: string format: date-time next_call_date: description: Next call date wrt deal type: string format: date-time stage: description: Stage of the deal type: string probability: description: Probability of the deal getting through type: string forecast_category: description: Forecast category for the deal type: string account_crm_id: description: accoundId of the source crm associated with the deal type: string stage_change_history: description: All the phone details of the contact type: array items: $ref: '#/components/schemas/StageChangeHistory' close_date_change_history: description: All the phone details of the contact type: array items: $ref: '#/components/schemas/CloseDateChangeHistory' custom_fields: description: Other relevant customer fields type: array items: $ref: '#/components/schemas/CustomField' deal_reason: description: Reason of the deal type: string CustomField: title: Custom key value field for any document type: object properties: key: type: string value: type: string StageChangeHistory: title: Stage change history object type: object properties: stage: type: string prev_stage: type: string date_changed: type: string format: date-time securitySchemes: api_key: type: apiKey name: X-Api-Key in: header api_password: type: apiKey name: X-Api-Password in: header x-tagGroups: - name: General tags: - call - user - topics - scorecard - name: CRM Objects tags: - contact - account - deal