Skip to main content
SONZAI
Api

Support

List my support tickets

GET
/support/tickets

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Query Parameters

limit?integer

Items per page

Default20
Formatint64
Rangevalue <= 100
offset?integer

Pagination offset

Default0
Formatint64
status?string

Filter by status (open, in_progress, resolved, closed)

type?string

Filter by type (support, bug, feature_request, billing, ...)

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/support/tickets"
{
  "$schema": "/api/v1/schemas/TicketListResponse.json",
  "has_more": true,
  "tickets": [
    {
      "assigned_to_email": "string",
      "comment_count": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "created_by_email": "string",
      "priority": "string",
      "status": "string",
      "ticket_id": "string",
      "title": "string",
      "type": "string",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a support ticket

POST
/support/tickets

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/support/tickets" \  -H "Content-Type: application/json" \  -d '{    "description": "string",    "title": "string",    "type": "string"  }'
{
  "$schema": "/api/v1/schemas/SupportTicket.json",
  "assigned_to": "string",
  "assigned_to_email": "string",
  "comment_count": 0,
  "comments": [
    {
      "$schema": "/api/v1/schemas/SupportTicketComment.json",
      "author_email": "string",
      "author_id": "string",
      "author_type": "string",
      "comment_id": "string",
      "content": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "is_internal": true,
      "ticket_id": "string"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "string",
  "created_by_email": "string",
  "description": "string",
  "priority": "string",
  "resolved_at": "2019-08-24T14:15:22Z",
  "status": "string",
  "tenant_id": "string",
  "ticket_id": "string",
  "title": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a support ticket with comments

GET
/support/tickets/{ticketId}

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

ticketId*string

Ticket UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/support/tickets/string"
{
  "$schema": "/api/v1/schemas/TicketDetailResponse.json",
  "history": [
    {
      "changed_by": "string",
      "changed_by_email": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "field_changed": "string",
      "history_id": "string",
      "new_value": "string",
      "old_value": "string",
      "ticket_id": "string"
    }
  ],
  "ticket": {
    "$schema": "/api/v1/schemas/SupportTicket.json",
    "assigned_to": "string",
    "assigned_to_email": "string",
    "comment_count": 0,
    "comments": [
      {
        "$schema": "/api/v1/schemas/SupportTicketComment.json",
        "author_email": "string",
        "author_id": "string",
        "author_type": "string",
        "comment_id": "string",
        "content": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "is_internal": true,
        "ticket_id": "string"
      }
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": "string",
    "created_by_email": "string",
    "description": "string",
    "priority": "string",
    "resolved_at": "2019-08-24T14:15:22Z",
    "status": "string",
    "tenant_id": "string",
    "ticket_id": "string",
    "title": "string",
    "type": "string",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Close a support ticket (user)

POST
/support/tickets/{ticketId}/close

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

ticketId*string

Ticket UUID

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/support/tickets/string/close"
{
  "$schema": "/api/v1/schemas/SupportTicket.json",
  "assigned_to": "string",
  "assigned_to_email": "string",
  "comment_count": 0,
  "comments": [
    {
      "$schema": "/api/v1/schemas/SupportTicketComment.json",
      "author_email": "string",
      "author_id": "string",
      "author_type": "string",
      "comment_id": "string",
      "content": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "is_internal": true,
      "ticket_id": "string"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "string",
  "created_by_email": "string",
  "description": "string",
  "priority": "string",
  "resolved_at": "2019-08-24T14:15:22Z",
  "status": "string",
  "tenant_id": "string",
  "ticket_id": "string",
  "title": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Add a comment to a support ticket

POST
/support/tickets/{ticketId}/comments

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

ticketId*string

Ticket UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/support/tickets/string/comments" \  -H "Content-Type: application/json" \  -d '{    "content": "string"  }'
{
  "$schema": "/api/v1/schemas/SupportTicketComment.json",
  "author_email": "string",
  "author_id": "string",
  "author_type": "string",
  "comment_id": "string",
  "content": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "is_internal": true,
  "ticket_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}