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

# Create User



## OpenAPI

````yaml post /users
openapi: 3.0.0
info:
  title: Identety API
  description: Identity Provider API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /users:
    post:
      tags:
        - User
      summary: Create client
      operationId: UserController_createUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserDto'
      responses:
        '201':
          description: Client created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponseModel'
        '401':
          description: Unauthorized. Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnAuthorizedResponseSwaggerModel'
        '404':
          description: Client not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponseSwaggerModel'
      security:
        - x-api-key: []
components:
  schemas:
    CreateUserDto:
      type: object
      properties:
        email:
          type: string
          example: john@example.com
        password:
          type: string
          example: password123
          minLength: 8
        name:
          type: string
          example: John Doe
        givenName:
          type: string
          example: John
        familyName:
          type: string
          example: Doe
        picture:
          type: string
          example: https://example.com/photo.jpg
        locale:
          type: string
          example: en-US
        address:
          $ref: '#/components/schemas/UserAddressDto'
        metadata:
          type: object
          example:
            customField: value
      required:
        - email
        - password
        - name
        - givenName
        - familyName
        - picture
        - locale
        - address
        - metadata
    UserResponseModel:
      type: object
      properties:
        id:
          type: string
          example: 43fad864-738d-4367-a012-2b8c6948c36a
        name:
          type: string
          example: John Doe
        givenName:
          type: string
          example: John
        familyName:
          type: string
          example: Doe
        picture:
          type: string
          example: https://example.com/photo.jpg
        locale:
          type: string
          example: en-US
        address:
          $ref: '#/components/schemas/UserAddressResponseModel'
        metadata:
          type: object
          example:
            customField: value
      required:
        - id
        - name
        - givenName
        - familyName
        - picture
        - locale
        - address
        - metadata
    UnAuthorizedResponseSwaggerModel:
      type: object
      properties:
        message:
          type: string
          example: Invalid API key
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
      required:
        - message
        - statusCode
        - error
    NotFoundResponseSwaggerModel:
      type: object
      properties:
        message:
          type: string
          example: Not Found
        statusCode:
          type: number
          example: 401
      required:
        - message
        - statusCode
    UserAddressDto:
      type: object
      properties:
        streetAddress:
          type: string
          example: 123 Main St
        locality:
          type: string
          example: New York
        region:
          type: string
          example: NY
        postalCode:
          type: string
          example: '10001'
        country:
          type: string
          example: USA
      required:
        - streetAddress
        - locality
        - region
        - postalCode
        - country
    UserAddressResponseModel:
      type: object
      properties:
        streetAddress:
          type: string
          example: 123 Main St
        locality:
          type: string
          example: New York
        region:
          type: string
          example: NY
        postalCode:
          type: string
          example: '10001'
        country:
          type: string
          example: USA
      required:
        - streetAddress
        - locality
        - region
        - postalCode
        - country
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````