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

# Create a user (admin)

> Admin-only. Omit `password` to create the user in first-login mode — they set their own password on first sign-in.



## OpenAPI

````yaml /openapi.yaml post /api/v1/auth/users
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/auth/users:
    post:
      tags:
        - Auth
      summary: Create a user (admin)
      description: >-
        Admin-only. Omit `password` to create the user in first-login mode —
        they set their own password on first sign-in.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - role
              properties:
                username:
                  type: string
                  description: Lowercase; letters, digits, and . _ @ - only
                role:
                  type: string
                  description: One of the valid platform roles (e.g. admin)
                password:
                  type: string
                  description: Optional initial password
      responses:
        '201':
          description: User created
        '400':
          description: Missing/invalid username or invalid role
        '409':
          description: User already exists
        '500':
          description: Error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````