Authentication Endpoints
Complete reference for the authentication API endpoints.
Login
Email/Password Login
POST /api/auth/login
Content-Type: application/json
Request Body:
{
"email": "admin@ever.co",
"password": "admin"
}
Response (200 OK):
{
"user": {
"id": "...",
"email": "admin@ever.co",
"firstName": "Admin",
"lastName": "User",
"tenantId": "...",
"role": {
"id": "...",
"name": "SUPER_ADMIN"
}
},
"token": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs..."
}
Magic Sign-In (Passwordless)
Step 1 — Request magic code:
POST /api/auth/send-magic-code
Content-Type: application/json
{
"email": "user@example.com",
"appMagicSignUrl": "https://app.gauzy.co/#/auth/magic-sign-in",
"appName": "Gauzy"
}
Step 2 — Verify magic code:
POST /api/auth/magic-sign-in
Content-Type: application/json
{
"email": "user@example.com",
"code": "123456"
}
Response: same format as email/password login.