Create a comment
Post a new comment on a feedback post, optionally as a reply to an existing comment.
Creates a new comment on a feedback post. If you pass parent_id, the new comment is a reply attached to that parent — replies must reference a comment on the same post.
Comments created via the public API are always saved with moderation_status_code = "accepted" (i.e. they're not held for moderation).
Not supported in v1. Canny's image_urls and internal flag on comment creation are accepted on the wire (Pydantic ignores extra fields) but are not yet stored. Roll out for these fields is tracked in the schema-change phase of the public API rollout.
Endpoint
POST https://api.productbridge.io/api/external/v1/comments/create
Arguments
Your organization's public API key. See Authentication.
UUID of the post to comment on. Must belong to your organization.
The comment body. 1–2500 characters.
UUID of an existing comment on the same post, when replying. Validated to belong to the same feedback_post_id.
Visibility level. Defaults to "public". Use a non-public value to mark internal-only notes.
Returns
A JSON object with the new comment's id.
{ "id": "ee3c3ef8-b8cd-cd15-01ba-comment000099" }
Example request
curl -X POST https://api.productbridge.io/api/external/v1/comments/create \
-H 'Content-Type: application/json' \
-d '{
"api_key": "pb_YOUR_PUBLIC_API_KEY",
"feedback_post_id": "aa3c3ef8-b8cd-cd15-01ba-postpost0001",
"author_id": "bb3c3ef8-b8cd-cd15-01ba-useruser0001",
"value": "Looking forward to this — quick question, will it work on mobile?"
}'
const res = await fetch(
"https://api.productbridge.io/api/external/v1/comments/create",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
api_key: process.env.PRODUCTBRIDGE_API_KEY,
feedback_post_id: "aa3c3ef8-b8cd-cd15-01ba-postpost0001",
author_id: "bb3c3ef8-b8cd-cd15-01ba-useruser0001",
value: "Looking forward to this — quick question, will it work on mobile?",
}),
}
);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { id } = await res.json();
import os, httpx
resp = httpx.post(
"https://api.productbridge.io/api/external/v1/comments/create",
json={
"api_key": os.environ["PRODUCTBRIDGE_API_KEY"],
"feedback_post_id": "aa3c3ef8-b8cd-cd15-01ba-postpost0001",
"author_id": "bb3c3ef8-b8cd-cd15-01ba-useruser0001",
"value": "Looking forward to this — quick question, will it work on mobile?",
},
)
resp.raise_for_status()
new_id = resp.json()["id"]
Example response
{
"id": "ee3c3ef8-b8cd-cd15-01ba-comment000099"
}
Errors
| Status | Body | Cause |
|---|---|---|
401 | {"detail":{"error":"invalid api_key"}} | Missing / unknown / inactive api_key. |
400 | {"detail":{"error":"parent comment must belong to the same post"}} | parent_id references a comment on a different post. |
404 | {"detail":{"error":"feedback post not found"}} | The feedback_post_id doesn't exist or belongs to another organization. |
422 | Validation error envelope | value length out of bounds (1–2500), missing required fields. |
See Errors for the full envelope shape.
Last updated 2 weeks ago
Built with Documentation.AI