logo
AuthAuthenticate and issue session cookies

Authenticate and issue session cookies

Sets __Host-access and __Host-refresh cookies on success.

curl -X POST "https://mail.haltman.io/api/auth/sign-in" \
  -H "Content-Type: application/json" \
  -d '{
  "identifier": "example_string",
  "password": "example_string"
}'
{
  "ok": true,
  "action": "sign_in",
  "authenticated": true,
  "user": {
    "id": 123,
    "username": "John Doe",
    "email": "user@example.com",
    "email_verified_at": "2024-12-25T10:00:00Z",
    "is_active": 42,
    "is_admin": true,
    "created_at": "2024-12-25T10:00:00Z",
    "updated_at": "2024-12-25T10:00:00Z",
    "last_login_at": "2024-12-25T10:00:00Z"
  },
  "session": {
    "session_family_id": "example_string",
    "access_expires_at": "2024-12-25T10:00:00Z",
    "refresh_expires_at": "2024-12-25T10:00:00Z"
  }
}
POST
/api/auth/sign-in
POST
Content-Typestring
Required

The media type of the request body

Options: application/json
passwordstring
Required
Min length: 8 • Max length: 128
Request Preview
Response

Response will appear here after sending the request

Responses

okboolean
Required
actionstring
Required
Allowed values:sign_in
authenticatedboolean
Required
userobject
Required
sessionobject
Required