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

# Create user

> Register a new end-user in your partner scope.

<Note>
  Requires `X-Api-Key` and `X-Api-Secret` headers. See [Authentication](/api-reference/users/introduction#authentication) for details.
</Note>

The user is created with `status: "pending"`. They cannot perform financial operations until KYC is approved and their status transitions to `active`.

After creating the user, call [Start KYC](/api-reference/users/start-kyc) to begin identity verification.


## OpenAPI

````yaml api-reference/openapi.json POST /api/v1/partner/users
openapi: 3.1.0
info:
  title: QASH API
  description: >-
    QASH endpoints for exchange rates, cards, and partner-facing financial
    workflows.
  version: 1.0.0
servers:
  - url: https://api.qash.ai
    description: Partner API (Production)
  - url: https://staging.qash.ai
    description: Staging
  - url: https://app.qash.ai
    description: Production
security: []
tags:
  - name: Exchange rates
    description: Public endpoints for supported assets and TRM-based quotes.
  - name: Cards
    description: >-
      Authenticated partner endpoints for card state, controls, limits, and
      balances.
  - name: Users
    description: Admin endpoints for user provisioning and account management.
paths:
  /api/v1/partner/users:
    post:
      tags:
        - Users
      summary: Create user
      description: >-
        Register a new end-user in your partner scope. The user is created with
        `status: pending` and cannot perform financial operations until KYC is
        completed.
      operationId: partnerCreateUser
      requestBody:
        description: User registration payload.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerCreateUserRequest'
            examples:
              minimal:
                summary: Required fields only
                value:
                  email: user@example.com
                  countryCode: CO
              full:
                summary: All fields
                value:
                  email: user@example.com
                  countryCode: CO
                  phone: '+573001234567'
                  preferredLanguage: es
      responses:
        '201':
          description: User created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerCreateUserResponse'
              examples:
                default:
                  summary: User created
                  value:
                    success: true
                    data:
                      user:
                        id: 550e8400-e29b-41d4-a716-446655440000
                        email: user@example.com
                        status: pending
                        createdAt: '2026-05-27T10:00:00.000Z'
                    message: User created successfully
        '400':
          description: Validation error or duplicate email/phone.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                emailExists:
                  summary: Email already registered
                  value:
                    success: false
                    error: A user with this email already exists
                phoneExists:
                  summary: Phone already registered
                  value:
                    success: false
                    error: A user with this phone already exists
        '401':
          description: Invalid partner credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  value:
                    success: false
                    error: Invalid partner credentials
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                default:
                  value:
                    success: false
                    error: Failed to register user
      security:
        - partnerApiKey: []
          partnerApiSecret: []
components:
  schemas:
    PartnerCreateUserRequest:
      type: object
      required:
        - email
        - countryCode
      properties:
        email:
          type: string
          format: email
          description: User email address. Must be unique across all of Qash.
          example: user@example.com
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO 3166-1 alpha-2 country code.
          example: CO
        phone:
          type: string
          description: Phone number in international format. Automatically trimmed.
          example: '+573001234567'
        preferredLanguage:
          type: string
          description: Preferred language code. Defaults to `en`.
          example: es
    PartnerCreateUserResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            user:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: Unique user ID. Store it for future operations.
                email:
                  type: string
                  format: email
                status:
                  $ref: '#/components/schemas/UserStatus'
                createdAt:
                  type: string
                  format: date-time
              required:
                - id
                - email
                - status
                - createdAt
          required:
            - user
        message:
          type: string
          example: User created successfully
      required:
        - success
        - data
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Human-readable error message.
          example: Email is required
      required:
        - success
        - error
    UserStatus:
      type: string
      enum:
        - pending
        - active
        - suspended
        - banned
      description: Current lifecycle status of the user.
  securitySchemes:
    partnerApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Partner API key. Generated from Qash Dashboard → Settings → API Keys.
    partnerApiSecret:
      type: apiKey
      in: header
      name: X-Api-Secret
      description: Partner API secret. Shown once at creation — store it securely.

````