Add a comment to a post

POST /platform/posts/{post}/comments

Path parameters

  • post integer Required

    id of the post you want to comment

application/json

Body Required

  • content string Required
  • content_strip string Required
  • tagged_ambassadors array[integer]

    ambassadors that will be notified

Responses

  • 201 application/json

    returns the created comment

    Hide response attributes Show response attributes object
    • id_ambassador_post integer(int32)
    • author object
      Hide author attributes Show author attributes object
      • id_ambassador integer(int32)
      • image string(nullable)
      • full_name string
      • username string(nullable)
      • description string
      • status integer(int32)
      • availability string(nullable)
      • unavailable boolean
      • is_absent boolean
      • absent_msg string(nullable)
      • fb_account string(nullable)
      • twitter_account string(nullable)
      • instagram_account string(nullable)
      • linkedIn_account string(nullable)
      • youtube_account string(nullable)
      • online boolean

        true: when last_action_date is less than 5 minutes ago

      • last_action_date string
    • content string(nullable)
    • nb_likes integer(int32)
    • comments array[object]
    • date_created string(date-time)
    • date_timestamp boolean
    • liked boolean
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 404

    Not found - The post does not exist

POST /platform/posts/{post}/comments
curl \
 --request POST 'https://domain.tld/api/v2/platform/posts/{post}/comments' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"content":"comment with mention {'type':'tag-user', 'content':'@John Doe, 'id':'12'}","content_strip":"comment with mention @John Doe","tagged_ambassadors":[42]}'
Request examples
{
  "content": "comment with mention {'type':'tag-user', 'content':'@John Doe, 'id':'12'}",
  "content_strip": "comment with mention @John Doe",
  "tagged_ambassadors": [
    42
  ]
}
Response examples (201)
{
  "id_ambassador_post": 42,
  "author": {
    "id_ambassador": 42,
    "image": "string",
    "full_name": "string",
    "username": "string",
    "description": "string",
    "status": 42,
    "availability": "string",
    "unavailable": true,
    "is_absent": true,
    "absent_msg": "string",
    "fb_account": "string",
    "twitter_account": "string",
    "instagram_account": "string",
    "linkedIn_account": "string",
    "youtube_account": "string",
    "online": true,
    "last_action_date": "string"
  },
  "content": "string",
  "nb_likes": 42,
  "comments": [
    {}
  ],
  "date_created": "2025-05-04T09:42:00Z",
  "date_timestamp": true,
  "liked": true
}
Response examples (401)
{
  "message": "Unauthorized."
}