Start here
Ask for help from the desktop
/v1/support/ticketson https://api.auray.ai/v1File a support request as the person signed in: whether something is not working or they need help, the app they asked from, and what they wrote.
File a support request as the person signed in: whether something is not working or they need help, the app they asked from, and what they wrote. It is filed at once, with no confirmation mail because the sign-in is the proof, under the account's own email address, which is read off the account and never off the request; we mail the reference and a status link there, and our answers arrive there and in the desktop's Messages app. Called by the desktop for the person signed in; a key you hold is refused 403 support_session_only, since it is not the person asking. Without the desktop, the help form (POST /support/requests) needs no key at all.
#Authentication
Authorization: Bearer auray_sk_… — The desktop's own session key, signed in — a key you hold is refused 403 support_session_only. Without the desktop, the help form needs no key.
#Request
#Body
application/json, required.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
kind | string | yes | — | problem — something is not working; question — help with how to do something; appeal — a decision about the account or its work the person thinks is wrong (a limit on the account, a refused result, a report upheld against their work), which waits for our trust and safety team. A limited account may file and answer requests, an appeal among them. One of "problem", "question", "appeal". |
app | string | no | — | The desktop app it is about, as the desktop names its apps. Optional; one this API does not know files the request naming none. One of "photos", "video", "music", "threed", "studio", "community", "explore", "code", "messages", "finder", "settings". |
subject | string | no | — | One line. Optional: absent, it is the app and the kind — Photos — Something isn't working. 1 to 300 characters. |
message | string | yes | — | Secrets are removed from this before it is stored, as the help form's are. 1 to 20000 characters. |
meta | object | no | — | What the client can say about itself. Only these keys are kept, each held to its shape; anything else is dropped. |
meta.viewport | string | no | — | |
meta.app_version | string | no | — | 0 to 32 characters. |
meta.source_sha | string | no | — | |
meta.job_id | string | no | — | A job the request is about. Kept instead of request_id when both are sent. 0 to 128 characters. |
meta.request_id | string | no | — | 0 to 128 characters. |
meta.appeal_of | string | no | — | What an appeal disputes: the limit on the account, a refused result or a report about the person's work. Kept only when kind is appeal. One of "limit", "refusal", "report". |
meta.appeal_id | string | no | — | The reference of the decision an appeal disputes — a refused result's job. Kept only beside appeal_of. |
#Example request
curl -X POST https://api.auray.ai/v1/support/tickets \
-H "Authorization: Bearer $AURAY_API_KEY" \
-H "content-type: application/json" \
-d '{
"kind": "problem",
"message": "…"
}'const res = await fetch("https://api.auray.ai/v1/support/tickets", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AURAY_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
"kind": "problem",
"message": "…"
}),
});
console.log(await res.json());import os, requests
r = requests.post(
"https://api.auray.ai/v1/support/tickets",
headers={"Authorization": f"Bearer {os.environ['AURAY_API_KEY']}"},
json={
"kind": "problem",
"message": "…"
},
)
r.raise_for_status()
print(r.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"kind": "problem",
"message": "…"
}`)
req, err := http.NewRequest("POST", "https://api.auray.ai/v1/support/tickets", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AURAY_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}<?php
$ch = curl_init("https://api.auray.ai/v1/support/tickets");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AURAY_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"kind" => "problem",
"message" => "…",
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
require "json"
uri = URI("https://api.auray.ai/v1/support/tickets")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("AURAY_API_KEY")}"
req["Content-Type"] = "application/json"
req.body = {
"kind" => "problem",
"message" => "…"
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, res.bodyimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"kind": "problem",
"message": "…"
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/support/tickets"))
.header("Authorization", "Bearer " + System.getenv("AURAY_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AURAY_API_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.auray.ai/v1/support/tickets");
var body = """
{
"kind": "problem",
"message": "…"
}
""";
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");#Responses
#201 Created
Filed.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
object | string | yes | — | One of "support_ticket". |
reference | string | yes | — | |
status | string | yes | — | One of "new". |
Headers:
| Header | Description |
|---|---|
RateLimit-Limit | Burst capacity. |
RateLimit-Remaining | |
RateLimit-Reset | Seconds until refill. |
X-Request-Id |
#400 Bad Request
invalid_kind, support_subject_invalid, support_message_invalid, support_email_invalid (the account has no address we can reply to), invalid_body or invalid_json.
The error body: error, message, docs (the entry that explains it) and request_id.
#401 Unauthorized
missing_authorization, invalid_api_key, key_revoked or key_expired.
The error body: error, message, docs (the entry that explains it) and request_id.
#403 Forbidden
support_session_only — this is the desktop's door.
The error body: error, message, docs (the entry that explains it) and request_id.
#413 Payload Too Large
body_too_large — the body must be at most 65536 bytes.
The error body: error, message, docs (the entry that explains it) and request_id.
#429 Too Many Requests
support_rate_limited — this account's address has sent several requests just now — or rate_limited, the key's write bucket.
The error body: error, message, docs (the entry that explains it) and request_id.
#503 Service Unavailable
support_disabled, support_not_configured, support_closed or support_unavailable.
The error body: error, message, docs (the entry that explains it) and request_id.
#Status codes
| Status | Meaning |
|---|---|
201 | Filed. |
400 | invalid_kind, support_subject_invalid, support_message_invalid, support_email_invalid (the account has no address we can reply to), invalid_body or invalid_json. |
401 | missing_authorization, invalid_api_key, key_revoked or key_expired. |
403 | support_session_only — this is the desktop's door. |
413 | body_too_large — the body must be at most 65536 bytes. |
429 | support_rate_limited — this account's address has sent several requests just now — or rate_limited, the key's write bucket. |
503 | support_disabled, support_not_configured, support_closed or support_unavailable. |
Every refusal names its code, and every code is explained at Errors.