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

# Create free spin event

> Create free spin event: request parameters, response format and response codes.

> [!NOTE]
>
> * Creates a free spin event.

## Path

```text theme={null}
POST {host}/vendor/v2.0/freespin/create
```

## Headers

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="56%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`Authorization`</td><td>string</td><td>Yes</td><td>Token we provide</td></tr>
    <tr><td>`Content-Type`</td><td>string</td><td>Yes</td><td>`multipart/form-data`</td></tr>
  </tbody>
</table>

## Request parameters

<table>
  <colgroup>
    <col width="27%" />

    <col width="10%" />

    <col width="7%" />

    <col width="11%" />

    <col width="45%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Signed</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`channelID`</td><td>number</td><td>Yes</td><td>✓</td><td>Channel ID (0 means all channels)</td></tr>
    <tr><td>`startTime`</td><td>string</td><td>Yes</td><td>✓</td><td>Start time (see [Time format](https://doc.va777.net/en/v2/guides/request-format.md#time-format))</td></tr>
    <tr><td>`endTime`</td><td>string</td><td>Yes</td><td>✓</td><td>End time (see [Time format](https://doc.va777.net/en/v2/guides/request-format.md#time-format))</td></tr>
    <tr><td>`eventName`</td><td>string</td><td>Yes</td><td>✓</td><td>Event name</td></tr>
    <tr><td>`currency`</td><td>string</td><td>Yes</td><td>✓</td><td>Currency (contact our business team)</td></tr>
    <tr><td>`gameIDList`</td><td>number\[]</td><td>Yes</td><td>✓</td><td>Eligible game IDs (at least 1, no duplicates, each greater than 0). In form-data, repeat the field once per value.</td></tr>
    <tr><td>`minWithdraw`</td><td>string</td><td>Yes</td><td>✓</td><td>Minimum payout (amount string, 0.01–999,999,999, up to 2 decimal places)</td></tr>
    <tr><td>`maxWithdraw`</td><td>string</td><td>Yes</td><td>✓</td><td>Maximum payout (amount string, 0.01–999,999,999, up to 2 decimal places, at least minWithdraw)</td></tr>
    <tr><td>`freeSpinTimes`</td><td>number</td><td>Yes</td><td>✓</td><td>Number of free spins (integer from 1 to 99)</td></tr>
    <tr><td>`validDays`</td><td>number</td><td>Yes</td><td>✓</td><td>Valid days (1–31)</td></tr>
    <tr><td>`joinOptions`</td><td>string\[]</td><td>Yes</td><td>✓</td><td>Join options (1–2 items, no duplicates, only auto or add). auto: every member of the channel can join until the quota is full. add: members you specify with [Grant free spins](https://doc.va777.net/en/v2/api-reference/freespin/bind.md) join until the quota is full. In form-data, repeat the field once per value.</td></tr>
    <tr><td>`allowDuplicateJoin`</td><td>string</td><td>No</td><td>✓</td><td>Whether one member can receive multiple grants (true / false; empty means false). Must be false when joinOptions includes auto.</td></tr>
    <tr><td>`maxGrantCount`</td><td>number</td><td>Yes</td><td>✓</td><td>Maximum number of grants (1–99,999)</td></tr>
    <tr><td>`maxGrantsPerMember`</td><td>number</td><td>Yes</td><td>✓</td><td>Maximum grants per member (at least 1). Must be 1 when allowDuplicateJoin=false; at least 1 when allowDuplicateJoin=true.</td></tr>
    <tr><td>`bet`</td><td>string</td><td>Yes</td><td>✓</td><td>Bet per spin (amount string, 0.01–999,999,999, up to 2 decimal places)</td></tr>
    <tr><td>`zoneID`</td><td>string</td><td>No</td><td>✓</td><td>Display time zone (GMT-12 to GMT+12; empty means GMT+8)</td></tr>
    <tr><td>`giftCodes`</td><td>string</td><td>No</td><td>✓</td><td>Gift codes (not yet supported; only applies when joinOptions includes add). JSON string format: \[\{"code":"GC2024NY","total":100}]; code is 5–10 alphanumeric characters; total is an integer of at least 1.</td></tr>
    <tr><td>`settlePerSpin`</td><td>string</td><td>No</td><td>✓</td><td>Settlement mode (true / false; true pays out on every spin; empty means false)</td></tr>
    <tr><td>`sign`</td><td>string</td><td>Yes</td><td /><td>Signature. See [Signature](https://doc.va777.net/en/v2/guides/signature.md) for how to generate it</td></tr>
  </tbody>
</table>

## Response

Success (the HTTP status code is always 200; check `status.code` for the result)

<table>
  <colgroup>
    <col width="34%" />

    <col width="12%" />

    <col width="54%" />
  </colgroup>

  <thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`data`</td><td>object</td><td /></tr>
    <tr><td>`data.eventID`</td><td>string</td><td>Event ID (24-character hex)</td></tr>
    <tr><td>`status`</td><td>object</td><td>Response status. See [Response format](https://doc.va777.net/en/v2/guides/request-format.md#response-format)</td></tr>
  </tbody>
</table>

### Response example

```json theme={null}
{
  "data": {
    "eventID": "abccc1234567890aaaaa1254"
  },
  "status": {
    "code": "0",
    "message": "success",
    "datetime": "2022-07-01T10:13:54.920+08:00",
    "traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
  }
}
```

## Response codes

Besides the [common codes](https://doc.va777.net/en/v2/reference/response-codes.md), this API may also return:

| Code | Description |
| - | - |
| `206` | Game does not exist |
| `429` | Too many requests |


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