Skip to content

Returns a single comment with its author profile, optionally in the shape the editor expects.

Pass context=edit to receive media_images resolved from the stored media metadata instead of the raw meta blob. Access is checked against the parent post, so a comment on a post the caller cannot reach returns a 404.

Endpoint

  • Method: GET
  • Path: /comments/{id}
  • Edition: Core
  • Controller: CommentsController@show
  • Route source: fluent-community/app/Http/Routes/api.php:144
  • Controller source: fluent-community/app/Http/Controllers/CommentsController.php

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

GET Get Comment

GET
/comments/{id}

Returns a single comment with its author profile, optionally in the shape the editor expects.

Controller: CommentsController@show
Route source: fluent-community/app/Http/Routes/api.php:144

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Parameters

Path Parameters

id*

ID extracted from the URL path.

Type
integer
Required

Query Parameters

context

Context read via $request->get() in show().

Type
string

Responses

Successful response

application/json
JSON
{
  
"comment": {
  
  
"content_type": "string",
  
  
"created_at": "string",
  
  
"id": 0,
  
  
"is_sticky": 0,
  
  
"message": "string",
  
  
"message_rendered": "string",
  
  
"meta": [
  
  
  
{
  
  
  
  
"additionalProperties": "string"
  
  
  
}
  
  
],
  
  
"parent_id": "string",
  
  
"post_id": "string",
  
  
"reactions_count": "string",
  
  
"status": "string",
  
  
"type": "string",
  
  
"updated_at": "string",
  
  
"user_id": "string",
  
  
"xprofile": {
  
  
  
"avatar": "string",
  
  
  
"badge": "string",
  
  
  
"created_at": "string",
  
  
  
"display_name": "string",
  
  
  
"is_verified": 0,
  
  
  
"last_activity": "string",
  
  
  
"meta": {
  
  
  
  
"badge_slug": "string",
  
  
  
  
"cover_photo": "string",
  
  
  
  
"social_links": {
  
  
  
  
  
"fb": "string",
  
  
  
  
  
"instagram": "string",
  
  
  
  
  
"linkedin": "string",
  
  
  
  
  
"twitter": "string",
  
  
  
  
  
"youtube": "string"
  
  
  
  
},
  
  
  
  
"website": "string"
  
  
  
},
  
  
  
"permalink": "string",
  
  
  
"short_description": "string",
  
  
  
"status": "string",
  
  
  
"total_points": 0,
  
  
  
"user_id": 0,
  
  
  
"username": "string"
  
  
}
  
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation