Skip to main content
Comments allow you to add notes and discussions to individual records in your NocoDB tables. The Comments API provides endpoints to create, read, update, and delete comments.

List Comments

Retrieve comments for a specific row or table.
GET /api/v1/db/meta/comments
curl -X GET "https://app.nocodb.com/api/v1/db/meta/comments?fk_model_id={modelId}&row_id={rowId}" \
  -H "xc-auth: YOUR_API_TOKEN"
fk_model_id
string
required
Model/Table ID to fetch comments from
row_id
string
required
Row ID to fetch comments for
list
array
Array of comment objects
id
string
Unique Comment ID
row_id
string
Row ID this comment belongs to
comment
string
Comment text content (max 3000 characters)
created_by
string
User ID of the comment creator
created_by_email
string
Email of the comment creator
resolved_by
string
User ID who resolved the comment (if applicable)
resolved_by_email
string
Email of the user who resolved the comment
parent_comment_id
string
Parent Comment ID for threaded comments
fk_model_id
string
Foreign Key to Model/Table
source_id
string
Source ID
base_id
string
Base ID
created_at
string
Comment creation timestamp
updated_at
string
Comment last update timestamp
is_deleted
boolean
Whether the comment has been deleted

Response Example

{
  "list": [
    {
      "id": "cmt_abc123",
      "row_id": "rec0Adp9PMG9o7uJy",
      "comment": "This is a comment on the record",
      "created_by": "usr_xyz789",
      "created_by_email": "user@example.com",
      "fk_model_id": "md_ehn5izr99m7d45",
      "created_at": "2023-03-03T10:15:30Z",
      "updated_at": "2023-03-03T10:15:30Z",
      "is_deleted": false
    }
  ],
  "pageInfo": {
    "totalRows": 1,
    "page": 1,
    "pageSize": 25,
    "isFirstPage": true,
    "isLastPage": true
  }
}

Create Comment

Add a new comment to a row.
POST /api/v1/db/meta/comments
curl -X POST "https://app.nocodb.com/api/v1/db/meta/comments" \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fk_model_id": "md_ehn5izr99m7d45",
    "row_id": "rec0Adp9PMG9o7uJy",
    "comment": "This is a new comment"
  }'
fk_model_id
string
required
Model/Table ID where the row exists
row_id
string
required
Row ID to add the comment to
comment
string
Comment text content (max 3000 characters)

Response Example

{
  "id": "cmt_new123",
  "row_id": "rec0Adp9PMG9o7uJy",
  "comment": "This is a new comment",
  "created_by": "usr_xyz789",
  "created_by_email": "user@example.com",
  "fk_model_id": "md_ehn5izr99m7d45",
  "created_at": "2023-03-03T14:20:00Z",
  "updated_at": "2023-03-03T14:20:00Z",
  "is_deleted": false
}

Update Comment

Update an existing comment.
PATCH /api/v1/db/meta/comment/{commentId}
curl -X PATCH "https://app.nocodb.com/api/v1/db/meta/comment/{commentId}" \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "comment": "Updated comment text",
    "fk_model_id": "md_ehn5izr99m7d45"
  }'
commentId
string
required
Unique Comment ID to update
comment
string
Updated comment text (max 3000 characters)
fk_model_id
string
Model/Table ID (for validation)

Response Example

{
  "id": "cmt_abc123",
  "row_id": "rec0Adp9PMG9o7uJy",
  "comment": "Updated comment text",
  "created_by": "usr_xyz789",
  "created_by_email": "user@example.com",
  "fk_model_id": "md_ehn5izr99m7d45",
  "created_at": "2023-03-03T10:15:30Z",
  "updated_at": "2023-03-03T14:25:00Z",
  "is_deleted": false
}

Delete Comment

Delete a comment from a row.
DELETE /api/v1/db/meta/comment/{commentId}
curl -X DELETE "https://app.nocodb.com/api/v1/db/meta/comment/{commentId}" \
  -H "xc-auth: YOUR_API_TOKEN"
commentId
string
required
Unique Comment ID to delete
success
boolean
Whether the deletion was successful

Count Comments

Get the comment count for one or more rows.
GET /api/v1/db/meta/comments/count
curl -X GET "https://app.nocodb.com/api/v1/db/meta/comments/count?fk_model_id={modelId}&ids[]={rowId1}&ids[]={rowId2}" \
  -H "xc-auth: YOUR_API_TOKEN"
fk_model_id
string
required
Model/Table ID
ids
array
required
Array of Row IDs to count comments for

Response Example

{
  "rec0Adp9PMG9o7uJy": 5,
  "rec1Bdq0QNH0p8vKz": 3,
  "rec2Cdr1ROI1q9wLa": 0
}

Comment Features

Threading

Comments support threading through the parent_comment_id field. To create a reply to an existing comment:
curl -X POST "https://app.nocodb.com/api/v1/db/meta/comments" \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fk_model_id": "md_ehn5izr99m7d45",
    "row_id": "rec0Adp9PMG9o7uJy",
    "comment": "Reply to the comment",
    "parent_comment_id": "cmt_abc123"
  }'

Resolving Comments

Comments can be resolved by setting the resolved_by field. This is useful for tracking which comments have been addressed.

Mentions

You can mention users in comments using @ syntax. Mentioned users may receive notifications depending on their preferences.

Soft Delete

Deleted comments are soft-deleted by default, setting is_deleted to true rather than removing them from the database. This preserves comment history and threading.

Best Practices

Comment Length

  • Keep comments concise and relevant
  • Maximum length is 3000 characters
  • Use multiple comments for lengthy discussions

Permissions

  • Users can only edit or delete their own comments
  • Table/view permissions apply to comment visibility
  • Admins can manage all comments

Performance

  • Use the count endpoint to efficiently check comment counts for multiple rows
  • Implement pagination when fetching comments for rows with many comments
  • Consider caching comment counts for frequently accessed records

Use Cases

Collaborative Review

// Add review comment
await fetch('https://app.nocodb.com/api/v1/db/meta/comments', {
  method: 'POST',
  headers: {
    'xc-auth': 'YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    fk_model_id: 'md_tasks',
    row_id: 'rec_task123',
    comment: 'Reviewed and approved. Ready for deployment.'
  })
});

Issue Tracking

// Add issue resolution comment
await fetch('https://app.nocodb.com/api/v1/db/meta/comments', {
  method: 'POST',
  headers: {
    'xc-auth': 'YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    fk_model_id: 'md_issues',
    row_id: 'rec_issue456',
    comment: 'Bug fixed in commit abc123. Closing issue.'
  })
});

Customer Feedback

// Log customer feedback
await fetch('https://app.nocodb.com/api/v1/db/meta/comments', {
  method: 'POST',
  headers: {
    'xc-auth': 'YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    fk_model_id: 'md_customers',
    row_id: 'rec_customer789',
    comment: 'Customer requested feature X. Priority: High'
  })
});