Leena AI Authentication API

Obtain a bearer token.

OpenAPI Specification

leena-ai-authentication-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Leena AI External AOP Analytics Authentication API
  version: 1.0-beta
  description: 'Execute an Agent Operating Procedure (AOP) on a Leena AI AI Colleague from an external

    system and poll its execution status, plus a read-only analytics query endpoint for

    AI Colleague run metrics.


    This specification was generated by the API Evangelist enrichment pipeline from

    Leena AI''s published documentation. Leena AI does not publish a machine-readable

    OpenAPI definition; every path, parameter, response field and error below is

    transcribed from the public guide cited in `x-source`.

    '
  contact:
    name: Leena AI
    url: https://docs.leena.ai/
  x-generated: '2026-07-19'
  x-method: generated
  x-source: https://docs.leena.ai/docs/external-aop-api-authentication-usage-guide
servers:
- url: https://us-east-1-aic.leena.ai
  description: AOP / AI Colleague host, us-east-1
- url: https://us-east-1-analytics-api.leena.ai
  description: Analytics host, us-east-1
tags:
- name: Authentication
  description: Obtain a bearer token.
paths:
  /api/v1.0/oauth/token:
    post:
      operationId: createKnowledgeAccessToken
      summary: Obtain an access token
      description: Exchanges client credentials plus a username and password for a bearer token. Documented token validity for the KM connector is 30 minutes by default; Leena AI recommends implementing token refresh logic in your middleware.
      tags:
      - Authentication
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: A bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          description: Invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TokenResponse:
      type: object
      properties:
        access_token:
          type: string
        token_type:
          type: string
          example: Bearer
        expires_in:
          type: integer
          description: Documented as 30 minutes by default for the KM connector.
    Error:
      type: object
      properties:
        message:
          type: string
    TokenRequest:
      type: object
      properties:
        clientId:
          type: string
        clientSecret:
          type: string
        username:
          type: string
        password:
          type: string
      required:
      - clientId
      - clientSecret
      - username
      - password
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 resource owner password credentials grant. The client authenticates to the token endpoint with HTTP Basic (base64 of `client_id:client_secret`) and posts `username`, `password` and `grant_type=password`. Access tokens are Bearer tokens valid for 3600 seconds and are accompanied by a refresh token.
      flows:
        password:
          tokenUrl: https://us-east-1-acl.leena.ai/api/v1.0/oauth/token
          refreshUrl: https://us-east-1-acl.leena.ai/api/v1.0/oauth/token
          scopes: {}
x-regions:
- us-east-1
- eu-west-1
- eu-central-1
- canadacentral
- ap-southeast-1
- ap-south-1
- qatarcentral
- me-central2