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

# Create an operator group

> Creates an operator group and returns it under `operator_group`.

`role` is required and takes the role's dashed uuid. The new group comes back under `operator_group`.

> [!NOTE]
>
> The SDK samples get their client from credentials your app registers once when it starts, as shown in [Authentication](https://exsited.mintlify.site/authentication.md#set-up-a-client). To try the call here, click **Try it**, set `host` to your Exsited API host name and paste an access token from [Get an access token](https://exsited.mintlify.site/api-reference/authentication/get-an-access-token.md). To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its `-d` payload.


## OpenAPI

````yaml POST /settings/operator_groups
openapi: 3.1.0
info:
  title: Exsited API
  version: v4
servers:
  - url: https://{host}/api/v4
    variables:
      host:
        default: your-api-host.example.com
        description: Your Exsited API host name, without https://.
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Accounts
  - name: Account emails
  - name: Account groups
  - name: Communications
  - name: Communication profiles
  - name: Orders
  - name: Quote orders
  - name: Express
  - name: Usages
  - name: Sales reps
  - name: Gift certificates
  - name: Invoices
  - name: Pro-forma invoices
  - name: Payments
  - name: Refunds
  - name: Credit notes
  - name: Credit note applications
  - name: Reconciliations
  - name: Items
  - name: Inventory adjustments
  - name: Units of measurement
  - name: Zones
  - name: Shipping packages
  - name: Shipping rules
  - name: Fulfillment profiles
  - name: Fulfillment terms
  - name: Item fulfillments
  - name: Item receipts
  - name: Bookings
  - name: Rental assets
  - name: Return merchandise authorisations
  - name: Purchase orders
  - name: Purchase invoices
  - name: Purchase payments
  - name: Purchase refunds
  - name: Purchase credit notes
  - name: Purchase credit note applications
  - name: Purchase express
  - name: Return vendor authorizations
  - name: ABA files
  - name: Receive terms
  - name: Labours
  - name: Tasks
  - name: Timesheets
  - name: Milestones
  - name: Employees
  - name: Departments
  - name: Designations
  - name: Teams
  - name: Time periods
  - name: Workflows
  - name: Workflow settings
  - name: Events
  - name: Custom events
  - name: System events
  - name: Approvals
  - name: Approval profiles
  - name: Approval user groups
  - name: Alerts
  - name: Alert responsibility settings
  - name: Alert responsibilities
  - name: Action scripts
  - name: Note groups
  - name: Note attachments
  - name: Instance settings
  - name: Accounting codes
  - name: Additional codes
  - name: Billing periods
  - name: Charging periods
  - name: Pricing periods
  - name: Invoice terms
  - name: Days of the month
  - name: Countries
  - name: Salutations
  - name: Document templates
  - name: Email templates
  - name: Roles
  - name: Operators
  - name: Operator groups
  - name: User settings
  - name: Custom attributes
  - name: Custom components
  - name: Custom features
  - name: Custom fields
  - name: Custom forms
  - name: Attribute attachments
  - name: Portal
  - name: Integration connections
  - name: External databases
  - name: Reports
  - name: Applications
  - name: Organisation
  - name: Child organisations
  - name: Webhooks
paths:
  /settings/operator_groups:
    post:
      tags:
        - Operator groups
      summary: Create an operator group
      description: >-
        `role` is required and takes the role's dashed uuid. The new group comes
        back under `operator_group`.
      operationId: operator_groups_create_settings_operator_group
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - operator_group
              properties:
                operator_group:
                  type: object
                  required:
                    - role
                  properties:
                    name:
                      type: string
                      description: The group's name.
                    display_name:
                      type: string
                      description: The name shown for the group.
                    description:
                      type: string
                      description: A description of the group.
                    role:
                      type: string
                      description: The role's dashed uuid. The `rol_` id is refused.
                      example: 3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73
            example:
              operator_group:
                name: Support
                display_name: Support team
                description: Handles customer support
                role: 3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73
      responses:
        '201':
          description: The new group, under `operator_group`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatorGroupResponse'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST "$EXSITED_BASE_URL/api/v4/settings/operator_groups" \
              -H "Authorization: Bearer $ACCESS_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{
                "operator_group": {
                  "name": "Support",
                  "display_name": "Support team",
                  "description": "Handles customer support",
                  "role": "3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73"
                }
              }'
        - lang: python
          label: Python
          source: |
            from exsited import build_client

            client = build_client()

            response = client.operator_groups.create_settings_operator_group(
                {
                    "operator_group": {
                        "name": "Support",
                        "display_name": "Support team",
                        "description": "Handles customer support",
                        "role": "3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73",
                    },
                },
            )
            print(response.data)
        - lang: javascript
          label: JavaScript
          source: >
            import {buildClient} from 'exsited';


            const client = await buildClient();


            const response = await
            client.operatorGroups.createSettingsOperatorGroup({
                operator_group: {
                    name: 'Support',
                    display_name: 'Support team',
                    description: 'Handles customer support',
                    role: '3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73',
                },
            });

            console.log(response.data);
        - lang: php
          label: PHP
          source: |
            use Exsited\Client\ClientRegistry;

            $client = ClientRegistry::buildClient();

            $response = $client->operatorGroups->createSettingsOperatorGroup(
                [
                    'operator_group' => [
                        'name' => 'Support',
                        'display_name' => 'Support team',
                        'description' => 'Handles customer support',
                        'role' => '3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73',
                    ],
                ],
            );
            print_r($response->data);
        - lang: java
          label: Java
          source: >
            import com.exsited.client.ApiResponse;

            import com.exsited.client.ClientRegistry;

            import com.exsited.client.ExsitedClient;

            import
            com.exsited.resources.operator_groups.operator_groups_dto.OperatorGroupsDto.SettingsOperatorGroup;

            import java.util.Map;


            ExsitedClient client = ClientRegistry.buildClient();


            ApiResponse<SettingsOperatorGroup> response =
            client.operatorGroups().createSettingsOperatorGroup(
                    Map.of("operator_group", Map.of("name", "Support",
                                    "display_name", "Support team",
                                    "description", "Handles customer support",
                                    "role", "3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73")));
            System.out.println(response.getMap());
        - lang: csharp
          label: .NET
          source: >
            using Exsited.Client;


            await using var client = ExsitedClient.BuildClient();


            var response = await
            client.OperatorGroups.CreateSettingsOperatorGroupAsync(
                new Dictionary<string, object?>
                {
                    ["operator_group"] = new Dictionary<string, object?>
                    {
                        ["name"] = "Support",
                        ["display_name"] = "Support team",
                        ["description"] = "Handles customer support",
                        ["role"] = "3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73",
                    },
                });

            Console.WriteLine(response.Json);
        - lang: dart
          label: Dart
          source: >
            import 'package:exsited/exsited.dart';


            final client = buildClient();


            final response = await
            client.operatorGroups.createSettingsOperatorGroup(
              {
                'operator_group': {
                  'name': 'Support',
                  'display_name': 'Support team',
                  'description': 'Handles customer support',
                  'role': '3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73',
                },
              },
            );

            print(response.map);
        - lang: go
          label: Go
          source: "import (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\texsited \"github.com/exsited/exsited-sdk-go/v4\"\n)\n\nclient, err := exsited.BuildClient(nil)\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer client.Close()\n\nresponse, err := client.OperatorGroups().CreateSettingsOperatorGroup(context.Background(), map[string]any{\n\t\"operator_group\": map[string]any{\n\t\t\"name\": \"Support\",\n\t\t\"display_name\": \"Support team\",\n\t\t\"description\": \"Handles customer support\",\n\t\t\"role\": \"3f6b8c2e-7a1d-4e95-b0c4-8d2a6f1e9b73\",\n\t},\n}, nil)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Println(response.Map)\n"
