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

# Create a user



## OpenAPI

````yaml post /users
openapi: 3.1.0
info:
  title: joyfill
  version: '1.1'
servers:
  - url: https://api-joy.joyfill.io/v1
security:
  - sec0: []
paths:
  /users:
    post:
      summary: Create a user
      operationId: create-a-user
      parameters:
        - name: Authorization
          in: header
          description: >-
            Supports both API Key and User Access Token authorization. See
            https://joyfill.mintlify.app/api/authentication
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifier:
                  type: string
                  description: >-
                    Specifies a user's unique ID. Maximum length is 80
                    characters.  * Don't use personally identifiable information
                    (PII) such as the user's email address, legal name, or phone
                    number. Identifier cannot be changed after creation. Leave
                    the identifier param empty to have Joyfill auto generate an
                    identifier.
                group:
                  type: string
                  description: >-
                    The identifier of the group you want to add the user to. If
                    no group exists with the specified identifier then one will
                    automatically be created.
                issueAccessToken:
                  type: boolean
                  description: >-
                    Determines whether to create an access token for the user.
                    If set to true, an access token will be generated and
                    returned in the token field. This token can be used in API
                    request instead of API Keys.
                  default: false
                accessTokenExpiration:
                  type: string
                  description: >-
                    Millisecond timestamp of token expiration date. Expired
                    tokens will not be able to make API requests. Leave blank to
                    issue an access token that never expires.
                  format: date-time
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "type": "String",
                      "identifer": "String",
                      "group": "String (optional)",
                    }
                Token Creation:
                  value: |-
                    {
                      "type": "String",
                      "identifer": "String",
                      "group": "String (optional)",
                      "token": "String"
                    }
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: String
                  identifer:
                    type: string
                    example: String
                  group:
                    type: string
                    example: String (optional)
                  token:
                    type: string
                    example: String
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "message": "Invalid Request"
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid Request
      deprecated: false
      security: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````