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

# Create Brand

> Create a new brand configuration.

> `POST` /platform/api/brands

<Note>
  * List of the betTemplateUuid's are available in the overview page.
  * How to get available jackpotGroupUuid's can be found in the Get Jackpot Groups page.
</Note>

### Headers

| Name                                                                 | Type     | Description                                                          |
| -------------------------------------------------------------------- | -------- | -------------------------------------------------------------------- |
| **<span style={{color: "rgb(var(--primary)"}}>Authorization</span>** | `string` | Bearer token authorization header (format: `Bearer your_token_here`) |

### Request Parameters

| Name                                                                    | Type     | Required | Description                              |
| ----------------------------------------------------------------------- | -------- | -------- | ---------------------------------------- |
| **<span style={{color: "rgb(var(--primary)"}}>name</span>**             | `string` | Yes      | Brand name                               |
| **<span style={{color: "rgb(var(--primary)"}}>maxWin</span>**           | `number` | No       | Maximum win limit for brand players      |
| **<span style={{color: "rgb(var(--primary)"}}>payout</span>**           | `number` | No       | Brand payout percentage                  |
| **<span style={{color: "rgb(var(--primary)"}}>apiKey</span>**           | `string` | Yes      | Public RGS API access key                |
| **<span style={{color: "rgb(var(--primary)"}}>betTemplateUuid</span>**  | `string` | Yes      | Bet template identifier                  |
| **<span style={{color: "rgb(var(--primary)"}}>jackpotGroupUuid</span>** | `string` | Yes      | Jackpot group identifier                 |
| **<span style={{color: "rgb(var(--primary)"}}>server</span>**           | `string` | Yes      | Wallet server URL                        |
| **<span style={{color: "rgb(var(--primary)"}}>authHeader</span>**       | `string` | Yes      | Authentication token for wallet requests |

### Response Parameters

| Name                                                         | Type     | Description          |
| ------------------------------------------------------------ | -------- | -------------------- |
| **<span style={{color: "rgb(var(--primary)"}}>brand</span>** | `object` | Created brand object |

<ResponseExample>
  ```http Request theme={null}
  POST /platform/api/brands
  Content-Type: application/json
  Authorization: Bearer your_token_here
  {
      "name": "New Brand",
      "maxWin": 1000000,
      "payout": 96,
      "apiKey": "rgs_key_example",
      "betTemplateUuid": "bt-001",
      "jackpotGroupUuid": "jp-001",
      "server": "https://wallet.example.com",
      "authHeader": "Bearer wallet_token_example"
  }
  ```

  ```json Response 200 theme={null}
  {
      "brand": {
          "uuid": "b12c4e5f-7890",
          "name": "New Brand",
          "maxWin": "1000000",
          "payout": "96",
          "betTemplateUuid": "bt-001",
          "jackpotGroup": {
          "uuid": "jp-001",
          "name": "Europe Jackpot",
          "currency": "EUR"
      },
          "apiKey": "rgs_key_example",
          "server": "https://wallet.example.com",
          "header": "wallet_token_example",
          "accessToken": "access_token_example"
      }
  }
  ```
</ResponseExample>

***

### Error

<Note>If an error occurs while processing a request, the API will return a response with `HTTP Status Code: 400 Bad Request`</Note>

| Name                                                           | Type     | Description                               |
| -------------------------------------------------------------- | -------- | ----------------------------------------- |
| **<span style={{color: "rgb(var(--primary)"}}>message</span>** | `string` | Error code describing the specific issue. |

<ResponseExample>
  ```http Request theme={null}
  GET /platform/api/brands
  Content-Type: application/json
  {
      "name": "name",
      "maxWin": "1000000",
      "payout": "96",
      "apiKey": "apiKey",
      "betTemplateUuid": "betTemplateUuid",
      "jackpotGroupUuid": "jackpotGroupUuid",
      "server": "walletServer",
      "authHeader": "walletAuthHeader"
  }
  ```

  ```json Response 200 theme={null}
  {
      "brand": {
          "uuid": "uuid",
          "name": "name",
          "maxWin": "10000000",
          "payout": "95",
          "betTemplateUuid": "uuid",
          "jackpotGroup": {
              "uuid": "uuid",
              "name": "name",
              "currency": "EUR"
          },
          "apiKey": "apiKey",
          "server": "server",
          "header": "header"
          "accessToken": "accessToken"
      }
  }
  ```
</ResponseExample>

### Possible Errors

| messageKey                         | message                                                                    |
| ---------------------------------- | -------------------------------------------------------------------------- |
| error.brand.already.exists         | Brand with name = \[\$name] already exists                                 |
| error.brand.api.key.already.exists | Brand with api key = \[\$apiKey] already exists                            |
| error.bet.template.not.found       | Bet template not found by uuid=\$uuid                                      |
| error.operator.uuid.not.found      | Operator not found by uuid=\[\$uuid]                                       |
| error.jackpot.group.uuid.not.found | Jackpot group not found by uuid=\[\$uuid]                                  |
| error.user.no.access.operator      | User\[uuid = \$userUuid] has no access to Operator\[uuid = \$operatorUuid] |
