Zum Hauptinhalt springen

API Overview

The Ever Gauzy API is a RESTful HTTP API built with NestJS. It provides comprehensive endpoints for all platform features, with auto-generated OpenAPI (Swagger) documentation.

Base URLโ€‹

EnvironmentAPI Base URLSwagger UIAPI Docs
Local Developmenthttp://localhost:3000/apihttp://localhost:3000/swghttp://localhost:3000/docs
Demohttps://apidemo.gauzy.co/apihttps://apidemo.gauzy.co/swghttps://apidemo.gauzy.co/docs
Staginghttps://apistage.gauzy.co/apihttps://apistage.gauzy.co/swgโ€”
Productionhttps://api.gauzy.co/apihttps://api.gauzy.co/swghttps://api.gauzy.co/docs

All endpoints are prefixed with /api/.

Authenticationโ€‹

Most API endpoints require a valid JWT token. Obtain one via the login endpoint:

# Login
POST /api/auth/login
Content-Type: application/json

{
"email": "admin@ever.co",
"password": "admin"
}

Response:

{
"token": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "...",
"email": "admin@ever.co",
"tenantId": "...",
"role": { "name": "SUPER_ADMIN" }
}
}

Use the token in subsequent requests:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Public Endpointsโ€‹

Endpoints decorated with @Public() bypass authentication:

EndpointMethodPurpose
/api/auth/loginPOSTUser login
/api/auth/registerPOSTPublic user registration
/api/auth/reset-passwordPOSTPassword reset
/api/auth/request-passwordPOSTPassword reset request
/api/auth/{provider}/callbackGETSocial OAuth callbacks
/api/healthGETHealth check

Request Formatโ€‹

Content Typeโ€‹

All request and response bodies use JSON:

Content-Type: application/json
Accept: application/json

Request Headersโ€‹

HeaderRequiredDescription
AuthorizationYes (most endpoints)Bearer {jwt_token}
Content-TypeYes (POST/PUT/PATCH)application/json
Tenant-IdOptionalOverride tenant for cross-tenant operations
Organization-IdOptionalSpecify organization context
LanguageOptionalPreferred language for i18n responses

Response Formatโ€‹

Success Responsesโ€‹

// Single entity
{
"id": "uuid",
"name": "Example",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}

// Paginated collection
{
"items": [...],
"total": 100
}

Error Responsesโ€‹

{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}

HTTP Status Codesโ€‹

CodeDescriptionWhen Used
200OKSuccessful GET, PUT, PATCH
201CreatedSuccessful POST
204No ContentSuccessful DELETE
400Bad RequestValidation error, invalid input
401UnauthorizedMissing or invalid JWT token
403ForbiddenInsufficient permissions
404Not FoundResource not found
409ConflictDuplicate resource
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected server error

API Modulesโ€‹

The API is organized into the following endpoint groups:

Coreโ€‹

ModuleBase PathDescription
Authentication/api/authLogin, register, OAuth, tokens
User/api/userUser profile and settings
Employee/api/employeeEmployee management
Organization/api/organizationOrganization CRUD

HRMโ€‹

ModuleBase PathDescription
Time Tracking/api/timesheetTime logs, timesheets, activities
Time Off/api/time-off-requestLeave requests
Employee Awards/api/employee-awardEmployee awards
Employee Levels/api/employee-levelEmployee levels

ERPโ€‹

ModuleBase PathDescription
Invoices/api/invoicesInvoice management
Expenses/api/expenseExpense tracking
Payments/api/paymentPayment records
Income/api/incomeIncome tracking

PMโ€‹

ModuleBase PathDescription
Tasks/api/tasksTask management
Projects/api/organization-projectsProject management
Sprints/api/organization-sprintSprint management
Goals/api/goalsGoals and KPIs

CRMโ€‹

ModuleBase PathDescription
Contacts/api/organization-contactContact management
Pipelines/api/pipelinesSales pipelines
Deals/api/dealsDeal management

ATSโ€‹

ModuleBase PathDescription
Candidates/api/candidateCandidate management
Interviews/api/candidate-interviewInterview scheduling
Invite/api/inviteUser/candidate invitations

Integrationsโ€‹

ModuleBase PathDescription
Integrations/api/integrationIntegration management
GitHub/api/integration/githubGitHub integration
Upwork/api/integrations/upworkUpwork integration

Rate Limitingโ€‹

The API enforces rate limiting to prevent abuse:

# Default configuration
THROTTLE_ENABLED=true
THROTTLE_TTL=60000 # 1 minute window
THROTTLE_LIMIT=60000 # Max requests per window

When rate limited, the API returns 429 Too Many Requests.

CORSโ€‹

Cross-Origin Resource Sharing is configured to allow:

  • Localhost ports (development)
  • Production domains (*.gauzy.co, *.ever.co)
  • Custom domains via CORS configuration

Swagger / OpenAPIโ€‹

The interactive Swagger UI at /swg allows you to:

  1. Browse all available endpoints
  2. View request/response schemas
  3. Try endpoints directly (with authentication)
  4. Download the OpenAPI spec as JSON (/swg-json)

Importing into API Toolsโ€‹

  • Postman: Import from http://localhost:3000/swg-json
  • Insomnia: Import OpenAPI spec from Swagger JSON
  • VS Code REST Client: Use Swagger-generated examples