Create comment
curl --request POST \
--url https://api.surefeedback.com/api/v1/comments/create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"user": {},
"user.org_id": "<string>",
"user.name": "<string>",
"user.role": "<string>",
"site": {},
"site.site_id": "<string>",
"site.domain": "<string>",
"comment": {},
"comment.content": "<string>",
"comment.priority": "<string>",
"context": {},
"context.page_url": "<string>",
"context.timestamp": "<string>"
}
'import requests
url = "https://api.surefeedback.com/api/v1/comments/create"
payload = {
"user": {},
"user.org_id": "<string>",
"user.name": "<string>",
"user.role": "<string>",
"site": {},
"site.site_id": "<string>",
"site.domain": "<string>",
"comment": {},
"comment.content": "<string>",
"comment.priority": "<string>",
"context": {},
"context.page_url": "<string>",
"context.timestamp": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: {},
'user.org_id': '<string>',
'user.name': '<string>',
'user.role': '<string>',
site: {},
'site.site_id': '<string>',
'site.domain': '<string>',
comment: {},
'comment.content': '<string>',
'comment.priority': '<string>',
context: {},
'context.page_url': '<string>',
'context.timestamp': '<string>'
})
};
fetch('https://api.surefeedback.com/api/v1/comments/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surefeedback.com/api/v1/comments/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user' => [
],
'user.org_id' => '<string>',
'user.name' => '<string>',
'user.role' => '<string>',
'site' => [
],
'site.site_id' => '<string>',
'site.domain' => '<string>',
'comment' => [
],
'comment.content' => '<string>',
'comment.priority' => '<string>',
'context' => [
],
'context.page_url' => '<string>',
'context.timestamp' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surefeedback.com/api/v1/comments/create"
payload := strings.NewReader("{\n \"user\": {},\n \"user.org_id\": \"<string>\",\n \"user.name\": \"<string>\",\n \"user.role\": \"<string>\",\n \"site\": {},\n \"site.site_id\": \"<string>\",\n \"site.domain\": \"<string>\",\n \"comment\": {},\n \"comment.content\": \"<string>\",\n \"comment.priority\": \"<string>\",\n \"context\": {},\n \"context.page_url\": \"<string>\",\n \"context.timestamp\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.surefeedback.com/api/v1/comments/create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {},\n \"user.org_id\": \"<string>\",\n \"user.name\": \"<string>\",\n \"user.role\": \"<string>\",\n \"site\": {},\n \"site.site_id\": \"<string>\",\n \"site.domain\": \"<string>\",\n \"comment\": {},\n \"comment.content\": \"<string>\",\n \"comment.priority\": \"<string>\",\n \"context\": {},\n \"context.page_url\": \"<string>\",\n \"context.timestamp\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surefeedback.com/api/v1/comments/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {},\n \"user.org_id\": \"<string>\",\n \"user.name\": \"<string>\",\n \"user.role\": \"<string>\",\n \"site\": {},\n \"site.site_id\": \"<string>\",\n \"site.domain\": \"<string>\",\n \"comment\": {},\n \"comment.content\": \"<string>\",\n \"comment.priority\": \"<string>\",\n \"context\": {},\n \"context.page_url\": \"<string>\",\n \"context.timestamp\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Comment created successfully",
"data": {
"comment": {
"id": "990e8400-e29b-41d4-a716-446655440004",
"content": "The header looks misaligned on mobile.",
"status": "OPEN",
"priority": "HIGH",
"page_url": "https://example.com/home",
"created_at": "2026-03-02T12:00:00Z"
}
}
}
Comments
Create comment
Create a new comment on a page.
POST
/
comments
/
create
Create comment
curl --request POST \
--url https://api.surefeedback.com/api/v1/comments/create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"user": {},
"user.org_id": "<string>",
"user.name": "<string>",
"user.role": "<string>",
"site": {},
"site.site_id": "<string>",
"site.domain": "<string>",
"comment": {},
"comment.content": "<string>",
"comment.priority": "<string>",
"context": {},
"context.page_url": "<string>",
"context.timestamp": "<string>"
}
'import requests
url = "https://api.surefeedback.com/api/v1/comments/create"
payload = {
"user": {},
"user.org_id": "<string>",
"user.name": "<string>",
"user.role": "<string>",
"site": {},
"site.site_id": "<string>",
"site.domain": "<string>",
"comment": {},
"comment.content": "<string>",
"comment.priority": "<string>",
"context": {},
"context.page_url": "<string>",
"context.timestamp": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: {},
'user.org_id': '<string>',
'user.name': '<string>',
'user.role': '<string>',
site: {},
'site.site_id': '<string>',
'site.domain': '<string>',
comment: {},
'comment.content': '<string>',
'comment.priority': '<string>',
context: {},
'context.page_url': '<string>',
'context.timestamp': '<string>'
})
};
fetch('https://api.surefeedback.com/api/v1/comments/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surefeedback.com/api/v1/comments/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user' => [
],
'user.org_id' => '<string>',
'user.name' => '<string>',
'user.role' => '<string>',
'site' => [
],
'site.site_id' => '<string>',
'site.domain' => '<string>',
'comment' => [
],
'comment.content' => '<string>',
'comment.priority' => '<string>',
'context' => [
],
'context.page_url' => '<string>',
'context.timestamp' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.surefeedback.com/api/v1/comments/create"
payload := strings.NewReader("{\n \"user\": {},\n \"user.org_id\": \"<string>\",\n \"user.name\": \"<string>\",\n \"user.role\": \"<string>\",\n \"site\": {},\n \"site.site_id\": \"<string>\",\n \"site.domain\": \"<string>\",\n \"comment\": {},\n \"comment.content\": \"<string>\",\n \"comment.priority\": \"<string>\",\n \"context\": {},\n \"context.page_url\": \"<string>\",\n \"context.timestamp\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.surefeedback.com/api/v1/comments/create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {},\n \"user.org_id\": \"<string>\",\n \"user.name\": \"<string>\",\n \"user.role\": \"<string>\",\n \"site\": {},\n \"site.site_id\": \"<string>\",\n \"site.domain\": \"<string>\",\n \"comment\": {},\n \"comment.content\": \"<string>\",\n \"comment.priority\": \"<string>\",\n \"context\": {},\n \"context.page_url\": \"<string>\",\n \"context.timestamp\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surefeedback.com/api/v1/comments/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {},\n \"user.org_id\": \"<string>\",\n \"user.name\": \"<string>\",\n \"user.role\": \"<string>\",\n \"site\": {},\n \"site.site_id\": \"<string>\",\n \"site.domain\": \"<string>\",\n \"comment\": {},\n \"comment.content\": \"<string>\",\n \"comment.priority\": \"<string>\",\n \"context\": {},\n \"context.page_url\": \"<string>\",\n \"context.timestamp\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Comment created successfully",
"data": {
"comment": {
"id": "990e8400-e29b-41d4-a716-446655440004",
"content": "The header looks misaligned on mobile.",
"status": "OPEN",
"priority": "HIGH",
"page_url": "https://example.com/home",
"created_at": "2026-03-02T12:00:00Z"
}
}
}
Creates a new comment associated with a page on a site. Typically used by the widget, but can also be called from server-side integrations.
Requires authentication. The user must have access to the site.
Request body
object
required
Information about the user creating the comment.
string
required
UUID of the organisation the comment belongs to.
string
Display name for the user creating the comment.
string
User role, for example
admin, member, or guest.object
required
Information about the site the comment belongs to.
string
required
UUID of the site.
string
required
Site domain, for example
example.com.object
required
Comment payload.
string
required
Comment text content.
string
Priority level:
LOW, MEDIUM, or HIGH. Default: MEDIUM.object
required
Page context for the comment.
string
required
Full URL of the page the comment is on.
string
required
ISO 8601 timestamp in UTC, for example
2026-03-25T11:36:24.000Z.{
"success": true,
"message": "Comment created successfully",
"data": {
"comment": {
"id": "990e8400-e29b-41d4-a716-446655440004",
"content": "The header looks misaligned on mobile.",
"status": "OPEN",
"priority": "HIGH",
"page_url": "https://example.com/home",
"created_at": "2026-03-02T12:00:00Z"
}
}
}
Was this page helpful?
⌘I