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

# Insert / update / inactivate users (async)



## OpenAPI

````yaml /tango_common/integrations/guides/user-provisioning-nonbu-api.yaml put /v1/usermgmt/batch/users
openapi: 3.1.0
info:
  title: Tango User Provisioning API (non-BU)
  version: '1.2'
  description: |
    Async REST API: same endpoint as the BU variant
    (`/v1/usermgmt/batch/users`) but for client environments without a
    Business Unit layer. The `brands[]` items omit `business_unit`.

    Creates, updates, or inactivates user accounts with Brand / Country /
    Region / Role / Entity-Security scoping. See companion BU spec for the
    full semantics (special cases for `user_type = GENERAL_USER`, the
    `status = "N"` inactivation path, and the Country = ALL convention all
    apply here too).
  x-direction: inbound
  x-source: Client System
  x-destination: Tango
servers:
  - url: https://api.tangoanalytics.com
    description: Production
  - url: https://testapi.tangoanalytics.com
    description: Test (SIT/UAT)
security:
  - xClientHeader: []
    xApiKeyHeader: []
tags:
  - name: User Provisioning
  - name: Status
paths:
  /v1/usermgmt/batch/users:
    put:
      tags:
        - User Provisioning
      summary: Insert / update / inactivate users (async)
      operationId: putUsersBatchNonBU
      parameters:
        - $ref: '#/components/parameters/XClient'
        - $ref: '#/components/parameters/XApiKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserBatchRequest'
      responses:
        '200':
          description: Accepted for async processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
components:
  parameters:
    XClient:
      name: x-client
      in: header
      required: true
      schema:
        type: string
    XApiKey:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
  schemas:
    UserBatchRequest:
      type: object
      required:
        - records
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/UserRecord'
    AcceptedResponse:
      type: object
      required:
        - status
        - gu_id
      properties:
        status:
          type: string
          enum:
            - OK
            - Error
        status_message:
          type: string
        gu_id:
          type: string
          format: uuid
    UserRecord:
      type: object
      required:
        - user_name
        - status
      properties:
        user_name:
          type: string
        first_name:
          type: string
          description: Required for create/update.
        last_name:
          type: string
          description: Required for create/update.
        email:
          type: string
          format: email
          description: Required for create/update.
        user_type:
          type: string
          enum:
            - CONTRACTOR
            - CORPORATE
            - GENERAL_USER
        sso:
          type: string
          enum:
            - 'Y'
            - 'N'
        status:
          type: string
          enum:
            - A
            - 'N'
        title:
          type: string
        location:
          type: string
        default_brand:
          type: string
        default_country:
          type: string
        data_access_level:
          type: string
          enum:
            - F
            - R
            - RR
        brands:
          type: array
          items:
            $ref: '#/components/schemas/BrandAssignment'
    BrandAssignment:
      type: object
      required:
        - brand_name
        - country
        - region
        - roles
      description: |
        Non-BU variant: no `business_unit` field. The rest of the assignment
        mirrors the BU variant.
      properties:
        brand_name:
          type: string
        country:
          type: string
          description: '`ALL` or comma-separated ISO 3-letter codes.'
        region:
          type: string
          description: '`ALL` or comma-separated region identifiers.'
        roles:
          type: string
          description: Tango Profile Name(s). Comma-separated for multi-role.
        entity_security:
          type: array
          items:
            $ref: '#/components/schemas/EntitySecurity'
    EntitySecurity:
      type: object
      required:
        - entity_type
        - full_access
      properties:
        entity_type:
          type: string
          enum:
            - LEASE
            - PROJECT
        full_access:
          type: string
          enum:
            - 'Y'
            - 'N'
        restrictions:
          type: array
          items:
            type: object
            required:
              - attribute
              - value
            properties:
              attribute:
                type: string
                enum:
                  - SEC_ATTR1
                  - SEC_ATTR2
              value:
                type: string
  securitySchemes:
    xClientHeader:
      type: apiKey
      in: header
      name: x-client
    xApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````