Skip to content

API Reference

REST API documentation for GOTRS developers.

Getting Started

First steps with GOTRS - installation, initial setup, and your first ticket.

Deployment

Production deployment guides for Docker, Kubernetes, and air-gapped environments.

Admin Guide

Configure queues, users, groups, automation, and system settings.

API Reference

REST API documentation for integrations and custom development.

Migration Guide

Moving from OTRS to GOTRS - import your existing data and configuration.

FAQ

Frequently asked questions and common troubleshooting tips.

GOTRS API Reference

RESTful API documentation for integrating with GOTRS.

Note: The complete OpenAPI specification is maintained in the gotrs-ce repository.

Overview

GOTRS provides two API layers:

  1. v1 API (/api/v1/*) - RESTful JSON API for programmatic access
  2. Internal API (/api/*) - Used by the HTMX web interface

Base URL

https://your-gotrs-instance.com/api/v1

Authentication

# Login and get JWT token
curl -X POST https://your-instance.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"your-password"}'

# Use token in subsequent requests
curl -X GET https://your-instance.com/api/v1/tickets \
  -H "Authorization: Bearer $JWT_TOKEN"

Response Format

{
  "success": true,
  "data": {...},
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 100,
    "total_pages": 5
  }
}

Error Format

{
  "success": false,
  "error": "Error message description"
}

Core Endpoints

Authentication

MethodEndpointDescription
POST/api/v1/auth/loginAuthenticate and get JWT tokens
POST/api/auth/logoutEnd session
POST/api/auth/refreshRefresh token

Tickets

MethodEndpointDescription
GET/api/v1/ticketsList tickets with filtering
POST/api/v1/ticketsCreate ticket
GET/api/v1/tickets/:idGet ticket details
PUT/api/v1/tickets/:idUpdate ticket
DELETE/api/v1/tickets/:idDelete ticket
POST/api/v1/tickets/:id/assignAssign to agent
POST/api/v1/tickets/:id/closeClose ticket
POST/api/v1/tickets/:id/reopenReopen ticket
POST/api/v1/tickets/:id/priorityUpdate priority
POST/api/v1/tickets/:id/queueMove to queue

Articles

MethodEndpointDescription
GET/api/v1/tickets/:id/articlesGet ticket articles
POST/api/v1/tickets/:id/articlesAdd article/reply
GET/api/v1/tickets/:id/articles/:article_idGet specific article

Bulk Operations

MethodEndpointDescription
POST/api/v1/tickets/bulk/assignBulk assign tickets
POST/api/v1/tickets/bulk/closeBulk close tickets
POST/api/v1/tickets/bulk/priorityBulk update priority
POST/api/v1/tickets/bulk/queueBulk move to queue

Queues

MethodEndpointDescription
GET/api/v1/queuesList queues
POST/api/v1/queuesCreate queue (Admin)
GET/api/v1/queues/:idGet queue
GET/api/v1/queues/:id/ticketsGet queue tickets
GET/api/v1/queues/:id/statsQueue statistics

Users

MethodEndpointDescription
GET/api/v1/users/meGet current user
PUT/api/v1/users/meUpdate profile
GET/api/v1/users/me/preferencesGet preferences
PUT/api/v1/users/me/preferencesUpdate preferences
POST/api/v1/users/me/passwordChange password
MethodEndpointDescription
GET/api/v1/searchGlobal search
GET/api/v1/search/ticketsSearch tickets
GET/api/v1/search/suggestionsAutocomplete
GET/api/v1/search/savedSaved searches
POST/api/v1/search/savedCreate saved search

Dashboard

MethodEndpointDescription
GET/api/v1/dashboard/statsDashboard statistics
GET/api/v1/dashboard/activityRecent activity
GET/api/v1/dashboard/my-ticketsMy assigned tickets
GET/api/v1/dashboard/notificationsNotifications

Admin Endpoints

Requires admin role.

MethodEndpointDescription
GET/api/v1/admin/usersList all users
POST/api/v1/admin/usersCreate user
GET/api/v1/admin/users/:idGet user
PUT/api/v1/admin/users/:idUpdate user
DELETE/api/v1/admin/users/:idDelete user
GET/api/v1/admin/system/configSystem config
GET/api/v1/admin/audit/logsAudit logs

LDAP Integration

Admin only.

MethodEndpointDescription
POST/api/v1/admin/ldap/configureConfigure LDAP
POST/api/v1/admin/ldap/testTest connection
GET/api/v1/admin/ldap/configGet configuration
POST/api/v1/admin/ldap/sync/usersSync users
GET/api/v1/admin/ldap/sync/statusSync status

Health Checks

MethodEndpointDescription
GET/healthBasic health check
GET/health/detailedDetailed component status
GET/healthzKubernetes liveness probe
GET/metricsPrometheus metrics

Status Codes

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limited
500Internal Server Error

Rate Limiting

Endpoint TypeLimit
Login attempts10/minute
Password reset3/hour
Ticket creation (customer)10/hour
General API100/minute

OpenAPI Specification

The complete OpenAPI 3.0 specification is available in the gotrs-ce repository:

You can use these with tools like Swagger UI, Postman, or code generators.

SDKs

Coming soon:

  • TypeScript SDK
  • Python SDK
  • Go SDK

For the complete API specification, see the gotrs-ce repository.