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

# Authenticate a partner

> Authenticates a partner user account with email and password, returning a token and user information. Use the returned token in the Authorization header for subsequent requests.



## OpenAPI

````yaml /openapi.yaml post /auth/login
openapi: 3.0.0
info:
  title: Answering Agent API
  description: API for Answering Agent platform
  version: 1.0.0
servers:
  - url: https://answeringagent.com/api/v1
    description: Production API
  - url: https://playground.answeringagent.com/api/v1
    description: Playground API
security: []
paths:
  /auth/login:
    servers:
      - url: https://answeringagent.com/api
        description: Production API
      - url: https://playground.answeringagent.com/api
        description: Playground API
    post:
      tags:
        - Authentication
      summary: Authenticate a partner
      description: >-
        Authenticates a partner user account with email and password, returning
        a token and user information. Use the returned token in the
        Authorization header for subsequent requests.
      operationId: loginUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - password
              properties:
                email:
                  type: string
                  format: email
                  description: User's email address
                password:
                  type: string
                  format: password
                  description: User's password
      responses:
        '200':
          description: Successful authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: Authentication token for subsequent API requests
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: User ID
                      name:
                        type: string
                        description: User's full name
                      email:
                        type: string
                        description: User's email address
                      current_team_id:
                        type: integer
                        description: ID of user's current team
                      profile_photo_url:
                        type: string
                        description: URL to user's profile photo
                      created_at:
                        type: string
                        format: date-time
                        description: When the user account was created
                      updated_at:
                        type: string
                        format: date-time
                        description: When the user account was last updated
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: API key is required
                    enum:
                      - API key is required
                      - Invalid credentials
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The given data was invalid.
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        items:
                          type: string
                      password:
                        type: array
                        items:
                          type: string

````