> ## 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 an event. Members who join it receive free spin rewards. A new event is inactive by default.
> * Four join modes are available: All (all members of the platform), Add (a list of member accounts), API (by event ID) and Channel (channels of the platform):
> * a. channelIDList only applies when joinOption is cha.
> * b. memberList only applies when joinOption is add.
> * An event can be bound to multiple games.
> * A member can join an event only once, until the event is full. When the member enters the game, the join mode decides whether the member receives the reward.
> * Free spins use a fixed bet amount. Because bet options differ between games, the system picks the closest available bet; 0 picks the lowest bet.
> * A player's total free spin winnings must be at least the minimum withdrawal amount to be paid out.
> * If a player's total free spin winnings exceed the maximum withdrawal amount, the player receives only the maximum withdrawal amount.

## Path

```text theme={null}
POST {host}/api/v1.0/event/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>`eventID`</td><td>string</td><td>Yes</td><td>✓</td><td>Event ID (allowed characters: `a-z A-Z 0-9 _`)</td></tr>
    <tr><td>`startTime`</td><td>string</td><td>Yes</td><td>✓</td><td>Start time (ISO 8601 without time zone: yyyy-MM-ddTHH:mm:ss)</td></tr>
    <tr><td>`endTime`</td><td>string</td><td>Yes</td><td>✓</td><td>End time (ISO 8601 without time zone: yyyy-MM-ddTHH:mm:ss)</td></tr>
    <tr><td>`zoneID`</td><td>string</td><td>Yes</td><td>✓</td><td>Time zone used to display event times to players (GMT-12 to GMT+12)</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</td></tr>
    <tr><td>`gameIDList`</td><td>string</td><td>Yes</td><td>✓</td><td>Game IDs that can be used (comma-separated)</td></tr>
    <tr><td>`bet`</td><td>number</td><td>Yes</td><td>✓</td><td>Bet (up to 2 decimal places)</td></tr>
    <tr><td>`freeSpinTimes`</td><td>number</td><td>Yes</td><td>✓</td><td>Number of free spins</td></tr>
    <tr><td>`maxMemberCount`</td><td>number</td><td>Yes</td><td>✓</td><td>Maximum number of players</td></tr>
    <tr><td>`minWithdraw`</td><td>number</td><td>Yes</td><td>✓</td><td>Minimum withdrawal amount (up to 2 decimal places)</td></tr>
    <tr><td>`maxWithdraw`</td><td>number</td><td>Yes</td><td>✓</td><td>Maximum withdrawal amount (up to 2 decimal places)</td></tr>
    <tr><td>`joinOption`</td><td>string</td><td>Yes</td><td>✓</td><td>Join type (api, add, all, cha)</td></tr>
    <tr><td>`channelIDList`</td><td>string</td><td>No</td><td>✓</td><td>Channel IDs (comma-separated)</td></tr>
    <tr><td>`memberList`</td><td>string</td><td>No</td><td>✓</td><td>Accounts to bind (comma-separated)</td></tr>
    <tr><td>`note`</td><td>string</td><td>No</td><td>✓</td><td>Note</td></tr>
    <tr><td>`sign`</td><td>string</td><td>Yes</td><td /><td>Signature. See [Signature](https://doc.va777.net/en/v1/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</td></tr>
    <tr><td>`status`</td><td>object</td><td>Response status. See [Response format](https://doc.va777.net/en/v1/guides/request-format.md#response-format)</td></tr>
  </tbody>
</table>

### Response example

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


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