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

# Register

> Creates a new organization and its first admin user



## OpenAPI

````yaml POST /api/v1/auth/register
openapi: 3.0.3
info:
  title: LogFleet API
  description: >
    LogFleet is a distributed edge observability platform for fleet management.


    ## Overview

    LogFleet collects logs from distributed edge devices, stores them locally
    with

    configurable retention, extracts metrics for cloud observability platforms,

    and provides on-demand log streaming and remote access.


    ## Authentication

    LogFleet uses two authentication methods:


    - **JWT Bearer Token**: For dashboard and user operations. Obtain via
    `/auth/login`

    - **API Key**: For edge agents. Create via `/api-keys` endpoint


    ## Rate Limits

    - General endpoints: 100 requests/minute

    - Streaming endpoints: 20 requests/minute

    - Edge/metrics endpoints: 1000 requests/minute


    ## Multi-Tenancy

    All resources are scoped to organizations. Users can only access resources

    belonging to their organization.
  version: 1.0.0
  contact:
    name: LogFleet Support
    email: support@logfleet.io
    url: https://logfleet.io
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
servers:
  - url: https://api.logfleet.io
    description: Production
  - url: http://localhost:8080
    description: Local development
security: []
tags:
  - name: Authentication
    description: User registration and authentication
  - name: Organization
    description: Organization management
  - name: Agents
    description: Edge agent management
  - name: API Keys
    description: API key management for edge agents
  - name: Dashboard
    description: Dashboard metrics and summaries
  - name: Streaming
    description: Real-time log streaming
  - name: Billing
    description: Plans, quotas, and invoices
  - name: Metric Configs
    description: Custom metric extraction configuration
  - name: Edge API
    description: Edge agent communication endpoints
paths:
  /api/v1/auth/register:
    post:
      tags:
        - Authentication
      summary: Register organization and admin user
      description: Creates a new organization and its first admin user
      operationId: register
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
      responses:
        '201':
          description: Registration successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          description: Organization or user already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RegisterRequest:
      type: object
      required:
        - organization_name
        - email
        - password
        - name
      properties:
        organization_name:
          type: string
          minLength: 1
          example: Acme Corp
        email:
          type: string
          format: email
          example: admin@acme.com
        password:
          type: string
          minLength: 12
          description: |
            Must contain uppercase, lowercase, digit, and special character
          example: SecureP@ssw0rd!
        name:
          type: string
          minLength: 1
          example: John Doe
    AuthResponse:
      type: object
      properties:
        token:
          type: string
          description: JWT token
        expires_in:
          type: integer
          description: Token expiration in seconds
        user:
          $ref: '#/components/schemas/UserResponse'
        organization:
          $ref: '#/components/schemas/OrgResponse'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Additional details
    UserResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        name:
          type: string
        role:
          type: string
          enum:
            - admin
            - member
            - viewer
    OrgResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````