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
The integer ID of the event to comment on. Obtained as Event.Id from GET /api/public/events/{id}.
The text body of the comment.
Optional title or headline for the comment.
Optional numeric rating (e.g. 1–5). 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 /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
}
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
}
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
| Context | Source file |
|---|
Event detail page comment form (/events/{id}) | src/views/events/details/data.ts |
Error Responses
The customer is not authenticated or the session has expired.
Missing required field Id or comment, or the event does not allow comments (AllowComments is false).
No event with the specified Id exists.
| Method | Endpoint | Description |
|---|
GET | /api/public/events/{id} | Event detail — includes Comments array and AllowComments flag |
POST | /en/events/deleteComment | Delete a comment previously posted by the customer |