openapi: 3.2.0 info: description: Close CRM REST API title: Close Comments API version: 1.0.0 servers: - url: https://api.close.com/api/v1 security: - ApiKeyAuth: [] - OAuth2: [] tags: - name: comments externalDocs: url: https://developer.close.com/api/resources/comments paths: /comment/: get: operationId: comments_list tags: - comments 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. Comments on leads the requestor cannot see are omitted from the response.' parameters: - in: query name: thread_id required: false schema: title: Thread ID default: null anyOf: - type: string - type: 'null' - in: query name: object_id required: false schema: title: Object ID default: null anyOf: - type: string - type: 'null' responses: '200': content: application/json: example: data: - body:

Real nice comment you've got here.

created_at: '2024-03-27T18:57:02.770240+00:00' created_by: user_abc123 id: comm_abc123 lead_id: lead_abc123 mentions: [] organization_id: orga_abc123 removed_at: null removed_by: null thread_id: comthr_abc123 updated_at: '2024-03-27T18:57:02.770240+00:00' updated_by: user_abc123 has_more: false description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found post: operationId: comments_create tags: - comments 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. requestBody: content: application/json: example: body:

Real nice activity you've got here.

object_id: acti_abc123 schema: $ref: '#/components/schemas/CreateComment' required: true responses: '201': content: application/json: example: body:

Real nice activity you've got here.

created_at: '2024-03-27T18:57:02.770240+00:00' created_by: user_abc123 id: comm_abc123 lead_id: lead_abc123 mentions: [] organization_id: orga_abc123 removed_at: null removed_by: null thread_id: comthr_abc123 updated_at: '2024-03-27T18:57:02.770240+00:00' updated_by: user_abc123 description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found /comment/{id}/: get: operationId: comments_get tags: - comments summary: Fetch an individual comment description: A `404` is returned both when the comment does not exist and when the requestor cannot see its lead. parameters: - in: path name: id required: true schema: type: string responses: '200': content: application/json: example: body:

Real nice comment you've got here.

created_at: '2024-03-27T18:57:02.770240+00:00' created_by: user_abc123 id: comm_abc123 lead_id: lead_abc123 mentions: [] organization_id: orga_abc123 removed_at: null removed_by: null thread_id: comthr_abc123 updated_at: '2024-03-27T18:57:02.770240+00:00' updated_by: user_abc123 description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found put: operationId: comments_update tags: - comments summary: Update a Comment description: You can use this endpoint to edit a comment body. Note that users may only update their own comments. parameters: - in: path name: id required: true schema: type: string requestBody: content: application/json: example: body:

Oops, wrong activity

schema: $ref: '#/components/schemas/UpdateCommentThreads' required: true responses: '200': content: application/json: example: body:

Oops, wrong activity

created_at: '2024-03-27T18:57:02.770240+00:00' created_by: user_abc123 id: comm_abc123 lead_id: lead_abc123 mentions: [] organization_id: orga_abc123 removed_at: null removed_by: null thread_id: comthr_abc123 updated_at: '2024-03-27T18:57:02.770240+00:00' updated_by: user_abc123 description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found delete: operationId: comments_delete tags: - comments 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.' parameters: - in: path name: id required: true schema: type: string responses: '204': description: No content '400': description: Bad request '401': description: Unauthorized '404': description: Not found /comment_thread/: get: operationId: comments_list_threads tags: - comments summary: Fetch multiple comment threads description: Users with restricted lead visibility cannot list comment threads across all leads, and must scope the request to specific threads or objects via the `ids` or `object_ids` filters. Unscoped requests from such users return a `403`. parameters: - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/SkipParam' - in: query name: ids required: false schema: title: IDs default: null anyOf: - type: array items: type: string - type: 'null' - in: query name: object_ids required: false schema: title: Object IDs default: null anyOf: - type: array items: type: string - type: 'null' responses: '200': content: application/json: example: data: - created_at: '2024-03-27T18:57:02.759492+00:00' id: comthr_abc123 lead_id: lead_abc123 num_comments: 2 object_id: acti_abc123 object_type: activity.custom_activity organization_id: orga_abc123 participating: - user_abc123 updated_at: '2024-03-27T21:24:20.379507+00:00' has_more: true description: Successful response '400': description: Bad request '401': description: Unauthorized '403': description: The requestor has restricted lead visibility and did not scope the request by `ids` or `object_ids`. '404': description: Not found /comment_thread/{id}/: get: operationId: comments_get_thread tags: - comments summary: Fetch an individual comment thread description: A `404` is returned both when the comment thread does not exist and when the requestor cannot see its lead. parameters: - in: path name: id required: true schema: type: string responses: '200': content: application/json: example: created_at: '2024-03-27T18:57:02.759492+00:00' id: comthr_abc123 lead_id: lead_abc123 num_comments: 2 object_id: acti_abc123 object_type: activity.custom_activity organization_id: orga_abc123 participating: - user_abc123 updated_at: '2024-03-27T21:24:20.379507+00:00' description: Successful response '400': description: Bad request '401': description: Unauthorized '404': description: Not found components: parameters: 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 schemas: UpdateCommentThreads: title: UpdateCommentThreads type: object properties: body: title: Body type: string required: - body additionalProperties: false CreateComment: title: CreateComment type: object properties: body: title: Body type: string object_id: title: Object ID type: string required: - body - object_id additionalProperties: false 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