Build integrations with Grahm AI's ticket management, SOP generation, and AI operations platform. The API uses REST conventions with JSON payloads and standard HTTP methods.
All API requests require two headers: an API key (apikey) and an authorization token (Authorization). Get these from your Grahm AI account settings or the Supabase dashboard.
Getting an access token: Use the Supabase Auth API to sign in with email/password or OAuth. The response includes an access_token you can use in the Authorization header. Tokens expire after 1 hour โ use the refresh_token to get a new one.
cURL
JavaScript
Python
# Get an access tokencurl -X POST 'https://hhcgkdpyytfdjdsubjvp.supabase.co/auth/v1/token?grant_type=password' \
-H 'apikey: YOUR_ANON_KEY' \
-H 'Content-Type: application/json' \
-d '{"email":"user@example.com","password":"your_password"}'
Get all comments for a ticket, ordered by creation time.
Add Comment
POST/gt_ticket_comments
Add a comment to a ticket.
Field
Type
Description
ticket_id
uuidrequired
Ticket to comment on
body
stringrequired
Comment text
is_internal
boolean
Internal note (hidden from portal)
AI Triage โ ENTERPRISE GOLD
POST/functions/v1/ai-proxy
Send a ticket for AI analysis. Returns suggested priority, category, sentiment, summary, and a draft reply.
curl -X POST 'https://hhcgkdpyytfdjdsubjvp.supabase.co/functions/v1/ai-proxy' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"action": "ticket-triage",
"title": "VPN not connecting",
"description": "Cannot connect from home office since this morning"
}'
Response
{
"priority": "High",
"category": "Network",
"sentiment": "Frustrated",
"summary": "User unable to connect to company VPN...",
"suggested_reply": "Hi, thank you for reporting this..."
}
Ticket โ SOP โ ENTERPRISE GOLD
POST/functions/v1/ai-proxy
Convert a resolved ticket into a Standard Operating Procedure (SOP) document.
Configure webhooks in Grahm Tickets โ Webhooks button to receive real-time notifications. Supports Slack, Microsoft Teams, Discord, and custom endpoints.
Event
Trigger
Payload Includes
ticket_created
New ticket created
Full ticket object
status_changed
Ticket status updated
Ticket + old/new status
assigned
Assignee changed
Ticket + old/new assignee
sla_breach
SLA deadline exceeded
Ticket + SLA details
comment_added
New comment posted
Ticket + comment body
ticket_resolved
Status set to Resolved
Full ticket object
Submit Ticket (Public)
Public endpoint for external ticket submission โ no authentication required. Used by the public intake form.
POST/functions/v1/public-ticket-submit
curl -X POST 'https://hhcgkdpyytfdjdsubjvp.supabase.co/functions/v1/public-ticket-submit' \
-H 'Content-Type: application/json' \
-d '{
"form_slug": "it-support",
"name": "Jane Doe",
"email": "jane@company.com",
"subject": "Printer not working",
"category": "Hardware",
"priority": "Medium",
"description": "The printer on the 3rd floor..."
}'
Portal Lookup (Public)
POST/functions/v1/public-ticket-submit
Look up tickets by requester email โ used by the customer portal.