انتقل إلى المحتوى الرئيسي

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