REST API

Reference for Stavent’s REST endpoints, pagination, and filtering patterns.

Base URL

The REST API is served over HTTPS. All requests require an Authorization header with a bearer token.

Example
curl https://api.stavent.gg/v1/tickets \
  -H "Authorization: Bearer $STAVENT_TOKEN"

Pagination

List endpoints use cursor pagination. Pass limit (1–100) and cursor (from the previous response).

List response
{
  "data": [/* ... */],
  "nextCursor": "cur_01H..."
}

Tickets

MethodPathDescription
GET/v1/ticketsList tickets (filter by status, tag, priority).
POST/v1/ticketsCreate a ticket (channel or thread).
GET/v1/tickets/{id}Get a ticket and transcript metadata.
POST/v1/tickets/{id}/closeClose a ticket and generate transcript.
Create ticket (example request)
POST /v1/tickets
{
  "subject": "Refund request",
  "requester": {"discordUserId": "123"},
  "priority": "high",
  "tags": ["billing"],
  "form": {"orderId": "A-10021"}
}

Audit events

MethodPathDescription
GET/v1/audit/eventsList audit events (type, time range, actor filters).
GET/v1/audit/events/{id}Fetch a single audit event.

Webhook endpoints

Create webhook endpoints to receive events. You can rotate the signing secret at any time.

MethodPathDescription
GET/v1/webhooksList webhook endpoints.
POST/v1/webhooksCreate a webhook endpoint.
POST/v1/webhooks/{id}/rotate-secretRotate the signing secret.
Found an issue? Send feedback.