GenLogs auth API

Access-token creation and refresh

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

genlogs-auth-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: GenLogs Alerts auth API
  version: 1.0.0
  description: 'GenLogs Truck Intelligence API. Ground-truth motor-carrier and shipper data from a nationwide roadside sensor network: carrier recommendations by lane, carrier and FMCSA profiles, carrier vetting, shipper lanes and facilities, onboarded-carrier contact management, mismatch observations, and alert webhooks. Base URL https://api.genlogs.io. Authentication uses an x-api-key header plus a short-lived Access-Token obtained from /auth/token; endpoint access is gated by named permissions.'
  contact:
    name: GenLogs
    url: https://docs.genlogs.io
    email: contact@genlogs.io
  x-provenance:
    method: searched
    source: https://docs.genlogs.io (per-endpoint embedded OpenAPI fragments + documented endpoints)
    assembled: '2026-07-19'
    operationIds: some operationIds normalized by API Evangelist where the provider fragments omitted them
servers:
- url: https://api.genlogs.io
  description: GenLogs Truck Intelligence API
security:
- ApiKeyAuth: []
  AccessToken: []
tags:
- name: auth
  description: Access-token creation and refresh
paths:
  /auth/token:
    post:
      tags:
      - auth
      summary: Create access and refresh tokens
      description: Create and return new access and refresh tokens for a user based on their email and password.
      operationId: createAccessToken
      parameters:
      - name: email
        in: query
        required: true
        schema:
          type: string
          format: email
        description: Email of the user requesting tokens.
      - name: password
        in: query
        required: true
        schema:
          type: string
          format: password
        description: Password of the user requesting tokens.
      responses:
        '200':
          description: Access and refresh tokens created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthSchema'
        '401':
          description: Token creation failed because credentials are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Request validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /auth/token/refresh:
    post:
      tags:
      - auth
      summary: Get the AccessToken And Refresh Token
      operationId: refresh_token_get
      parameters:
      - name: accept
        in: header
        required: true
        schema:
          type: string
          default: application/json
        description: Specifies the format of the response.
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
        description: API key for authentication
      - name: refresh_token
        in: query
        required: true
        schema:
          type: string
          description: The previously created valid refresh token
          title: Refresh token
        description: The previously created valid refresh token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPError:
      type: object
      properties:
        detail:
          type: string
    ValidationError:
      type: object
      required:
      - loc
      - msg
      - type
      properties:
        loc:
          type: array
          items:
            oneOf:
            - type: string
            - type: integer
        msg:
          type: string
        type:
          type: string
    AuthenticationResponse:
      properties:
        access_token_data:
          items:
            $ref: '#/components/schemas/AccessTokenSchema'
          type: object
          title: access_token_data
        refresh_token_data:
          items:
            $ref: '#/components/schemas/RefreshTokenSchema'
          type: object
          title: refresh_token_data
        user_id:
          type: string
          title: user_id
        company_id:
          type: integer
          title: company_id
      type: object
      required:
      - access_token_data
      - refresh_token_data
      - user_id
      - company_id
      title: AuthenticationResponse
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    RefreshTokenSchema:
      properties:
        token:
          type: string
          title: Token
        expires:
          type: string
          title: expires
      type: object
      required:
      - token
      - expires
      title: AccessTokenSchema
    TokenSchema:
      type: object
      required:
      - token
      - expires
      properties:
        token:
          type: string
        expires:
          type: string
          format: date-time
    AccessTokenSchema:
      properties:
        token:
          type: string
          title: Token
        expires:
          type: string
          title: expires
      type: object
      required:
      - token
      - expires
      title: AccessTokenSchema
    AuthSchema:
      type: object
      required:
      - access_token_data
      - refresh_token_data
      - user_id
      properties:
        access_token_data:
          $ref: '#/components/schemas/TokenSchema'
        refresh_token_data:
          $ref: '#/components/schemas/TokenSchema'
        user_id:
          type: integer
        company_id:
          type: integer
          nullable: true
        customer_name:
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key provided by GenLogs. Required on every request.
    AccessToken:
      type: apiKey
      in: header
      name: Access-Token
      description: Short-lived access token obtained from POST /auth/token (or refreshed via /auth/token/refresh).