Supportly
SupportlyDocs
/

Getting Started

Getting Started

Widget Integration

Widget Integration

AI Configuration

AI Configuration

API Reference

API ReferenceAPI Playground

Team Management

Team Management

Billing

Billing

FAQ / Troubleshooting

FAQ & Troubleshooting
Get started free
SupportlyDocs

API Reference

API Reference

Supportly exposes authenticated operator APIs under /api/* plus widget-facing public endpoints authenticated with API keys and session tokens. Every route returns a standardized success or error envelope.

Standard response format

Success and error envelopes

success.jsonjson
1{
2 "success": true,
3 "data": {}
4}

Dashboard APIs use Clerk authentication and usually require the x-workspace-id header. Widget APIs use API keys and short-lived session tokens depending on the route.

GET /api/ai/models returns the combined model catalog: standard-provider models plus managed Pro presets. GET and PUT /api/ai/config include fallbackModel and allowModelFallback alongside the primary model selection.

Endpoint inventory

DomainEndpoints
Auth & onboardingPOST /api/webhooks/clerk, GET /api/onboarding, PUT /api/onboarding
WorkspacesGET /api/workspaces, POST /api/workspaces, GET/PATCH/DELETE /api/workspaces/[workspaceId]
AIGET/PUT /api/ai/config, GET /api/ai/models, POST /api/ai/chat
Knowledge baseGET/POST /api/knowledge-base, PUT/DELETE /api/knowledge-base/[itemId], POST /api/knowledge-base/upload
WidgetGET /api/widget/config/[apiKey], POST /api/widget/session, POST /api/widget/chat, POST /api/widget/transcript
ConversationsGET /api/conversations, GET /api/conversations/[conversationId], GET/POST /api/conversations/[conversationId]/messages
TicketsGET/POST /api/tickets, GET/PATCH /api/tickets/[ticketId], POST /api/tickets/[ticketId]/assign, GET/POST /api/tickets/[ticketId]/notes, POST /api/tickets/bulk
TeamGET /api/team, POST /api/team/invite, GET /api/team/invitations, POST /api/team/invitations/[invitationId], PATCH/DELETE /api/team/[memberId]
NotificationsGET /api/notifications, PATCH /api/notifications/[notificationId], POST /api/notifications/mark-all-read, GET/PUT /api/notifications/preferences
AnalyticsGET /api/analytics/overview, GET /api/analytics/tickets, POST /api/analytics/export
API keysGET/POST /api/api-keys, POST /api/api-keys/[keyId]/rotate, DELETE /api/api-keys/[keyId]
Taxonomy & SLAGET/POST /api/categories, DELETE /api/categories/[categoryId], GET/POST /api/tags, DELETE /api/tags/[tagId], GET/PUT /api/sla
UploadsPOST /api/upload
This list mirrors the current API contracts defined for the Supportly MVP.

Request and response examples

Create a ticket

Authenticated operator route example.

create-ticket.shbash
1curl -X POST "https://your-supportly-domain.com/api/tickets" -H "Content-Type: application/json" -H "x-workspace-id: 2e369db2-3ae8-4590-a59f-8c2777d0f43b" -H "Authorization: Bearer <clerk-session>" -d '{
2 "priority": "high",
3 "customerName": "Noura Ahmed",
4 "customerEmail": "noura@example.com",
5 "tagIds": ["b4a95cf9-661d-4c06-9f24-199f32613df1"]
6 }'

Fetch widget configuration

Public widget route example.

widget-config.shbash
1curl "https://your-supportly-domain.com/api/widget/config/ws_live_xxxxxxxxx"

Auth and workspace context

SurfaceAuthWorkspace resolution
Dashboard routesClerk sessionx-workspace-id header validated against membership
Widget configAPI key in the URL pathResolved from API key
Widget session and transcriptAPI key header plus session token when requiredResolved from API key and conversation state
Internal AI routeInternal callerExplicit workspaceId in payload

One-time secret visibility

Full API keys are returned only when created or rotated. After that, Supportly exposes only the display prefix and revocation metadata.

Previous

AI Configuration

Next

Team Management

On this page

Standard response formatEndpoint inventoryRequest and response examplesAuth and workspace context