components:
  schemas:
    OperatorGroupResponse:
      type: object
      properties:
        operator_group:
          $ref: '#/components/schemas/OperatorGroup'
    OperatorGroup:
      type: object
      description: One operator group.
      properties:
        object:
          type: string
        id:
          type: string
          description: The group's `rol_` id.
        name:
          type: string
        display_name:
          type: string
        description:
          type: string
        status:
          type: string
        role:
          $ref: '#/components/schemas/OperatorGroupRole'
        departments:
          type: array
          items:
            $ref: '#/components/schemas/OperatorGroupDepartment'
        created_on:
          type: string
        last_updated_on:
          type: string
        created_by: {}
        last_updated_by: {}
        href:
          type: string
    OperatorGroupRole:
      type: object
      description: >-
        The group's role. A read names it as a `role` with its `rol_` id and
        `href`; an update answer names it as a `reference` with the dashed uuid
        and no `href`.
      properties:
        object:
          type: string
        id:
          type: string
        name:
          type: string
        href:
          type: string
    OperatorGroupDepartment:
      type: object
      description: >-
        A department the group belongs to. `id` is null on the departments the
        instance ships with.
      properties:
        object:
          type: string
        id:
          type:
            - string
            - 'null'
        name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An access token from `POST /api/v4/oauth2/token`. The SDKs get and renew
        it for you.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.