Log in and obtain an auth cookie

Prev Next
Post
/auth/login

Authenticates a user with email and password.

  • On success, returns basic user information and sets an auth-token HTTP-only cookie used to authorize subsequent requests.
  • On failure, returns an error message and does not set the cookie.
Body parameters
default
{
  "email": "admin@example.edu",
  "password": "strong-password-123"
}
object

Credentials used to sign into the Edmo dashboard and API.

email
string (email) Required
Exampleuser@example.edu
password
string (password) Required
Examplestrong-password-123
Responses
200

Login successful. Auth cookie is set in the response.

Headers
Set-Cookie
string
Contains the `auth-token` cookie for subsequent requests.
Expand All
object

Successful login response. The auth cookie is sent via Set-Cookie header.

message
string
ExampleLogin successful
user
object (User)

Basic user information for the currently authenticated user.

id
string

Internal user identifier.

email
string (email)
name
string | null
role
string

High-level role for permissions (e.g., ADMIN, EDITOR, VIEWER).

disabled
boolean

Whether the account is disabled.

permissions
object | null

Fine-grained permission map used internally.

property*
Array of string additionalProperties
string
400

Missing email or password.

object

Standard error response envelope.

Example{ "error": "Failed to load agents. Please try again." }
error
string

Human-readable error message.

401

Invalid credentials or account not found.

object

Standard error response envelope.

Example{ "error": "Failed to load agents. Please try again." }
error
string

Human-readable error message.

403

Account is disabled.

object

Standard error response envelope.

Example{ "error": "Failed to load agents. Please try again." }
error
string

Human-readable error message.

500

Unexpected server error during login.

object

Standard error response envelope.

Example{ "error": "Failed to load agents. Please try again." }
error
string

Human-readable error message.