curl --request POST \
--url https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "Re-inspected: the crack has not moved."
}
'import requests
url = "https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments"
payload = { "body": "Re-inspected: the crack has not moved." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({body: JSON.stringify('Re-inspected: the crack has not moved.')})
};
fetch('https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments', 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://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments",
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([
'body' => 'Re-inspected: the crack has not moved.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments"
payload := strings.NewReader("{\n \"body\": \"Re-inspected: the crack has not moved.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"Re-inspected: the crack has not moved.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"Re-inspected: the crack has not moved.\"\n}"
response = http.request(request)
puts response.read_body{
"note": "Re-inspected: the crack has not moved.",
"author": "inspector@example.com",
"time": "2026-09-09T13:04:12.652Z",
"public": true,
"attachments": [],
"allowedUsers": []
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}Add a comment to a ticket
Appends a comment to a ticket. It shows up in the ticket’s timeline in the Ed Controls apps, attributed to the token’s user.
This is a separate endpoint rather than a field on PATCH because it is purely
additive — nothing already on the ticket is overwritten. comments is not on
the PATCH whitelist, so a comment sent through PATCH answers 200 and stores
nothing.
The request body is a closed schema: {"body": "..."} and nothing else. The
stored field is called note, which makes {"note": "..."} the wrong guess a
caller makes most often — it is rejected with 422 naming the field rather than
silently ignored. author, time, public, attachments and allowedUsers are
refused for the same reason: the server takes the author from the token, stamps the
time, and writes the timeline entry that makes the comment visible.
Optimistic concurrency: pass the ticket’s current _rev in an optional If-Match
header. On a stale value the request fails with 409 and nothing is written; omit
the header and the latest revision is read.
Who may comment: anyone who may update the ticket — Accountable or Support on the
project, the project’s Consulted and Informed, and the ticket’s own Responsible or
assignees — plus the ticket’s author, in any state. That is deliberately wider
than PATCH: a comment cannot overwrite anything, and someone who raised a ticket
needs to be able to answer a question about it once work has started.
curl --request POST \
--url https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "Re-inspected: the crack has not moved."
}
'import requests
url = "https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments"
payload = { "body": "Re-inspected: the crack has not moved." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({body: JSON.stringify('Re-inspected: the crack has not moved.')})
};
fetch('https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments', 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://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments",
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([
'body' => 'Re-inspected: the crack has not moved.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments"
payload := strings.NewReader("{\n \"body\": \"Re-inspected: the crack has not moved.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"Re-inspected: the crack has not moved.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/tickets/{database}/{ticketId}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"Re-inspected: the crack has not moved.\"\n}"
response = http.request(request)
puts response.read_body{
"note": "Re-inspected: the crack has not moved.",
"author": "inspector@example.com",
"time": "2026-09-09T13:04:12.652Z",
"public": true,
"attachments": [],
"allowedUsers": []
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}Authorizations
Headers
Path Parameters
Body
A closed schema: body is the only accepted key. Any other key — including
note, author, time, public, attachments and allowedUsers, all of which
appear on the stored comment — is rejected with 422 naming it, rather than
ignored. The author and the timestamp come from the token and the server clock.
Response
The stored comment.
A comment as stored on the ticket, and as returned by
POST /tickets/{database}/{ticketId}/comments. The same six fields appear in the
comments array of a ticket read.
