> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mosey.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate Legal Entity



## OpenAPI

````yaml /openapi_v2.json post /v2/auth
openapi: 3.1.0
info:
  title: Mosey API
  description: If you'd like to use the Mosey API, please contact sales@mosey.com.
  version: V2
  x-logo:
    url: null
servers: []
security: []
paths:
  /v2/auth:
    post:
      summary: Authenticate Legal Entity
      operationId: authenticate_v2_auth_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformAuthenticationSessionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformAuthenticationSessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PlatformAuthenticationSessionRequest:
      properties:
        legal_entity_id:
          type: string
          title: Legal Entity Id
      type: object
      required:
        - legal_entity_id
      title: PlatformAuthenticationSessionRequest
    PlatformAuthenticationSessionResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          const: bearer
          title: Token Type
          default: bearer
        state:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: State
      type: object
      required:
        - access_token
      title: PlatformAuthenticationSessionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````