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

# Log in



## OpenAPI

````yaml /openapi.json post /v1/auth/login
openapi: 3.1.0
info:
  title: datachad API
  description: Accounts, API keys and catalogue access for datachad datasets.
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.datachad.xyz
security: []
tags:
  - name: Auth
    description: Sign up, log in and read the current user.
  - name: API keys
    description: Create and revoke keys for programmatic access.
  - name: Datasets
    description: Browse the catalogue and its metadata.
paths:
  /v1/auth/login:
    post:
      tags:
        - Auth
      summary: Log in
      operationId: login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginBody'
        required: true
      responses:
        '200':
          description: Signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Wrong email or password
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '429':
          description: Too many attempts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    LoginBody:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
        password:
          type: string
    AuthResponse:
      type: object
      required:
        - token
        - user
      properties:
        token:
          type: string
          description: 'JWT, valid for 7 days. Send it as `Authorization: Bearer <token>`.'
        user:
          $ref: '#/components/schemas/User'
    ErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    User:
      type: object
      required:
        - id
        - email
        - name
        - organization
        - created_at
      properties:
        created_at:
          type: string
        email:
          type: string
        id:
          type: integer
          format: int64
        name:
          type: string
        organization:
          type: string

````