Authentication
Register an organization or authenticate to receive a JWT token.
Authentication Endpoints
Register an organization or authenticate to receive a JWT token.
POST
/v1/auth/registerPublicCreate org + admin user, returns JWT
POST
/v1/auth/loginPublicAuthenticate with email & password
Register
POST /v1/auth/register
{
"email": "admin@acme.io",
"password": "secure_password",
"organization_name": "Acme Corp"
}Response
{
"access_token": "eyJhbGci...",
"token_type": "bearer"
}Request Format
Both endpoints accept a JSON body with Content-Type: application/json.
Register Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Admin user email | |
| password | string | Yes | Min 8 characters |
| organization_name | string | Yes | Organization display name |
Login Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | User email | |
| password | string | Yes | User password |
Response
Both endpoints return a JWT access token on success. Include this token in the Authorization header for authenticated requests.
Usage
curl -H "Authorization: Bearer eyJhbGci..." \
https://api.navil.ai/v1/org/me