giljo-ai Auth API

Dashboard authentication and API keys

Operations 11

POST /api/auth/login Login #
POST /api/auth/logout Logout #
POST /api/auth/refresh Refresh Token #
GET /api/auth/me Get Me #
POST /api/auth/me/connect-welcome/dismiss Dismiss Connect Welcome #
POST /api/auth/me/getting-started/viewed Mark Getting Started Viewed #
POST /api/auth/me/hq-promo/dismiss Dismiss Hq Promo #
GET /api/auth/api-keys/active Get Active Api Keys #
GET /api/auth/api-keys List Api Keys #
POST /api/auth/api-keys Create Api Key #
DELETE /api/auth/api-keys/{key_id} Revoke Api Key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/giljo-ai:giljo-ai-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

giljo-ai-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Giljo Agent Message Hub Auth API
  description: '## Authenticated Agent Message Board REST API


    Giljo Agent Message Hub provides the REST API for authenticated users,

    shared message threads, tasks, WebSocket updates, and MCP connectivity.


    ### Key Features:

    - **Authentication**: Dashboard sessions, API keys, and OAuth 2.1

    - **Message Hub**: Shared threads, participants, baton passing, and messages

    - **Tasks**: Tenant-scoped task tracking

    - **Real-time Updates**: WebSocket support for live message and task updates

    - **MCP Endpoint**: Agent tool connectivity through `/mcp`


    ### Authentication:

    API authentication can be enabled via configuration. Supports API key and OAuth methods.


    ### WebSocket:

    Connect to `/ws/{client_id}` for real-time updates on threads, messages, and tasks.


    ### Rate Limiting:

    Rate limiting can be configured per tenant. Default: 60 requests/minute.'
  contact:
    name: GiljoAI Support
    url: https://giljo.ai/
    email: infoteam@giljo.ai
  license:
    name: Elastic License 2.0
    url: https://giljo.ai/
  version: 1.0.0
servers:
- url: /
  description: This server
tags:
- name: Auth
  description: Dashboard authentication and API keys
