Skip to main content

API Reference

The Gatwy REST API lets you automate and integrate with every feature of the platform — user management, connections, sessions, notifications, backups, and more.

Base URL

All endpoints are relative to your Gatwy instance origin:

https://<YOUR_HOST>:7443/api/v1

Authentication

Most endpoints require a valid JWT token. Obtain one via POST /auth/login.

Include the token in every authenticated request as a Bearer header:

Authorization: Bearer <token>

Alternatively, the token can be sent via the gatwy_token cookie (set automatically by the login response).

Rate Limits

EndpointLimit
POST /auth/login30 attempts / 15 min per IP
POST /auth/login/mfa5 attempts / 5 min per user
POST /profile/mfa/verify5 attempts / 5 min per user

After the configured number of failed login attempts (default: 5), the account is locked for the configured duration (default: 30 min).

Permissions

Endpoints that go beyond basic self-service require specific named permissions. Permissions are assigned to roles and users inherit them through their role.

PermissionCovers
users.manageCreate, update, delete, unlock users
roles.manageCreate, update, delete roles
connections.createCreate new connections
connections.edit_ownEdit own connections
connections.edit_anyEdit any connection
connections.delete_ownDelete own connections
connections.delete_anyDelete any connection
connections.shareShare connections with users/roles
connections.import_exportExport/import connection data
sessions.view_anyView all users' sessions
sessions.deletePurge session history
audit.view_anyView audit log for all users
settings.manageRead and update system settings
settings.notificationsManage notification channels and rules
settings.backupExport and restore backups

Response Format

All responses are JSON. Errors follow this shape:

{
"error": "Human-readable message"
}

Common HTTP status codes:

CodeMeaning
200Success
400Bad request / validation error
401Missing or invalid token
403Insufficient permissions
404Resource not found
429Rate limit exceeded
500Internal server error