Skip to main content

ServiceOS Helpdesk API

Base URL: https://helpdesk.ainative.studio
API Prefix: /api
Auth: AINative JWT Bearer or API Key (X-API-Key)
Swagger: helpdesk.ainative.studio/api-docs
Source: Private — AINative-Studio/service-os

ServiceOS is an AI-native helpdesk API built on ZeroDB. It provides 170+ endpoints covering the full support lifecycle — ticket management, workflow automation, SLA enforcement, CSAT surveys, QA scoring, semantic search, and real-time streaming. Designed for API and MCP consumption — no UI required.

Health Check
curl https://helpdesk.ainative.studio/health
# {"status":"ok","timestamp":"2026-06-13T22:26:14.052Z"}

Quick Start

1. Get an API Key

curl -X POST https://helpdesk.ainative.studio/api/organizations/YOUR_ORG_ID/api-keys \
-H "Content-Type: application/json" \
-H "x-org-id: YOUR_ORG_ID" \
-H "x-actor-id: admin" \
-H "x-actor-type: user" \
-d '{"name":"My App","scopes":["read:tickets","write:tickets"]}'

Save the returned key — it's only shown once.

2. Create a Ticket

curl -X POST https://helpdesk.ainative.studio/api/tickets \
-H "Content-Type: application/json" \
-H "x-org-id: YOUR_ORG_ID" \
-H "X-API-Key: sk_your_key_here" \
-d '{
"title": "Cannot login to dashboard",
"description": "User reports 500 error on login page",
"priority": "high",
"tags": ["login", "bug"]
}'

3. List Tickets

curl https://helpdesk.ainative.studio/api/tickets \
-H "x-org-id: YOUR_ORG_ID" \
-H "X-API-Key: sk_your_key_here"

Authentication

ServiceOS supports three auth methods (checked in order):

MethodHeaderUse Case
JWT BearerAuthorization: Bearer <jwt>Web apps using AINative login
API KeyX-API-Key: sk_...Server-to-server, MCP agents
Legacy Headersx-org-id + x-actor-idBackward compatibility

JWT tokens are obtained from POST https://api.ainative.studio/v1/auth/login and cached for 5 minutes.


Core API Endpoints

Tickets

MethodEndpointDescription
GET/api/ticketsList tickets (filter by status, priority)
POST/api/ticketsCreate ticket
GET/api/tickets/:idGet ticket by ID
PATCH/api/tickets/:idUpdate ticket status
POST/api/tickets/:id/cloneClone a ticket
POST/api/tickets/:id/mergeMerge duplicate tickets
GET/api/tickets/:id/merge-historyView merge record
PATCH/api/tickets/:id/classificationOverride AI classification

Internal Notes

MethodEndpointDescription
POST/api/tickets/:id/internal-notesAdd agent-only note
GET/api/tickets/:id/internal-notesList notes
PATCH/api/tickets/:id/internal-notes/:note_idEdit note
DELETE/api/tickets/:id/internal-notes/:note_idDelete note

Teams

MethodEndpointDescription
POST/api/organizations/:org_id/teamsCreate team
GET/api/organizations/:org_id/teamsList teams
GET/api/organizations/:org_id/teams/:idGet team
PUT/api/organizations/:org_id/teams/:idUpdate team
DELETE/api/organizations/:org_id/teams/:idDelete team

Queues

MethodEndpointDescription
POST/api/organizations/:org_id/queuesCreate queue
GET/api/organizations/:org_id/queuesList queues
POST/api/organizations/:org_id/queues/matchFind matching queues

Views (Saved Filters)

MethodEndpointDescription
POST/api/organizations/:org_id/viewsCreate saved view
GET/api/organizations/:org_id/viewsList views
GET/api/organizations/:org_id/views/:id/ticketsExecute view
GET/api/organizations/:org_id/views/:id/countCount matching tickets

Webhooks

MethodEndpointDescription
POST/api/v1/webhooksCreate webhook subscription
GET/api/v1/webhooksList webhooks
PATCH/api/v1/webhooks/:idUpdate webhook
DELETE/api/v1/webhooks/:idDelete webhook
POST/api/v1/webhooks/:id/testSend test payload

Webhooks deliver events with HMAC-SHA256 signatures in the X-ServiceOS-Signature header. Failed deliveries retry with exponential backoff (1s → 30s → 5m → 30m → 2h → 24h).

Workflows

MethodEndpointDescription
POST/api/workflowsCreate workflow
GET/api/workflowsList workflows
PATCH/api/workflows/:id/enableEnable workflow
PATCH/api/workflows/:id/disableDisable workflow

SLA Policies & Timers

MethodEndpointDescription
POST/api/sla/policiesCreate SLA policy
GET/api/sla/policiesList policies
POST/api/sla/timersCreate timer
POST/api/sla/timers/pausePause timer
POST/api/sla/timers/resumeResume timer
POST/api/sla/check-breachesCheck all active timers

CSAT Surveys

MethodEndpointDescription
POST/api/csat/requestSend CSAT survey
POST/api/csat/submitSubmit response
GET/api/csat/analyticsAggregated analytics
GET/api/csat/by-dimensionBreakdown by agent/team

Bulk Operations

