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

# Create a user

> Create a user.



## OpenAPI

````yaml openapi/user-controlled-wallets.yaml post /v1/w3s/users
openapi: 3.0.3
info:
  version: '1.0'
  title: User-Controlled Wallets
  description: User-Controlled Wallets API documentation.
servers:
  - url: https://api.circle.com
security:
  - BearerAuth: []
tags:
  - name: Social/ Email Authentication
  - name: PIN Authentication
  - name: Users
  - name: Wallets
  - name: Transactions
  - name: Token Lookup
  - name: Signing
paths:
  /v1/w3s/users:
    post:
      tags:
        - PIN Authentication
      summary: Create a user
      description: Create a user.
      operationId: createUser
      requestBody:
        $ref: '#/components/requestBodies/CreateUser'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
          description: User creation successful.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
      security:
        - BearerAuth: []
components:
  requestBodies:
    CreateUser:
      content:
        application/json:
          schema:
            title: CreateUserRequest
            type: object
            required:
              - userId
            properties:
              userId:
                $ref: '#/components/schemas/ExternalUserId'
      required: true
      description: Request body
  schemas:
    UserResponse:
      title: UserResponse
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/EndUser'
    ExternalUserId:
      type: string
      description: Unique system generated identifier for the user.
      example: ext_user_id_1
      maxLength: 50
      minLength: 5
    EndUser:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        createDate:
          $ref: '#/components/schemas/CreateDate'
        pinStatus:
          $ref: '#/components/schemas/PinStatus'
        status:
          $ref: '#/components/schemas/EndUserStatus'
        securityQuestionStatus:
          type: string
          enum:
            - ENABLED
            - UNSET
            - LOCKED
          example: ENABLED
        pinDetails:
          allOf:
            - $ref: '#/components/schemas/PinSecurityDetails'
        securityQuestionDetails:
          allOf:
            - $ref: '#/components/schemas/PinSecurityDetails'
    XRequestId:
      type: string
      format: uuid
      description: >-
        A unique identifier, which can be helpful for identifying a request when
        communicating with Circle support.
      example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
    Id:
      type: string
      format: uuid
      description: System-generated unique identifier of the resource.
      example: c4d1da72-111e-4d52-bdbf-2e74a2d803d5
    CreateDate:
      type: string
      format: date-time
      description: Date and time the resource was created, in ISO-8601 UTC format.
      example: '2023-01-01T12:04:05Z'
    PinStatus:
      type: string
      enum:
        - ENABLED
        - UNSET
        - LOCKED
      description: >-
        Status of the user PIN code. PIN must be in ENABLED state to authorize
        requests.
      example: ENABLED
    EndUserStatus:
      type: string
      enum:
        - ENABLED
        - DISABLED
      example: ENABLED
    PinSecurityDetails:
      type: object
      properties:
        failedAttempts:
          type: integer
          description: |
            FailedAttempts the number of times a user has entered an invalid
            pin code.
        lockedDate:
          format: date-time
          type: string
          description: The date and time when the pin code has been locked.
          example: '2023-01-01T12:04:05Z'
        lockedExpiryDate:
          type: string
          format: date-time
          description: The date and time when the pin code will be unlocked.
          example: '2023-01-01T12:04:05Z'
        lastLockOverrideDate:
          type: string
          format: date-time
          description: >-
            This is the last date and time when the lock was unlocked by admin
            manually.
          example: '2023-01-01T12:04:05Z'
  headers:
    XRequestId:
      description: >
        Developer-provided header parameter or Circle-generated universally
        unique identifier (UUID v4). Useful for identifying a specific request
        when communicating with Circle Support.
      schema:
        $ref: '#/components/schemas/XRequestId'
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            type: object
            title: BadRequestResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 400
              message: Bad request.
      description: Request cannot be processed due to a client error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotAuthorized:
      content:
        application/json:
          schema:
            type: object
            title: NotAuthorizedResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 401
              message: Malformed authorization.
      description: >-
        Request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PREFIX:ID:SECRET
      description: >-
        Circle's API Keys are formatted in the following structure
        "PREFIX:ID:SECRET". All three parts are required to make a successful
        request.

````