Comment a chatroom

PATCH /chat/chatrooms/{chatroom}/ambassadors/{ambassador}/comment

Headers

Path parameters

application/json

Body

  • comment integer | null

    comment's value ,(ex: this chatroom is archived because...)

Responses

  • 200 application/json

    Return success message

    Hide response attribute Show response attribute object
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
  • Forbidden - You don't have permission to access this route

  • Not found - The chatroom does not exist

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

PATCH /chat/chatrooms/{chatroom}/ambassadors/{ambassador}/comment
curl \
 -X PATCH https://domain.tld/api/v2/chat/chatrooms/{chatroom}/ambassadors/{ambassador}/comment \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -H "X-Popsell-Brand: 3" \
 -d '{"comment":42}'
Request examples
# Headers
X-Popsell-Brand: 3

# Payload
{
  "comment": 42
}
Response examples (200)
{
  "message": "Chatroom commented successfully"
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}