Skip to main content
POST
/
en
/
events
/
newComment
{
  "401 Unauthorized": {},
  "400 Bad Request": {},
  "404 Not Found": {}
}

Post Event Comment

Submits a new comment and optional star rating on a published event. Only available when the event’s AllowComments flag is true. After a successful post the event detail data should be refetched to display the new comment.
This endpoint uses the /en/ legacy route prefix rather than /api/public/.

Authentication

Requires a valid customer bearer token.

Request Body

Id
number
required
The integer ID of the event to comment on. Obtained as Event.Id from GET /api/public/events/{id}.
comment
string
required
The text body of the comment.
Title
string
Optional title or headline for the comment.
Rating
number | null
Optional numeric rating (e.g. 15). Pass null to submit without a rating.

Response

Returns an empty 200 OK on success. Refetch GET /api/public/events/{id} to see the new comment in the Event.Comments array.

Examples

Post a comment with a rating

POST /en/events/newComment
Authorization: Bearer {token}
Content-Type: application/json

{
  "Id": 412,
  "comment": "Fantastic session, highly recommend to anyone looking to start their week right!",
  "Title": "Great yoga class",
  "Rating": 5
}
HTTP/1.1 200 OK

Post a comment without a rating

POST /en/events/newComment
Authorization: Bearer {token}
Content-Type: application/json

{
  "Id": 412,
  "comment": "Really enjoyed this. Will be back next week.",
  "Title": null,
  "Rating": null
}
HTTP/1.1 200 OK

TypeScript Integration

import endpoints from '@/api/endpoints'

await httpClient.post(endpoints.events.newComment, {
  Id: 412,
  comment: 'Fantastic session, highly recommend!',
  Title: 'Great yoga class',
  Rating: 5,
})

Usage in Portal

ContextSource file
Event detail page comment form (/events/{id})src/views/events/details/data.ts

Error Responses

401 Unauthorized
error
The customer is not authenticated or the session has expired.
400 Bad Request
error
Missing required field Id or comment, or the event does not allow comments (AllowComments is false).
404 Not Found
error
No event with the specified Id exists.
MethodEndpointDescription
GET/api/public/events/{id}Event detail — includes Comments array and AllowComments flag
POST/en/events/deleteCommentDelete a comment previously posted by the customer