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

> The CometChat user import API allows customers to import their users’ data into the CometChat systems.

# Import Users

## Constraints

| Item                 | Constraint | Notes                                                                       |
| -------------------- | ---------- | --------------------------------------------------------------------------- |
| Entities per request | 50         | Transmit up to 50 entities within a single request for efficient processing |
| Requests per minute  | 60         | Rate limit for data import endpoints; exceeding returns a rate limit error  |

For the complete error reference, see [Error Guide](/articles/error-guide).


## OpenAPI

````yaml post /data_import/users
openapi: 3.0.0
info:
  title: Data Import APIs
  description: Manage messages, users, groups for a particular app using our Chat API.
  version: '3.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: API Keys
    description: The API keys are used to authorise the APIs
  - name: Roles
    description: The roles are used to give user access rights
  - name: Users
    description: The REST collection for users.
  - name: Auth Tokens
    description: The auth tokens are used to login end users using client SDKs.
  - name: Blocked Users
    description: The REST collections for blocked users.
  - name: Friends
    description: List,add and remove friends by passing UID in path variables
  - name: Groups
    description: The REST collections for groups.
  - name: Banned Users
    description: Ban and Unban user by passing other UID in path variables.
  - name: Group Members
    description: The REST collections for group members.
  - name: Messages
    description: The REST collections for messages.
  - name: Conversations
    description: The REST collections for conversations.
  - name: Restrict Features
    description: Allows Restricting Features
  - name: Metrics
    description: Allows accessing Data Metrics
  - name: Triggers
    description: Allows adding triggers to a webhook.
  - name: Webhooks
    description: Allows accessing Webhooks.
  - name: Push Notifications
    description: Allows configuring Push Notifications.
paths:
  /data_import/users:
    post:
      tags:
        - Users
      summary: Import Users
      description: >-
        The CometChat user import API allows customers to import their users’
        data into the CometChat systems.
      operationId: import-users
      requestBody:
        content:
          application/json:
            schema:
              properties:
                users:
                  description: Wrapper for the users.
                  required:
                    - uid
                  properties:
                    <uid>:
                      description: >-
                        Wraps a user object. The <b>&lt;uid&gt;</b> will be a
                        primary key/unique Identifier of the user.
                      required:
                        - uid
                        - name
                      properties:
                        uid:
                          description: >-
                            The value should be the same as value of the
                            placeholder <b>&lt;uid&gt;</b> which wraps the user
                            object.
                          type: string
                        name:
                          description: name of the user.
                          type: string
                        avatar:
                          description: URL to the profile picture of the user.
                          type: string
                        link:
                          description: Profile page URL of the user.
                          type: string
                        role:
                          description: >-
                            Role of the user. Should be created already via the
                            Create role API.
                          type: string
                        createdAt:
                          description: ' A 10-digit UNIX timestamp at which the user was created.'
                          type: integer
                        lastActiveAt:
                          description: >-
                            A 10-digit UNIX timestamp at which the user was most
                            recently online.
                          type: integer
                        metadata:
                          description: JSON object containing Additional user information.
                          type: object
                        tags:
                          description: A string array containing usertags.
                          type: array
                          items:
                            type: string
                          default: []
                        deactivatedAt:
                          description: >-
                            A 10-digit UNIX timestamp at which the user was
                            deactivated/soft-deleted/blocked to use the chat
                            services.
                          type: integer
                      type: object
                  type: object
                  example:
                    uid1:
                      uid: uid1
                      name: uid1
                      avatar: >-
                        https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp
                      createdAt: '1673421419'
                      metadata:
                        key: value
                      lastActiveAt: '1673421425'
              type: object
      responses:
        '200':
          description: Import User(s)
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      <uid>:
                        type: object
                        allOf:
                          - properties:
                              lastActiveAt:
                                type: integer
                                description: Unix timestamp
                              deactivatedAt:
                                type: integer
                                description: Unix timestamp
                            type: object
                          - $ref: '#/components/schemas/userSchema'
                    type: object
                type: object
              example:
                data:
                  uid1:
                    success: true
                    data:
                      uid: uid1
                      name: uid1
                      avatar: >-
                        https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp
                      metadata:
                        key: value
                      status: offline
                      role: default
                      lastActiveAt: 1673421425
                      createdAt: 1673421419
      security:
        - apiKey: []
components:
  schemas:
    userSchema:
      description: Response data
      properties:
        uid:
          type: string
        name:
          type: string
        avatar:
          type: string
        metadata:
          properties:
            email:
              type: string
          type: object
        status:
          type: string
        role:
          type: string
        createdAt:
          type: integer
      type: object
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````