Support Ticket Messages

Base URL: https://api.cornerspot.net

Authentication: requests use a bearer token, for example Authorization: Bearer YOUR_API_KEY.

Post a message to a support ticket

POST /c/api/v1/support/tickets/{ticket_id}/messages

Appends a text-only message to a support ticket. The message is attributed to the API key owner's team membership. visibility defaults to public; only internal notes are restricted to team members. Requires the support_tickets_write scope and the Support Tickets module.

Path parameters

FIELDTYPEDESCRIPTION
ticket_idstring · requiredThe support ticket id the message is posted to.

Request body

FIELDTYPEDESCRIPTION
messageobject · required
message.bodystring · requiredRequired — the plain-text message body (max 50,000 characters).
message.visibilitystring
one of public, internal
public (default) is visible to the requester; internal is a team-only note.

Code samples

curl --request POST \
  --url 'https://api.cornerspot.net/c/api/v1/support/tickets/1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d/messages' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
  "message": {
    "body": "string",
    "visibility": "public"
  }
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/support/tickets/1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "message": {
      "body": "string",
      "visibility": "public"
    }
  })
});

const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/support/tickets/1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    "message": {
      "body": "string",
      "visibility": "public"
    }
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);
import json
import urllib.request

url = "https://api.cornerspot.net/c/api/v1/support/tickets/1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d/messages"
payload = json.dumps({
  "message": {
    "body": "string",
    "visibility": "public"
  }
}).encode("utf-8")
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

request = urllib.request.Request(url, data=payload, headers=headers, method="POST")

with urllib.request.urlopen(request) as response:
    data = json.loads(response.read().decode("utf-8"))
    print(data)
require "json"
require "net/http"

uri = URI("https://api.cornerspot.net/c/api/v1/support/tickets/1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d/messages")

request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
  "message": {
    "body": "string",
    "visibility": "public"
  }
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end

puts JSON.parse(response.body)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/support/tickets/1f2e3d4c-5b6a-4789-9c0d-1e2f3a4b5c6d/messages',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_API_KEY',
    ],
    CURLOPT_POSTFIELDS => json_encode([
    'message' => [
        'body' => 'string',
        'visibility' => 'public',
    ],
]),
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
print_r($data);

Responses

STATUSDESCRIPTION
201 Createdmessage posted
401 Unauthorizedmissing or invalid API key
402 Payment Requiredthe team's plan does not include support tickets
403 Forbiddenthe key lacks the support_tickets_write scope
404 Not Foundno such ticket in this team
422 Unprocessable Contentvalidation error

Was this article helpful?