Skip to content

Comment on a brand page, or reply

POST
/api/v1/brands/{slug}/comments
curl --request POST \
--url http://localhost:3000/api/v1/brands/example/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "page": "example", "section": "example", "parent": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "body": "example" }'

page (and section, a section’s id on it) starts a thread; a page or section that isn’t there is a 404. parent replies in a thread instead, on its page and section; a reply to a reply joins its thread, and a reply to a resolved thread reopens it. Takes propose on the project.

Scope: propose.

slug
required
string

Brand slug

Media typeapplication/json
object
page

The page it is on; a slug it had before a rename finds it too

string
<= 60 characters /^[a-z0-9]+(-[a-z0-9]+)*$/
section
Any of:
string
/^[a-z0-9_-]{1,40}$/
parent

Reply to this thread instead; its page and section are the reply’s. A reply to a reply joins its thread

string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
body
required

Plain text

string
>= 1 characters <= 4000 characters
Examplegenerated
{
"page": "example",
"section": "example",
"parent": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"body": "example"
}

The comment

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
page
required

The page’s slug now: a comment on a page renamed since follows it

string
section
required

The section’s id; null for the page as a whole

string | null
parent
required
Any of:
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
body
required
string
author
required

Their name when they wrote it

string
authorId
required

The person’s id; null for an agent’s, or once they are gone

string | null
mine
required

Written by the caller: theirs to edit and delete

boolean
resolvedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
resolvedBy
required
string | null
editedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
Examplegenerated
{
"data": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"page": "example",
"section": "example",
"parent": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"body": "example",
"author": "example",
"authorId": "example",
"mine": true,
"resolvedAt": "2026-04-15T12:00:00Z",
"resolvedBy": "example",
"editedAt": "2026-04-15T12:00:00Z",
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z"
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}