Hesh Docs
  • Welcome to Hesh documentation
  • Introduction
    • 💡What is Hesh?
    • ✨Key Features
    • ⚠️Before start
  • Manuals
    • 💎Product management
      • Managing products and catalogs
      • Searching products
      • Product configuration
        • Description
        • Workflows
          • Task template
          • Additional tasks
          • Warnings
        • Parameters
          • "Add parameter" pop-up
          • Variants
      • Publishing and versioning
        • Product version preview
    • 🛠️Production
      • Production page
        • "Info" pop-up
        • Production page view options
      • Searching, sorting and filtering productions
      • Launching productions
      • Bulk actions with productions
      • Production management
        • Statuses
        • Progress bar
        • Production details editing
        • Components management
        • Tags
        • Warnings
      • Production workflow
        • Canvas
        • Task management on canvas
        • Task
          • "Related tasks" section
          • "Time tracking" section
          • "Performers" section
          • "Rewards" section
        • Management of failed tasks
    • 📑Task Table
      • Introduction
      • View
      • Searching, sorting and filtering tasks
      • Bulk actions
    • 🏬Departments
    • 🤵Users
      • Managing users
      • General Information
      • Security
      • Position
      • Permissions
      • Managing day-offs
    • ⚙️Settings
      • General
      • Production
      • Mobile app
    • 📳Mobile App
      • Home
      • Performer task screen
        • Task list
        • Grouping & Viewing
        • Filtering, searching and sorting
      • QR-Scan
      • Production task list
        • General
        • More action
        • View
      • Task screen
        • Header & Quick Action
        • Task details
      • Assignee management
      • Statistic
      • Settings
    • 📈Analytics
    • 🧬Public API
      • Clients
      • Orders
      • Rewards
      • Users
      • Tags
  • Getting started
    • Fundamentals
      • First product creation
      • Create departments and positions
Powered by GitBook
On this page
  • Create users in batch
  • Method
  • Method Returns
  • Permissions required
  • Request
  • Response
  1. Manuals
  2. Public API

Users

Create users in batch


This method allows creating multiple users in a single request.

Method

POST /api.hesh.app/api/v1/public/users/batch

Method Returns

The method returns a list of created user objects with their details, including IDs, status, and other metadata

Permissions required

Requires x-tenant-id (UUID v4) in the request header to identify the tenant.

Request

  • Headers:

    • x-tenant-id (string, UUID v4) - Tenant ID Example: 40dd0c53-2fa7-4193-82ae-14d4e62c20fb

  • Body (application/json):

{
  "users": [
    {
      "external_user_id": "example@gmail.com",
      "email": "example@gmail.com",
      "first_name": "Vova",
      "last_name": "Smith",
      "phone": "38000"
    }
  ]
}
  • Field users: An array containing user objects with the following fields:

    • external_user_id (string): External identifier for the user (e.g., email).

    • email (string): The user's email address.

    • first_name (string): The user's first name.

    • last_name (string): The user's last name.

    • phone (string): The user's phone number.

Path parameters

This method does not require any additional path parameters.

Response

  • 200 OK: Successfully created clients. A list of client objects is returned.

Response body (application/json):

[
  {
    "id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
    "email": "example@gmail.com",
    "avatar_image_url": "https://storage.googleapis.com/hesh-company-user-image/d81b1b14-c9c5-4d6e-bbb7-802956834bd0-thumb-1920-238870.jpg",
    "first_name": "Vova",
    "last_name": "Smith",
    "external_user_id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
    "full_name": "Luke Smith",
    "phone": "38000",
    "status": "Active",
    "created_at": "2023-08-25T09:07:21.759Z",
    "userVacations": [
      {
        "start_at": "2024-09-02T21:00:00.000Z",
        "end_at": "2024-09-15T21:00:00.000Z"
      }
    ]
  }
]

Response fields:

  • id (string, UUID): The unique identifier of the created user

  • email (string): The user's email address

  • avatar_image_url (string): URL to the user's avatar image

  • first_name (string): The user's first name

  • last_name (string): The user's last name

  • external_user_id (string): The external identifier for the user

  • full_name (string): The user's full name

  • phone (string): The user's phone number

  • status (string): The user's current status (e.g., Active)

  • created_at (string, ISO 8601): The timestamp when the user was created.

  • userVacations (array of objects): List of vacation periods assigned to the user. Each object includes:

    • start_at (string, ISO 8601): The start date of the vacation

    • end_at (string, ISO 8601): The end date of the vacation

Error Codes:

  • 400 Bad Request — Invalid data in the request

  • 401 Unauthorized — Missing or incorrect x-tenant-id

  • 500 Internal Server Error — Internal server error

PreviousRewardsNextTags

Last updated 4 months ago

🧬