Delete a record comment
Collaboration is feature-gated and scoped to accessible task, donor, recipient, sponsorship or space_page records in the organization. Archived subjects are read-only409; Support Sessions cannot write. Editing comments requires authorship; pinning requires management access. Revisions and request UUIDs protect concurrent edits. Downloads require a safe scan and existing stored bytes.
curl --request DELETE \
--url https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"revision": 1
}'import requests
url = "https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}"
payload = { "revision": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({revision: 1})
};
fetch('https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}', 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.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'revision' => 1
]),
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://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}"
payload := strings.NewReader("{\n \"revision\": 1\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"revision\": 1\n}"
response = http.request(request)
puts response.read_body{
"message": "Operation completed successfully."
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"message": "<string>",
"code": "<string>",
"data": {
"comment": {
"id": 123,
"body": "<string>",
"revision": 123,
"idempotency_key": "<string>",
"pinned": true,
"pinned_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"body_document": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Please review the updated trip details."
}
]
}
]
},
"author": {
"id": 123,
"name": "<string>"
},
"mentions": [
{
"user_id": 123,
"name": "<string>",
"email": "<string>"
}
],
"attachments": [
{
"id": 123,
"name": "<string>",
"mime": "<string>",
"size": 123,
"status": "<string>",
"comment_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"permissions": {
"delete": true
}
}
],
"permissions": {
"edit": true,
"delete": true,
"pin": true
}
}
}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Supported collaboration subject type.
ID of the accessible collaboration subject.
Commentid.
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: required|integer|min:1.
x >= 11
Response
Delete a record comment response.
"Operation completed successfully."
curl --request DELETE \
--url https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"revision": 1
}'import requests
url = "https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}"
payload = { "revision": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({revision: 1})
};
fetch('https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}', 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.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'revision' => 1
]),
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://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}"
payload := strings.NewReader("{\n \"revision\": 1\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/collaboration/{subjectType}/{subjectId}/comments/{commentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"revision\": 1\n}"
response = http.request(request)
puts response.read_body{
"message": "Operation completed successfully."
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"message": "<string>",
"code": "<string>",
"data": {
"comment": {
"id": 123,
"body": "<string>",
"revision": 123,
"idempotency_key": "<string>",
"pinned": true,
"pinned_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"body_document": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Please review the updated trip details."
}
]
}
]
},
"author": {
"id": 123,
"name": "<string>"
},
"mentions": [
{
"user_id": 123,
"name": "<string>",
"email": "<string>"
}
],
"attachments": [
{
"id": 123,
"name": "<string>",
"mime": "<string>",
"size": 123,
"status": "<string>",
"comment_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"permissions": {
"delete": true
}
}
],
"permissions": {
"edit": true,
"delete": true,
"pin": true
}
}
}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}