Email + password login
const url = 'https://kynectlocal-production.up.railway.app/v1/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example","tenantSlug":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://kynectlocal-production.up.railway.app/v1/v1/auth/login \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example", "tenantSlug": "example" }'Authenticates a user and returns a short-lived access token and a rotating refresh token.
Request Body required
Section titled βRequest Body required βobject
Tenant slug to scope authentication
Example generated
{ "email": "hello@example.com", "password": "example", "tenantSlug": "example"}Responses
Section titled β Responses βSuccess
object
object
JWT access token (RS256, 15 min expiry)
Opaque refresh token (single-use, 30 days)
object
User identifier
User email address
First name
Last name
Platform super-admin flag
Tenant this user belongs to
Account status: active | suspended
Example generated
{ "data": { "accessToken": "example", "refreshToken": "example", "user": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "hello@example.com", "firstName": "example", "lastName": "example", "isSuperAdmin": true, "tenantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example" } }}Validation error
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Unauthenticated
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Forbidden
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Not found
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Unprocessable
object
Error envelope
object
Machine-readable error code
Human-readable error description
Additional context, e.g. validation field errors
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}