Amigo Auth API

The Auth API from Amigo — 1 operation(s) for auth.

OpenAPI Specification

amigo-auth-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amigo Account Auth API
  version: 0.1.0
servers:
- url: https://api.amigo.ai
- url: https://internal-api.amigo.ai
- url: https://api-eu-central-1.amigo.ai
- url: https://api-ap-southeast-2.amigo.ai
- url: https://api-ca-central-1.amigo.ai
security:
- Bearer-Authorization: []
  Bearer-Authorization-Organization: []
  Basic: []
tags:
- name: Auth
paths:
  /v1/auth/me:
    get:
      tags:
      - Auth
      summary: Get auth info
      description: Return information about the currently authenticated API key, including expiration.
      operationId: get-auth-info
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthInfoResponse'
        '401':
          description: Missing or invalid API key.
components:
  schemas:
    AuthInfoResponse:
      properties:
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
        key_id:
          type: string
          title: Key Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        expires_at:
          type: string
          format: date-time
          title: Expires At
        expires_in_seconds:
          type: integer
          title: Expires In Seconds
      type: object
      required:
      - workspace_id
      - key_id
      - name
      - expires_at
      - expires_in_seconds
      title: AuthInfoResponse
  securitySchemes:
    Bearer-Authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the [`SignInWithAPIKey`](sign-in-with-api-key) endpoint.
    Bearer-Authorization-Organization:
      type: apiKey
      in: header
      name: X-ORG-ID
      description: An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
    Basic:
      type: http
      scheme: basic
      description: The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.