paths:
  /api/auth/login:
    post:
      tags:
      - Auth
      summary: Login
      description: 'Login with username/password, returns JWT in httpOnly cookie.


        This endpoint authenticates a user and sets an httpOnly cookie

        containing a JWT access token valid for 24 hours.


        No default password flow.

        Fresh installs go directly to "Create Admin Account" page.


        Rate limiting: 5 attempts per minute per IP


        Args:

        request: Login credentials (username, password)

        response: FastAPI response (to set cookie)

        auth_service: Auth service for authentication operations


        Returns:

        Login success message with user info


        Raises:

        HTTPException: 401 if credentials are invalid

        HTTPException: 429 if rate limit exceeded'
      operationId: login_api_auth_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/logout:
    post:
      tags:
      - Auth
      summary: Logout
      description: 'Logout by revoking the JWT and clearing the cookie.


        Clearing the cookie alone left the bearer token valid until

        expiry, so a copied/leaked token survived "logout". We now write an

        ``OAuthRevokedToken`` row for the token''s jti BEFORE clearing the cookie,

        so ``get_current_user`` rejects it on every future request. Revocation

        accepts an expired-in-grace token so a session on the edge of expiry still

        revokes. Cookie domain/path/secure/samesite must match the values used when

        setting the cookie, otherwise the browser will not clear it.


        Args:

        request: FastAPI request (for cookie domain resolution + access_token cookie)

        response: FastAPI response (to clear cookie)

        db: Database session for writing the revocation row


        Returns:

        Logout success message'
      operationId: logout_api_auth_logout_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogoutResponse'
  /api/auth/refresh:
    post:
      tags:
      - Auth
      summary: Refresh Token
      description: 'Silently refresh the access token.


        - If token is valid: issues new token (sliding window session extension)

        - If token expired within grace period (1h): validates user in DB, issues new token

        - If token beyond grace period or invalid: returns 401


        Args:

        request: FastAPI request (for cookie extraction and domain resolution)

        response: FastAPI response (to set new cookie)

        db: Database session (managed by FastAPI dependency injection)


        Returns:

        JSON with message and username on success


        Raises:

        HTTPException: 401 if no token, token beyond grace period, or user inactive'
      operationId: refresh_token_api_auth_refresh_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/auth/me:
    get:
      tags:
      - Auth
      summary: Get Me
      description: 'Get current user profile or return 401 if not authenticated.


        Two-Layout Pattern: Auth routes isolated in AuthLayout, app routes always require valid user.

        This endpoint returns authenticated user data with password_change_required flag when applicable.


        Args:

        request: FastAPI request

        db: Database session (managed by FastAPI dependency injection)


        Returns:

        User profile data if authenticated, 401 JSON response otherwise'
      operationId: get_me_api_auth_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/auth/me/connect-welcome/dismiss:
    post:
      tags:
      - Auth
      summary: Dismiss Connect Welcome
      description: Retire the connect-your-agent welcome for this account on every device.
      operationId: dismiss_connect_welcome_api_auth_me_connect_welcome_dismiss_post
      security:
      - CookieSession: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectWelcomeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/me/getting-started/viewed:
    post:
      tags:
      - Auth
      summary: Mark Getting Started Viewed
      description: Record that this account opened the Getting started page; the first time wins.
      operationId: mark_getting_started_viewed_api_auth_me_getting_started_viewed_post
      security:
      - CookieSession: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GettingStartedViewedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/me/hq-promo/dismiss:
    post:
      tags:
      - Auth
      summary: Dismiss Hq Promo
      description: Dismiss the Giljo HQ promo stage the home page shows now; it returns at the next stage.
      operationId: dismiss_hq_promo_api_auth_me_hq_promo_dismiss_post
      security:
      - CookieSession: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HqPromoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/api-keys/active:
    get:
      tags:
      - Auth
      summary: Get Active Api Keys
      description: Return active API keys for current user (no plaintext). Used by the setup wizard.
      operationId: get_active_api_keys_api_auth_api_keys_active_get
      security:
      - CookieSession: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/APIKeyResponse'
                title: Response Get Active Api Keys Api Auth Api Keys Active Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/api-keys:
    get:
      tags:
      - Auth
      summary: List Api Keys
      description: 'List all API keys for current user.


        This endpoint returns all API keys (active and revoked) for the authenticated user.

        Keys are masked - only the prefix is shown for security.


        Args:

        current_user: User from JWT token (dependency)

        auth_service: Auth service for API key operations


        Returns:

        List of API keys (masked)'
      operationId: list_api_keys_api_auth_api_keys_get
      security:
      - CookieSession: []
      parameters:
      - name: include_revoked
        in: query
        required: false
        schema:
          type: boolean
          description: Include revoked keys in results
          default: false
          title: Include Revoked
        description: Include revoked keys in results
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/APIKeyResponse'
                title: Response List Api Keys Api Auth Api Keys Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Auth
      summary: Create Api Key
      description: 'Generate a new API key for current user.


        This endpoint creates a new API key and returns it in plaintext.

        WARNING: The key is only shown once! Store it securely.


        Args:

        request: API key creation request

        current_user: User from JWT token (dependency)

        auth_service: Auth service for API key operations


        Returns:

        API key response with plaintext key (shown only once)'
      operationId: create_api_key_api_auth_api_keys_post
      security:
      - CookieSession: []
      parameters:
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/api-keys/{key_id}:
    delete:
      tags:
      - Auth
      summary: Revoke Api Key
      description: 'Revoke an API key.


        This endpoint revokes (deactivates) an API key. The key will no longer

        work for authentication after revocation.


        Args:

        key_id: UUID of API key to revoke

        current_user: User from JWT token (dependency)

        auth_service: Auth service for API key operations


        Returns:

        Revocation confirmation


        Raises:

        HTTPException: 404 if key not found or belongs to another user'
      operationId: revoke_api_key_api_auth_api_keys__key_id__delete
      security:
      - CookieSession: []
      parameters:
      - name: key_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Key Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - name: access_token
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyRevokeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LoginRequest:
      properties:
        username:
          type: string
          maxLength: 255
          minLength: 3
          title: Username
        password:
          type: string
          maxLength: 72
          minLength: 1
          title: Password
      type: object
      required:
      - username
      - password
      title: LoginRequest
      description: Login request with username/email identifier and password.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    APIKeyResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        key_prefix:
          type: string
          title: Key Prefix
        is_active:
          type: boolean
          title: Is Active
        created_at:
          type: string
          title: Created At
        last_used:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Used
        revoked_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Revoked At
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
      type: object
      required:
      - id
      - name
      - key_prefix
      - is_active
      - created_at
      - last_used
      - revoked_at
      - expires_at
      title: APIKeyResponse
      description: API key response (masked for security)
    APIKeyRevokeResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        message:
          type: string
          title: Message
      type: object
      required:
      - id
      - name
      - message
      title: APIKeyRevokeResponse
      description: Response after revoking API key
    HqPromoResponse:
      properties:
        hq_promo_stage:
          anyOf:
          - type: integer
          - type: 'null'
          title: Hq Promo Stage
      type: object
      required:
      - hq_promo_stage
      title: HqPromoResponse
      description: Which Giljo HQ promo stage the home page shows after a dismissal (none).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LoginResponse:
      properties:
        message:
          type: string
          title: Message
        username:
          type: string
          title: Username
        role:
          type: string
          title: Role
        tenant_key:
          type: string
          title: Tenant Key
        password_change_required:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Password Change Required
      type: object
      required:
      - message
      - username
      - role
      - tenant_key
      title: LoginResponse
      description: Login response with user info
    APIKeyCreateResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        api_key:
          type: string
          title: Api Key
        key_prefix:
          type: string
          title: Key Prefix
        message:
          type: string
          title: Message
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
      type: object
      required:
      - id
      - name
      - api_key
      - key_prefix
      - message
      - expires_at
      title: APIKeyCreateResponse
      description: Response after creating API key (includes plaintext key ONCE)
    ConnectWelcomeResponse:
      properties:
        connect_welcome_pending:
          type: boolean
          title: Connect Welcome Pending
      type: object
      required:
      - connect_welcome_pending
      title: ConnectWelcomeResponse
      description: State of the connect-your-agent welcome after a dismissal.
    APIKeyCreateRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 3
          title: Name
          description: Description of API key purpose
      additionalProperties: false
      type: object
      required:
      - name
      title: APIKeyCreateRequest
      description: Request to create new API key
    GettingStartedViewedResponse:
      properties:
        getting_started_viewed:
          type: boolean
          title: Getting Started Viewed
      type: object
      required:
      - getting_started_viewed
      title: GettingStartedViewedResponse
      description: State of the Getting started card after the page has been opened.
    LogoutResponse:
      properties:
        message:
          type: string
          title: Message
      type: object
      required:
      - message
      title: LogoutResponse
      description: Logout response
  securitySchemes:
    CookieSession:
      type: apiKey
      in: cookie
      name: access_token
    FirstLoginSession:
      type: apiKey
      in: cookie
      name: access_token