> For the complete documentation index, see [llms.txt](https://scorpioplay.gitbook.io/scorpio-play-casino-api-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scorpioplay.gitbook.io/scorpio-play-casino-api-doc/api-reference/openapi/v1-operator-create.md).

# /v1/operator/create

## Create a new sub-operator under the authenticated operator

<mark style="color:$success;">`POST`</mark>`/v1/operator/create`

Allows an authenticated operator to create a new sub-operator under their hierarchy. The new operator will inherit certain properties from the parent operator, and the parent operator must have sufficient level to create sub-operators. Once the sub-operator is created, you will be able to log in to our back office with your sub-operator's id and password but the new account should be approved by admin before log in.

**Headers**

| Name          | Value                |
| ------------- | -------------------- |
| Authorization | `Bearer <API_TOKEN>` |
| Content-Type  | `application/json`   |
| Accept        | `application/json`   |

**Body**

```json
{
  "operatorId": "sub_operator_1",
  "password": "##StrongPassword@@",
  "name": "Sub Operator 1",
  "currency": [
    "USD"
  ],
  "ggrRate": 5,
  "level": "operator",
  "parentId": "parent_operator_1",
  "callbackURL": "https://example.com/api/callback",
  "allowedIPs": [
    "1.1.1.1"
  ]
}
```

<table><thead><tr><th width="119">Field</th><th width="135">Data Type</th><th width="386">Description</th><th>Mandatory</th></tr></thead><tbody><tr><td>operatorId</td><td>string</td><td>Unique identifier for the operator or sub-operator</td><td>Required</td></tr><tr><td>password</td><td>string</td><td>Login password for the operator account (must meet security requirements)</td><td>Required</td></tr><tr><td>name</td><td>string</td><td>Display name of the operator</td><td>Required</td></tr><tr><td>currency</td><td>array&#x3C;string></td><td>List of supported currency codes (ISO 4217, e.g. <code>USD</code>)</td><td>Optional</td></tr><tr><td>ggrRate</td><td>number</td><td>Gross Gaming Revenue (GGR) percentage applied to the operator (0%~100%)</td><td>Required</td></tr><tr><td>level</td><td>string</td><td>Operator hierarchy level (e.g. <code>operator</code>, <code>agent</code>)</td><td>Required</td></tr><tr><td>parentId</td><td>string</td><td>Parent operator ID in the operator hierarchy</td><td>Optional</td></tr><tr><td>callbackURL</td><td>string</td><td>Callback endpoint for transaction and game event notifications</td><td>Optional</td></tr><tr><td>allowedIPs</td><td>array&#x3C;string></td><td>Whitelisted IP addresses allowed to access the API</td><td>Optional</td></tr></tbody></table>

**Response**

```json
{
  "success": true,
  "message": "OK",
  "data": {
    "id": "new_child_operator_id",
    "token": "token-string-do-not-share-with-anyone"
  }
}
```

<table><thead><tr><th width="120">Field</th><th width="123">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>success</td><td>boolean</td><td>Indicates whether the request was successfully processed</td></tr><tr><td>message</td><td>string</td><td>Human-readable status message</td></tr><tr><td>data.id</td><td>string</td><td>Unique identifier of the newly created operator</td></tr><tr><td>data.token</td><td>string</td><td>Authentication token for the operator (must be kept confidential)</td></tr></tbody></table>
