openapi: 3.1.0 info: title: API Endpoints subpackage_activities subpackage_comments API version: 1.0.0 servers: - url: https://api.close.com/api/v1 tags: - name: subpackage_comments paths: /comment/: get: operationId: list summary: Fetch multiple comments description: Comments may be fetched by `object_id` (the object that was commented on) or by `thread_id`. Exactly one of those filters must be provided. tags: - subpackage_comments parameters: - name: thread_id in: query required: false schema: type: - string - 'null' - name: object_id in: query required: false schema: type: - string - 'null' - 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/comments_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 post: operationId: create summary: Create a Comment description: Create a comment on an object. If a comment thread already exists on that object, a new comment is added to the existing thread. If no thread exists yet, one is created automatically. tags: - subpackage_comments parameters: - name: Authorization in: header description: Use your API key as the username and leave the password empty. required: true schema: type: string responses: '201': description: Successful response content: application/json: schema: $ref: '#/components/schemas/comments_create_Response_201' '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/CreateComment' /comment/{id}/: get: operationId: get summary: Fetch an individual comment tags: - subpackage_comments parameters: - name: id in: path required: true 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/comments_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 put: operationId: update summary: Update a Comment description: You can use this endpoint to edit a comment body. Note that users may only update their own comments. tags: - subpackage_comments parameters: - name: id in: path required: true 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/comments_update_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/UpdateCommentThreads' delete: operationId: delete summary: Remove a comment description: 'Note that contrary to the HTTP verb, this does not necessarily _delete_ a comment (but it will _remove_ it). Comments bodies are removed, but the comment object still exists until all comments in a thread are removed (at which point the entire thread is deleted). Permissions around removing comments inherit from the users permission to delete their own or other users'' activities.' tags: - subpackage_comments parameters: - name: id in: path required: true 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: '204': description: No content content: application/json: schema: type: object properties: {} '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 /comment_thread/: get: operationId: list-threads summary: Fetch multiple comment threads tags: - subpackage_comments 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: ids in: query required: false schema: type: - array - 'null' items: type: string - name: object_ids in: query required: false schema: type: - array - 'null' items: 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/comments_listThreads_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 /comment_thread/{id}/: get: operationId: get-thread summary: Fetch an individual comment thread tags: - subpackage_comments parameters: - name: id in: path required: true 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/comments_getThread_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: UpdateCommentThreads: type: object properties: body: type: string required: - body title: UpdateCommentThreads comments_create_Response_201: type: object properties: {} description: Empty response body title: comments_create_Response_201 comments_get_Response_200: type: object properties: {} description: Empty response body title: comments_get_Response_200 CreateComment: type: object properties: body: type: string object_id: type: string required: - body - object_id title: CreateComment comments_getThread_Response_200: type: object properties: {} description: Empty response body title: comments_getThread_Response_200 comments_update_Response_200: type: object properties: {} description: Empty response body title: comments_update_Response_200 comments_listThreads_Response_200: type: object properties: {} description: Empty response body title: comments_listThreads_Response_200 comments_list_Response_200: type: object properties: {} description: Empty response body title: comments_list_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