Webhooks
Webhook Events
โ† Back to Grahm AI
โ† Back to Grahm AI

Grahm AI API

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.

๐Ÿ”‘
API Key Auth
Bearer token authentication via Supabase
๐Ÿ“ก
REST + JSON
Standard HTTP methods with JSON request/response
โšก
Realtime
WebSocket subscriptions for live updates

Base URL

https://hhcgkdpyytfdjdsubjvp.supabase.co/rest/v1

Edge Functions URL

https://hhcgkdpyytfdjdsubjvp.supabase.co/functions/v1

Authentication

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.

Headers
apikey: your_supabase_anon_key Authorization: Bearer your_access_token Content-Type: application/json Prefer: return=representation
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 token curl -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"}'

Rate Limits

API requests are rate limited per user. Current limits:

PlanRequests/minAI Calls/month
Free6010
Pro300Unlimited
Business600Unlimited
Enterprise Gold1200Unlimited

Error Handling

The API returns standard HTTP status codes. Error responses include a JSON body with an error field.

CodeMeaning
200Success
201Created
400Bad request โ€” check parameters
401Unauthorized โ€” invalid or missing token
403Forbidden โ€” insufficient permissions
404Not found
429Rate limited โ€” slow down
500Server error

List Tickets

GET /gt_tickets?board_id=eq.{board_id}
Retrieve all tickets for a board. Supports filtering, sorting, and pagination via query parameters.

Query Parameters

ParameterTypeDescription
board_iduuidrequiredFilter by board ID
statusstringFilter by status (eq.New, eq.Resolved, etc.)
prioritystringFilter by priority (eq.Critical, eq.High, etc.)
orderstringSort field (e.g. created_at.desc)
limitintegerMax results (default: 100)
cURL
JavaScript
curl 'https://hhcgkdpyytfdjdsubjvp.supabase.co/rest/v1/gt_tickets?board_id=eq.YOUR_BOARD_ID&order=created_at.desc&limit=50' \ -H 'apikey: YOUR_ANON_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'

Create Ticket

POST /gt_tickets
Create a new ticket on a board.

Body Parameters

FieldTypeDescription
board_iduuidrequiredBoard to create ticket on
titlestringrequiredTicket title/subject
descriptionstringDetailed description
prioritystringCritical, High, Medium, Low (default: Medium)
categorystringHardware, Software, Network, Access, Account, General
requester_namestringName of the person requesting
requester_emailstringEmail for notifications
assignee_namestringAssign to a team member
sourcestringmanual, form, email, api, csv (default: api)
cURL
JavaScript
Python
curl -X POST 'https://hhcgkdpyytfdjdsubjvp.supabase.co/rest/v1/gt_tickets' \ -H 'apikey: YOUR_ANON_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Prefer: return=representation' \ -d '{ "board_id": "YOUR_BOARD_ID", "title": "VPN not connecting", "description": "Cannot connect to VPN from home office", "priority": "High", "category": "Network", "requester_name": "John Doe", "requester_email": "john@company.com", "source": "api" }'

Update Ticket

PATCH /gt_tickets?id=eq.{ticket_id}
Update ticket fields. Only send the fields you want to change.
curl -X PATCH 'https://hhcgkdpyytfdjdsubjvp.supabase.co/rest/v1/gt_tickets?id=eq.TICKET_ID' \ -H 'apikey: YOUR_ANON_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Prefer: return=representation' \ -d '{"status":"Resolved","priority":"Low"}'

Delete Ticket

DELETE /gt_tickets?id=eq.{ticket_id}
Permanently delete a ticket and all associated comments, activity, and attachments.
curl -X DELETE 'https://hhcgkdpyytfdjdsubjvp.supabase.co/rest/v1/gt_tickets?id=eq.TICKET_ID' \ -H 'apikey: YOUR_ANON_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'

Get Ticket

GET /gt_tickets?id=eq.{ticket_id}
Retrieve a single ticket by ID.
curl 'https://hhcgkdpyytfdjdsubjvp.supabase.co/rest/v1/gt_tickets?id=eq.TICKET_ID&select=*' \ -H 'apikey: YOUR_ANON_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'

List Comments

GET /gt_ticket_comments?ticket_id=eq.{ticket_id}
Get all comments for a ticket, ordered by creation time.

Add Comment

POST /gt_ticket_comments
Add a comment to a ticket.
FieldTypeDescription
ticket_iduuidrequiredTicket to comment on
bodystringrequiredComment text
is_internalbooleanInternal 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.
curl -X POST 'https://hhcgkdpyytfdjdsubjvp.supabase.co/functions/v1/ai-proxy' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "action": "ticket-to-sop", "title": "VPN Connection Troubleshooting", "description": "Steps to fix VPN connectivity issues...", "comments": [{"author":"Agent","body":"Restarted VPN service..."}] }'

Webhook Events

Configure webhooks in Grahm Tickets โ†’ Webhooks button to receive real-time notifications. Supports Slack, Microsoft Teams, Discord, and custom endpoints.

EventTriggerPayload Includes
ticket_createdNew ticket createdFull ticket object
status_changedTicket status updatedTicket + old/new status
assignedAssignee changedTicket + old/new assignee
sla_breachSLA deadline exceededTicket + SLA details
comment_addedNew comment postedTicket + comment body
ticket_resolvedStatus set to ResolvedFull 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.
curl -X POST 'https://hhcgkdpyytfdjdsubjvp.supabase.co/functions/v1/public-ticket-submit' \ -H 'Content-Type: application/json' \ -d '{"action":"lookup","email":"jane@company.com"}'

API Playground

Test API calls directly from this page. Enter your credentials and try it out.

๐Ÿงช Try It Live

Need help? Contact grahm.ai001@gmail.com

ยฉ 2026 Grahm AI. All rights reserved.