Cube Comments API
The Comments API from Cube — 2 operation(s) for comments.
The Comments API from Cube — 2 operation(s) for comments.
openapi: 3.0.3
info:
title: Cube Agents Comments API
version: 1.0.0 (1.0)
description: "#### General Description\nAn API to access underlying Cube functionality. These endpoints are the same endpoints\nthat support Cube's universal add-ons and a plethora of integrations meaning you'll be able to interact with your\nCube data in many powerful ways. Visit the API section of Cube's [Help Center](https://help.cubesoftware.com/hc/en-us/sections/18205290556180-Custom-Integrations)\nfor more usage guides on how you can use this API to integrate with Cube to accomplish various tasks!\n\n#### Versioning\nAll requests to the API require a version to be configured via an `Accept` Header. The value of this Header should look like this:\n```\nAccept: application/json; version=1.0\n```\nNote that the version number may differ depending on which version of the endpoint is needed.\n\n#### Response Structure\nThe general response structure of Cube's API endpoints will contain a `\"data\"` and `\"metadata\"` root level key:\n```json\n{\n \"data\": { ... object data or list of objects ... },\n \"metadata\": {\n \"status\": 200,\n \"message\": \"Potential message with additional context\",\n \"error\": false,\n \"code\": \"\"\n }\n}\n```\n\n#### Rate Limiting\nAll endpoints have a rate limit configured, most of them default to 5/s.\nWhen the rate limit is encountered, a 429 HTTP code will be returned.\n\n#### Error Handling\nIn the event an error occurs, the response will typically look like this:\n```json\n{\n \"data\": {},\n \"metadata\": {\n \"status\": 400,\n \"message\": \"Some error message\",\n \"error\": true,\n \"code\": \"SOME_ERROR_CODE\"\n }\n}\n```\n"
termsOfService: https://www.cubesoftware.com/terms-of-service
servers:
- url: https://api.cubesoftware.com
description: Production API URL
tags:
- name: Comments
paths:
/comments/{target_app}/{target_model}:
get:
operationId: comments_list
description: List all comments for a specific content type with filtering.
summary: List comments
parameters:
- in: header
name: X-Company-ID
schema:
type: string
description: Associates request with company
required: true
- in: path
name: target_app
schema:
type: string
enum:
- taskflow
description: The app label of the target object
required: true
- in: query
name: target_id
schema:
type: string
description: 'Filter by target object id: int or uuid.'
required: true
explode: false
style: form
examples:
SingleIntTargetId:
value: '86'
summary: Single int target_id
MultipleIntTargetIds:
value: 86, 87, 99
summary: Multiple int target_ids
SingleUuidTargetId:
value: 550e8400-e29b-41d4-a716-446655440000
summary: Single uuid target_id
- in: path
name: target_model
schema:
type: string
enum:
- task
description: The model name of the target object
required: true
tags:
- Comments
security:
- OAuth2: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Comment'
examples:
CommentListResponse:
value:
- data:
- id: 1
content: Cube is reinventing FP&A.
content_structured: {}
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-12T00:28:02.249415+00:00'
deleted_at: null
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: null
target:
app: taskflow
model: task
content_type_id: 1
id: '86'
- id: 2
content: Cube is leading the FP&A revolution.
content_structured: {}
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-13T00:28:02.249497+00:00'
deleted_at: null
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: null
target:
app: taskflow
model: task
content_type_id: 1
id: '87'
summary: Comment list response
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
MissingTargetIdParameter:
value:
data: {}
metadata:
status: 400
error: true
message:
target_id:
- This field is required.
code: ''
errors:
- code: ''
detail:
target_id:
- This field is required.
summary: Missing target_id parameter
InvalidContentType:
value:
data: {}
metadata:
status: 400
error: true
message: 'Model: invalid_model for App: taskflow is not supported.'
code: ''
errors:
- code: ''
detail: 'Model: invalid_model for App: taskflow is not supported.'
summary: Invalid content type
UnsupportedApp:
value:
data: {}
metadata:
status: 400
error: true
message: 'Model: task for App: unsupported_app is not supported.'
code: ''
errors:
- code: ''
detail: 'Model: task for App: unsupported_app is not supported.'
summary: Unsupported app
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
NoPermission:
value:
data: {}
metadata:
status: 403
error: true
message: You do not have permission to perform this action.
code: ''
errors:
- code: ''
detail: You do not have permission to perform this action.
summary: No permission
description: Permission denied
post:
operationId: comments_create
description: Create a new comment for a specific target object. The content must not exceed 1000 characters.
summary: Create comment
parameters:
- in: header
name: X-Company-ID
schema:
type: string
description: Associates request with company
required: true
- in: path
name: target_app
schema:
type: string
enum:
- taskflow
description: The app label of the target object
required: true
- in: path
name: target_model
schema:
type: string
enum:
- task
description: The model name of the target object
required: true
tags:
- Comments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
CreateCommentRequest:
value:
content: Cube is reinventing FP&A.
target_id: 86
content_structured:
type: doc
content:
- type: paragraph
content:
- type: text
text: Cube is reinventing FP&A.
summary: Create comment request
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Comment'
multipart/form-data:
schema:
$ref: '#/components/schemas/Comment'
required: true
security:
- OAuth2: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
CommentCreatedSuccessfully:
value:
data:
id: 1
content: Cube is reinventing FP&A.
content_structured: {}
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-12T00:28:02.264968+00:00'
deleted_at: null
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: null
target:
app: taskflow
model: task
content_type_id: 1
id: '86'
summary: Comment created successfully
description: Comment created successfully
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
MissingContent:
value:
data: {}
metadata:
status: 400
error: true
message:
content:
- This field is required.
code: ''
errors:
- code: ''
detail:
content:
- This field is required.
summary: Missing content
MissingTargetId:
value:
data: {}
metadata:
status: 400
error: true
message:
target_id:
- This field is required.
code: ''
errors:
- code: ''
detail:
target_id:
- This field is required.
summary: Missing target_id
TargetObjectNotFound:
value:
data: {}
metadata:
status: 400
error: true
message: model:'Task' with id:'99999' does not exist
code: ''
errors:
- code: ''
detail: model:'Task' with id:'99999' does not exist
summary: Target object not found
ContentTooLong:
value:
data: {}
metadata:
status: 400
error: true
message:
content:
- Ensure this field has no more than 1000 characters.
code: ''
errors:
- code: ''
detail:
content:
- Ensure this field has no more than 1000 characters.
summary: Content too long
InvalidProseMirrorStructure:
value:
data: {}
metadata:
status: 400
error: true
message:
content_structured:
- Invalid data
code: ''
errors:
- code: ''
detail:
content_structured:
- Invalid data
summary: Invalid ProseMirror structure
InvalidMentionUserIDs:
value:
data: {}
metadata:
status: 400
error: true
message:
content_structured:
- User IDs [999] do not exist or do not belong to this company.
code: ''
errors:
- code: ''
detail:
content_structured:
- User IDs [999] do not exist or do not belong to this company.
summary: Invalid mention user IDs
description: Invalid input
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
NoPermission:
value:
data: {}
metadata:
status: 403
error: true
message: You do not have permission to perform this action.
code: ''
errors:
- code: ''
detail: You do not have permission to perform this action.
summary: No permission
description: Permission denied
/comments/{target_app}/{target_model}/{id}:
get:
operationId: comments_retrieve
description: Retrieve a specific comment by its id.
summary: Retrieve comment
parameters:
- in: header
name: X-Company-ID
schema:
type: string
description: Associates request with company
required: true
- in: path
name: id
schema:
type: string
required: true
- in: path
name: target_app
schema:
type: string
enum:
- taskflow
description: The app label of the target object
required: true
- in: path
name: target_model
schema:
type: string
enum:
- task
description: The model name of the target object
required: true
tags:
- Comments
security:
- OAuth2: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
RetrieveComment:
value:
data:
id: 1
content: Cube is reinventing FP&A.
content_structured: {}
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-12T00:28:02.294487+00:00'
deleted_at: null
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: null
target:
app: taskflow
model: task
content_type_id: 1
id: '86'
summary: Retrieve Comment
RetrieveModifiedComment:
value:
data:
id: 1
content: Cube is leading the FP&A revolution.
content_structured:
type: doc
content:
- type: paragraph
content:
- type: text
text: Cube is leading the FP&A revolution.
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-12T00:28:02.310324+00:00'
deleted_at: null
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: '2025-05-21T12:34:56Z'
target:
app: taskflow
model: task
content_type_id: 1
id: '86'
summary: Retrieve modified Comment
RetrieveDeletedComment:
value:
data:
id: 1
content: ''
content_structured: null
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-12T00:28:02.325635+00:00'
deleted_at: '2025-05-21T12:34:56Z'
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: null
target:
app: taskflow
model: task
content_type_id: 1
id: '86'
summary: Retrieve deleted Comment
description: Comment retrieved successfully
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
ResourceNotFound:
value:
data: {}
metadata:
status: 404
error: true
message: Resource does not exist
code: DOES_NOT_EXIST
errors:
- code: DOES_NOT_EXIST
detail: Resource does not exist
summary: Resource not found
description: ''
patch:
operationId: comments_partial_update
description: Update a specific comment by its id.
summary: Update comment
parameters:
- in: header
name: X-Company-ID
schema:
type: string
description: Associates request with company
required: true
- in: path
name: id
schema:
type: string
required: true
- in: path
name: target_app
schema:
type: string
enum:
- taskflow
description: The app label of the target object
required: true
- in: path
name: target_model
schema:
type: string
enum:
- task
description: The model name of the target object
required: true
tags:
- Comments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedComment'
examples:
UpdateCommentRequest:
value:
content: Cube is leading the FP&A revolution.
content_structured:
type: doc
content:
- type: paragraph
content:
- type: text
text: Cube is leading the FP&A revolution.
summary: Update comment request
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedComment'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedComment'
security:
- OAuth2: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
CommentUpdatedSuccessfully:
value:
data:
id: 1
content: Cube is leading the FP&A revolution.
content_structured:
type: doc
content:
- type: paragraph
content:
- type: text
text: Cube is leading the FP&A revolution.
created_by_id: 1
created_by_user_company:
user:
id: 28
first_name: hhePZBKFhfdSrDsqHkC
last_name: SnPCaLuQIazTmqTjD
created_at: '1986-03-28T19:56:43'
email: lindawest@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
created_at: '2026-07-12T00:28:02.279687+00:00'
deleted_at: null
deleted_by_id: null
deleted_by_user_company:
user:
id: 71
first_name: oePqmjQbZndJghceKRJRB
last_name: QSUEXExIZVPeFzGRmMg
created_at: '1985-01-01T13:50:02'
email: laura56@example.org
is_staff: null
is_cube_staff: null
relationship_type: null
timezone: Africa/Abidjan
is_deactivated: false
modified_at: '2025-05-21T12:34:56Z'
target:
app: taskflow
model: task
content_type_id: 1
id: '86'
summary: Comment updated successfully
description: Comment updated successfully
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
InvalidProseMirrorStructure:
value:
data: {}
metadata:
status: 400
error: true
message:
content_structured:
- Invalid data
code: ''
errors:
- code: ''
detail:
content_structured:
- Invalid data
summary: Invalid ProseMirror structure
InvalidMentionUserIDs:
value:
data: {}
metadata:
status: 400
error: true
message:
content_structured:
- User IDs [999] do not exist or do not belong to this company.
code: ''
errors:
- code: ''
detail:
content_structured:
- User IDs [999] do not exist or do not belong to this company.
summary: Invalid mention user IDs
description: Invalid input
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
ResourceNotFound:
value:
data: {}
metadata:
status: 404
error: true
message: Resource does not exist
code: DOES_NOT_EXIST
errors:
- code: DOES_NOT_EXIST
detail: Resource does not exist
summary: Resource not found
description: ''
delete:
operationId: comments_destroy
description: Destroy a specific comment by its id.
summary: Destroy comment
parameters:
- in: header
name: X-Company-ID
schema:
type: string
description: Associates request with company
required: true
- in: path
name: id
schema:
type: string
required: true
- in: path
name: target_app
schema:
type: string
enum:
- taskflow
description: The app label of the target object
required: true
- in: path
name: target_model
schema:
type: string
enum:
- task
description: The model name of the target object
required: true
tags:
- Comments
security:
- OAuth2: []
responses:
'204':
description: Comment deleted successfully
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
examples:
ResourceNotFound:
value:
data: {}
metadata:
status: 404
error: true
message: Resource does not exist
code: DOES_NOT_EXIST
errors:
- code: DOES_NOT_EXIST
detail: Resource does not exist
summ
# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cubesoftware/refs/heads/main/openapi/cubesoftware-comments-api-openapi.yml