Comments

Records in InfoLobby can have threaded comments. The API lets you read and post comments programmatically.

Fetch comments for a record

GET /api/table/<table_id>/record/<record_id>/comments/get

Optional query parameters

  • limit (default 20, max 100)
  • offset (default 0)

Response

[
  {
    "id": 7,
    "table_id": 101,
    "record_id": 42,
    "user_id": 5,
    "user_name": "Jane Doe",
    "api_key_id": null,
    "content": "Followed up by email",
    "attachments": [
      {
        "name": "invoice.pdf",
        "path": "/folder/12-101-invoice.pdf",
        "type": "application/pdf",
        "size": 18324,
        "host": "..."
      }
    ],
    "created_at": "2026-04-12 14:32:01",
    "updated_at": null
  }
]

Post a comment

POST /api/table/<table_id>/record/<record_id>/comments/create

Request body

{
  "content": "Synced from CRM",
  "attachments": []
}

content may be empty when at least one attachment is provided. Each attachment must be an object obtained from the upload endpoint described below. Paths from other tables, unsafe paths, and files over 50 MB are rejected.

Attach files to a comment

Files are uploaded first, then their metadata is included in the attachments array on comments/create. The workspace must have file storage configured.

POST /api/table/<table_id>/record/<record_id>/comments/upload

Request body

{
  "name": "invoice.pdf",
  "type": "application/pdf",
  "data": "<base64-encoded bytes>"
}

50 MB per file. The response is the metadata object to splice into attachments:

{
  "name": "invoice.pdf",
  "path": "/folder/12-101-invoice.pdf",
  "type": "application/pdf",
  "size": 18324,
  "host": "..."
}

When a record, table, or comment is deleted, attached files are queued for the same delayed cleanup as record file fields.

Mentions

You can @-mention a workspace member by embedding a token in content:

@{<user_id>:<display_name>}

For example: "Quick check @{42:Jane Doe} — can you confirm?". The token is stored verbatim in content; the InfoLobby UI renders it as a pill. When the comment is created (or edited to add a new mention) the targeted user receives a comment.mention notification and is auto-subscribed to the record. Only current workspace members are valid — unknown ids are silently ignored. The display-name half of the token is a snapshot at write time and does not auto-update if the user is later renamed; the user-id half is canonical.

Authorship when posted via API

When a comment is created with an API key:

  • user_id is stored as 0
  • user_name is stored as "API: <key name>" (where <key name> is the name you chose when creating the key)
  • api_key_id records the originating key for full traceability

This makes API-created comments visually distinguishable in the InfoLobby UI and fully auditable in the events table.

Example

curl -X POST https://infolobby.com/api/table/101/record/42/comments/create \
  -H "Authorization: Bearer il_live_..." \
  -H "Content-Type: application/json" \
  -d '{"content":"Synced from CRM"}'