Incantory
Sign in

Comments API

8 operations. Authentication, errors and pagination work as described in the REST API overview.

Threads on a target

GET/api/v1/commentsToken optional

One page of top-level comments (oldest first, keyset cursor) with all their replies, nested up to 4 levels (deeper replies are flattened with replyTo). Hidden, held and deleted comments appear only to those allowed to see them; a deleted comment with replies is a tombstone.

listComments parameters
NameTypeDescription
targetType queryrequired"prompt" | "prompt_version" | "make" | "post" | "change_request"
targetId queryrequiredstring
cursor querystring

Responses: 200 OK400, 404, 429

Response fields
listComments response fields
NameTypeDescription
targetrequiredobject
nodesrequired__schema0[]
nextCursorrequiredstring | null
totalrequiredinteger (-9007199254740991–9007199254740991)
lockedrequiredboolean
viewerrequiredobject
Example
curl 'https://incantory.ai/api/v1/comments' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"

Comment or reply

POST/api/v1/commentsToken required

Markdown body; @handle mentions notify (respecting blocks). New accounts' comments containing links are held for review (held: true). Rate-limited per user.

Request body

createComment body fields
NameTypeDescription
targetTyperequired"prompt" | "prompt_version" | "make" | "post" | "change_request"
targetIdrequiredstring
parentIdstring | null
bodyrequiredstring

Responses: 201 OK400, 401, 403, 404, 409, 429

Response fields
createComment response fields
NameTypeDescription
idrequiredstring
heldrequiredbooleanHeld for review (new account with links)
createdAtrequiredstringISO 8601 timestamp (UTC)
Example
curl -X POST 'https://incantory.ai/api/v1/comments' \
  -H "Authorization: Bearer $INCANTORY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"targetType":"prompt","targetId":"targetId","body":"body"}'

Edit your comment (within 24 hours)

PATCH/api/v1/comments/{id}Token required

editComment parameters
NameTypeDescription
id pathrequiredstringId

Request body

editComment body fields
NameTypeDescription
bodyrequiredstring

Responses: 200 OK400, 401, 403, 404, 429

Response fields
editComment response fields
NameTypeDescription
idrequiredstring
editedAtrequiredstringISO 8601 timestamp (UTC)
Example
curl -X PATCH 'https://incantory.ai/api/v1/comments/{id}' \
  -H "Authorization: Bearer $INCANTORY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"body":"body"}'

Delete a comment (author or moderator; replies stay)

DELETE/api/v1/comments/{id}Token required

deleteComment parameters
NameTypeDescription
id pathrequiredstringId

Responses: 204 OK400, 401, 403, 404, 429

Example
curl -X DELETE 'https://incantory.ai/api/v1/comments/{id}' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"

Hide a comment (moderators)

POST/api/v1/comments/{id}/hideToken required

hideComment parameters
NameTypeDescription
id pathrequiredstringId

Request body (optional)

hideComment body fields
NameTypeDescription
reasonstring

Responses: 200 OK400, 401, 403, 404, 429

Response fields
hideComment response fields
NameTypeDescription
hiddenrequiredtrue
changedrequiredboolean
Example
curl -X POST 'https://incantory.ai/api/v1/comments/{id}/hide' \
  -H "Authorization: Bearer $INCANTORY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{}'

Unhide a comment (moderators); publishes a held comment

DELETE/api/v1/comments/{id}/hideToken required

unhideComment parameters
NameTypeDescription
id pathrequiredstringId

Responses: 200 OK400, 401, 403, 404, 429

Response fields
unhideComment response fields
NameTypeDescription
hiddenrequiredfalse
changedrequiredboolean
Example
curl -X DELETE 'https://incantory.ai/api/v1/comments/{id}/hide' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"

Lock or unlock a thread (owner or moderator)

PUT/api/v1/comments/lockToken required

Request body

lockThread body fields
NameTypeDescription
targetTyperequired"prompt" | "prompt_version" | "make" | "post" | "change_request"
targetIdrequiredstring
lockedrequiredboolean
reasonstring

Responses: 200 OK400, 401, 403, 404, 429

Response fields
lockThread response fields
NameTypeDescription
lockedrequiredboolean
lockedAtrequiredstring | null
Example
curl -X PUT 'https://incantory.ai/api/v1/comments/lock' \
  -H "Authorization: Bearer $INCANTORY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"targetType":"prompt","targetId":"targetId","locked":true}'

@handle autocomplete

GET/api/v1/comments/mentionsToken optional

Users whose handle starts with q, excluding anyone in a block with you. Empty when signed out.

mentionSuggestions parameters
NameTypeDescription
q querystring

Responses: 200 OK400, 404, 429

Response fields
mentionSuggestions response fields
NameTypeDescription
itemsrequiredobject[]
Example
curl 'https://incantory.ai/api/v1/comments/mentions' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"