{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricklymails-com/json-schema/pricklymails-com-auth-response-schema.json",
  "title": "AuthResponse",
  "description": "Response body for authentication endpoints.\n\nThe refresh token is delivered in an httpOnly cookie, never in the JSON body.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pricklymails-com-auth-api-openapi.yml#/components/schemas/AuthResponse",
  "type": "object",
  "required": [
    "access_token",
    "expires_in",
    "user"
  ],
  "properties": {
    "access_token": {
      "type": "string",
      "description": "Access token (JWT), sent as a Bearer credential."
    },
    "expires_in": {
      "type": "integer",
      "format": "int64",
      "description": "Access token lifetime in seconds.",
      "minimum": 0
    },
    "user": {
      "$ref": "#/$defs/UserResponse",
      "description": "Authenticated user details."
    }
  },
  "$defs": {
    "UserResponse": {
      "type": "object",
      "description": "Public representation of a user.",
      "required": [
        "uuid",
        "email",
        "role",
        "email_verified",
        "locale",
        "created_at"
      ],
      "properties": {
        "created_at": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601)."
        },
        "email": {
          "type": "string",
          "description": "Email address."
        },
        "email_verified": {
          "type": "boolean",
          "description": "Whether the email has been verified."
        },
        "locale": {
          "type": "string",
          "description": "Language of the account's emails (`\"en\"` or `\"fr\"`)."
        },
        "role": {
          "type": "string",
          "description": "User role (`\"user\"` or `\"admin\"`)."
        },
        "uuid": {
          "type": "string",
          "description": "Public UUID."
        }
      }
    }
  }
}