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
| Method | Path | Description |
|---|---|---|
| GET | /v1/tickets | List tickets (filter by status, tag, priority). |
| POST | /v1/tickets | Create a ticket (channel or thread). |
| GET | /v1/tickets/{id} | Get a ticket and transcript metadata. |
| POST | /v1/tickets/{id}/close | Close 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
| Method | Path | Description |
|---|---|---|
| GET | /v1/audit/events | List 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.
| Method | Path | Description |
|---|---|---|
| GET | /v1/webhooks | List webhook endpoints. |
| POST | /v1/webhooks | Create a webhook endpoint. |
| POST | /v1/webhooks/{id}/rotate-secret | Rotate the signing secret. |