MethodEndpointDescription
PATCH/api/bulk/ticketsBulk update (max 100)
DELETE/api/bulk/ticketsBulk close
POST/api/bulk/tickets/tagBulk add/remove tags

Supports dry_run: true to validate without executing.

Custom Fields

MethodEndpointDescription
POST/api/organizations/:org_id/custom-fieldsCreate field schema
GET/api/organizations/:org_id/custom-fieldsList fields
DELETE/api/organizations/:org_id/custom-fields/:idDelete field

Supports types: text, number, boolean, date, dropdown, multiselect, email, url.

Agent Presence

MethodEndpointDescription
POST/api/tickets/:id/presenceRegister viewing
GET/api/tickets/:id/presenceList viewers
DELETE/api/tickets/:id/presence/:agent_idStop viewing

In-memory, auto-expires after 5 minutes of inactivity.

Real-Time SSE

curl -N https://helpdesk.ainative.studio/api/v1/events/stream?org_id=YOUR_ORG_ID \
-H "X-API-Key: sk_your_key_here"

Events: ticket.updated, ticket.comment.added, sla.warning, keepalive (every 30s). Max 100 concurrent connections per org.


AI Features

Auto-Classification

Tickets are automatically classified on creation using Llama 3.3 70B:

{
"ai_classification": {
"topic": "billing",
"urgency": "high",
"sentiment": "negative",
"confidence": 0.92,
"classified_at": "2026-06-13T10:00:00Z"
}
}

Classification runs async (non-blocking). Override manually via PATCH /api/tickets/:id/classification.

curl -X POST https://helpdesk.ainative.studio/api/v1/semantic-search \
-H "Content-Type: application/json" \
-H "x-org-id: YOUR_ORG_ID" \
-d '{"query": "customer cannot access billing portal"}'

SDKs

Node.js / TypeScript

npm install @serviceos/sdk
import { ServiceOS } from "@serviceos/sdk";

const client = new ServiceOS({
apiKey: "sk_...",
orgId: "org_123",
baseUrl: "https://helpdesk.ainative.studio",
});

const tickets = await client.tickets.list({ status: "open" });
const ticket = await client.tickets.create({ title: "Bug report", priority: "high" });
await client.tickets.update(ticket.ticket_id, { status: "resolved" });

Features: auto-retry on 429/5xx, pagination helpers, TypeScript types, debug mode.

Python

pip install serviceos
from serviceos import ServiceOS

client = ServiceOS(api_key="sk_...", org_id="org_123")

tickets = client.tickets.list(status="open")
ticket = client.tickets.create(title="Bug report", priority="high")

Features: sync + async, Pydantic models, auto-retry with tenacity.

Go

import serviceos "github.com/AINative-Studio/serviceos-go"

client := serviceos.NewClient("sk_...",
serviceos.WithOrgID("org_123"),
serviceos.WithBaseURL("https://helpdesk.ainative.studio"),
)

tickets, _ := client.Tickets.List(ctx, &serviceos.ListTicketsParams{Status: "open"})

Features: context-aware, auto-retry, pagination iterator, zero external deps.


MCP Server

Connect ServiceOS to AI agents via the Model Context Protocol:

{
"mcpServers": {
"serviceos": {
"command": "npx",
"args": ["@serviceos/mcp-server"],
"env": {
"SERVICEOS_API_KEY": "sk_...",
"SERVICEOS_ORG_ID": "org_123",
"SERVICEOS_BASE_URL": "https://helpdesk.ainative.studio"
}
}
}
}

Available Tools

ToolDescription
serviceos_list_ticketsList tickets with filters
serviceos_get_ticketGet ticket details
serviceos_create_ticketCreate a ticket
serviceos_update_ticketUpdate status/priority
serviceos_list_teamsList teams
serviceos_list_queuesList queues
serviceos_search_ticketsSemantic search
serviceos_get_agent_statsAgent performance
serviceos_list_sla_breachesBreached SLA timers
serviceos_create_internal_noteAdd agent note

Rate Limiting

All endpoints return standard rate limit headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1718323200
TierLimitWindow
General API1000 reqPer hour
Auth endpoints20 reqPer minute
Bulk operations10 reqPer minute

Exceeding limits returns 429 Too Many Requests with Retry-After header.


Data Model

Ticket

interface Ticket {
ticket_id: string; // Unique ID (ZeroDB row_id)
org_id: string; // Organization
title: string;
status: "new" | "open" | "pending" | "on_hold" | "resolved" | "closed" | "merged";
priority: "low" | "normal" | "high" | "urgent";
customer_id: string;
team_id?: string;
queue_id?: string;
assignee_user_id?: string;
tags: string[];
ai_classification?: {
topic: string;
urgency: string;
sentiment: string;
confidence: number;
};
created_at: string; // ISO 8601
updated_at: string;
}

Webhook Event Topics

TopicFired When
ticket.createdNew ticket created
ticket.updatedTicket fields changed
ticket.status.changedStatus transition
ticket.linkedParent-child link created
sla.breachedSLA timer breached
ai.triage.completedAI classification done

Full API Reference

See the interactive Swagger documentation at:

helpdesk.ainative.studio/api-docs

124 documented endpoints with request/response schemas, try-it-out capability, and example payloads.