FleetbaseFleetbase

Comments

Comments attach discussion to Fleetbase resources or reply to existing comments. Use comment endpoints to create threaded context around orders, files, operational records, and other subject models. Comments are `internal` (notes for the organization's own users) or `customer` (may be shown to customers and drivers). The public API only returns customer-visible comments. New comments are broadcast as the realtime event `comment.created` on `company.{uuid}` and, for customer-visible comments, on the subject's channels (`{subject type}.{public_id}` and `{subject type}.{uuid}`, e.g. `order.order_7YqM3KpL2n`). Payload: `{ id, event, created_at, subject_id, data }`, where `data` is the comment and `subject_id` the subject's public ID. Requires Core API with fleetbase/core-api#306 (release v1.6.69).

The Comment object

A comment stores authored text against a subject resource or as a reply to another comment.
Attributes
idstringoptional

Public identifier of the comment.

contentstringoptional

Comment body.

tagsarray of stringsoptional

Tags associated with the comment.

metaobjectoptional

Arbitrary metadata stored with the comment.

visibilityenumoptional

Who may see the comment, from meta.visibility: internal comments are notes for the organization's own users and never appear on the public API, customer comments may be shown to customers and drivers. A comment without a visibility is customer. Requires Core API with fleetbase/core-api#306 (release v1.6.69). One of internal, customer.

authorobjectoptional

User that authored the comment.

repliesarray of objectsoptional

Nested replies to the comment. On the public API, internal replies are left out.

editablebooleanoptional

Whether the current session user can edit the comment.

updated_attimestampoptional

Time the comment was last updated.

created_attimestampoptional

Time the comment was created.

deleted_attimestampoptional

Time the comment was deleted, when soft deleted.

The Comment object
{
  "id": "comment_8JVZr4q",
  "content": "Please confirm the delivery window.",
  "tags": [],
  "meta": {
    "visibility": "customer"
  },
  "visibility": "customer",
  "author": {
    "id": "user_8xP2L1d",
    "name": "Alex Rivera"
  },
  "replies": [],
  "editable": true,
  "updated_at": "2026-05-07T09:30:00Z",
  "created_at": "2026-05-07T09:30:00Z",
  "deleted_at": null
}
POST/v1/comments

Create Comment

Creates a comment on a subject resource or as a reply to an existing comment. Provide either a subject reference or a parent comment ID with the comment content.

Set visibility to internal for a note only the organization's users should see, or customer for one customers and drivers may see (see the Comment object for the default). Internal comments are not returned by Query Comments or Retrieve Comment. Every new comment broadcasts the realtime event comment.created (see the Comments folder). Requires Core API with fleetbase/core-api#306 (release v1.6.69).

Body parameters
contentstringrequired

Comment body.

subjectobjectoptional

Subject resource receiving the comment. Provide this object when creating a top-level comment.

idstringrequired

Public ID of the subject resource.

typestringrequired

Mutation type or resource type used to resolve the subject model.

subject_idstringoptional

Public ID of the subject resource. Use with subject_type as an alternative to subject.

subject_typestringoptional

Mutation type or resource type used to resolve the subject model. Use with subject_id.

parentstringoptional

Public ID of the parent comment when creating a reply.

visibilityenumoptional

Who may see the comment; any other value returns 422. Stored as meta.visibility. When omitted, a reply takes its parent's visibility, a comment on an order created through this API is customer (and internal when written from the console), and a comment on any other subject has none, which counts as customer. Requires Core API with fleetbase/core-api#306 (release v1.6.69). One of internal, customer.

POST/v1/comments
curl -X POST https://api.fleetbase.io/v1/comments \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "content": "Example comment",
  "subject": {
    "id": "{{file_id}}",
    "type": "file"
  }
}'
PUT/v1/comments/:id

Update Comment

Updates the content of an existing comment. The subject and parent linkage are not changed by this endpoint.

Body parameters
contentstringrequired

Updated comment body.

PUT/v1/comments/:id
curl -X PUT https://api.fleetbase.io/v1/comments/:id \
  -H "Authorization: Bearer flb_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "content": "Updated comment"
}'
GET/v1/comments

Query Comments

Returns comments for the current organization. Use query parameters to filter, sort, and paginate the result set. Internal comments (visibility internal) and internal replies are left out. Requires Core API with fleetbase/core-api#306 (release v1.6.69).

Query parameters
limitstringoptional

Limit value for this comments request.

offsetstringoptional

Offset value for this comments request.

sortstringoptional

Sort value for this comments request.

GET/v1/comments
curl https://api.fleetbase.io/v1/comments?limit=25&offset=0&sort=created_at \
  -H "Authorization: Bearer flb_live_…"
GET/v1/comments/:id

Retrieve Comment

Retrieves a comment by ID, including its author and any nested replies returned by the API resource. An internal comment returns 404 (Comment resource not found.), and internal replies are left out. Requires Core API with fleetbase/core-api#306 (release v1.6.69).

GET/v1/comments/:id
curl https://api.fleetbase.io/v1/comments/:id \
  -H "Authorization: Bearer flb_live_…"
DELETE/v1/comments/:id

Delete Comment

Deletes a comment by ID. The response returns a deleted-resource envelope for the removed comment.

DELETE/v1/comments/:id
curl -X DELETE https://api.fleetbase.io/v1/comments/:id \
  -H "Authorization: Bearer flb_live_…"
Comments | Fleetbase