# Marketing Campaigns

On the Marketing Campaigns page, you can set up rewards for activities for certain user groups.

#### The Marketing Campaigns feature supports the following types of rewards:

* **Registration reward**: users receives a specified amount of tokens after registration.
* **KYC reward**: users receive a specific amount of tokens for completing Know\
  Your Customer (KYC) tasks.
* **Cashback reward**: users receive tokens as a percentage of the platform’s GGR.
* **Deposit reward**: users are rewarded after depositing a specific amount to their platform\
  account.
* **Token purchase**: users are allowed to purchase the desired amount of tokens.
* **Custom reward**.

#### The following restrictions may be applied to reward distribution:

* Campaign date
* Campaign duration
* The number of users that can participate
* A user segment that can be defined by an API&#x20;

## Marketing Campaigns life cycle

<figure><img src="https://430841950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvZELq9hA9JLIUfXr0fB%2Fuploads%2F5PeggO5fiEYWzjy8AN03%2F11.jpg?alt=media&#x26;token=d0a3ac46-d829-4faa-8c32-5aea8e5d7e14" alt=""><figcaption><p>Marketing Campaigns Life Cycle</p></figcaption></figure>

**Campaign status:**

* **Draft**: This status is assigned by default and indicates that the campaign’s\
  settings can be edited
* **Active**: Once activated, users can be added to the campaign to earn rewards
* **Deactivated**: The campaign is deactivated, and users can no longer be added
* **Expired**: The campaign has passed its deadline or the maximum number of users\
  has been reached

## Creating a campaign

To create a campaign, click on the Create Campaign (Fig. 2) button and configure campaign settings.

<figure><img src="https://430841950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvZELq9hA9JLIUfXr0fB%2Fuploads%2F0vUf0fNd9TchyPf2DRAl%2F12.jpg?alt=media&#x26;token=95299a1b-569e-475f-831f-8a0a887e18bc" alt=""><figcaption><p>Marketing Campaigns Page Interface</p></figcaption></figure>

To create a campaign, enter its name and configure the reward. The campaign will be added to the list and assigned a Draft status. When the campaign has an Active status, users will be added to the campaign (according to automatic rules or using an API).

<figure><img src="https://430841950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvZELq9hA9JLIUfXr0fB%2Fuploads%2FsfFR7EhGBmswI0VlaMde%2Funnamed.png?alt=media&#x26;token=089aa4e6-8f96-4c13-84e4-c18f6943621e" alt=""><figcaption><p>Marketing Campaigns Popup</p></figcaption></figure>

## Campaign management

You can filter campaigns by status and date.

On the Marketing Campaigns page, you can perform the following actions with the campaign (Fig. 4):

* Change its status
* Add users to the campaign
* Check the list of users added to the campaign
* View campaign configuration
* Edit the created campaign (if assigned the Draft, Deactivated, or Expired status)
* Delete the campaign (if assigned the Draft, Deactivated, or Expired status)

<figure><img src="https://430841950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvZELq9hA9JLIUfXr0fB%2Fuploads%2FGwDgqTWBlh3gzJ8Msrlp%2F13.jpg?alt=media&#x26;token=e3bf22f2-452e-40d6-b003-0efed6512bb5" alt=""><figcaption><p>Campaign Management Options</p></figcaption></figure>

## API

The Marketing Campaigns API supports the following methods:

* **Get all Active Marketing Campaigns.** Returning a list of active marketing campaigns. It must be run before adding a user to the campaign to avoid accidentally adding a user to a campaign with a Draft/Expired/Deactivated status.
* **Get Marketing Campaigns participants by ID.** Returning a list of Marketing Campaigns participants.
* **Assign User to Marketing Campaigns**. Adding a user to the campaign.
* **Delete User from Marketing Campaigns**. Deleting a user from the campaign.

### Get all Active Marketing Campaigns

| METHOD       | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL          | <https://integration.trueplay.io/api/v1/promo-campaign/active>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| HEADER       | X-API-KEY (see value at Integration Settings)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| PARAMETERS   | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| RESPONSE     | <p>\[ </p><p>{ </p><p>  "betVolumeRule": 0,</p><p>  "createdAt": "2023-04-20T09:13:51.735Z", </p><p>  "dailyCashbackReward": 0, </p><p>  "duration": 0,</p><p>  "expirationDate": "2023-04-20", </p><p>  "fixedAmountReward": 500, </p><p>  "id": 0, </p><p>  "kycRule": true, </p><p>  "maxUserCount": 0, </p><p>  "name": "Campaing\_1", </p><p>  "p2eMultiplierReward": 1.5, </p><p>  "signUpRule": true, </p><p>  "stakingLimitCoefficientReward": 10000, </p><p>  "status": "Active" </p><p>},</p><p>{ </p><p>  "betVolumeRule": 0,</p><p>  "createdAt": "2023-04-20T09:13:51.735Z", </p><p>  "dailyCashbackReward": 0, </p><p>  "duration": 0,</p><p>  "expirationDate": "2023-04-20", </p><p>  "fixedAmountReward": 50, </p><p>  "id": 0, </p><p>  "kycRule": false, </p><p>  "maxUserCount": 0, </p><p>  "name": "string", </p><p>  "p2eMultiplierReward": 0, </p><p>  "signUpRule": true, </p><p>  "stakingLimitCoefficientReward": 15000, </p><p>  "status": "Active" </p><p>}</p><p>]</p> |
| STATUS CODES | <p>200 OK - The request is successful</p><p>400 Bad Request - Invalid request parameters provided</p><p>401 Unauthorized - Requester is unauthorized to perform an action</p><p>403 Forbidden - Requester is forbidden to perform an action</p><p>404 Not Found - Resource not found</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

<br>

### Get Marketing Campaigns participants by campaign ID

| METHOD       | GET                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL          | <https://integration.trueplay.io/api/v1/promo-campaign/{campaign\\_id}/participants>                                                                                                                                                                                                                                                                                                                                |
| HEADER       | X-API-KEY (see value at Integration Settings)                                                                                                                                                                                                                                                                                                                                                                       |
| PARAMETERS   | - id - Operator ID                                                                                                                                                                                                                                                                                                                                                                                                  |
| RESPONSE     | <p>{ </p><p>  "content": \[ </p><p>    { </p><p>      "campingId": 10, </p><p>      "createdAt": "2023-04-20T09:15:40.545Z", </p><p>      "method": "API", </p><p>      "operatorUserId": "23423", </p><p>    },</p><p>    { </p><p>      "campingId": 15, </p><p>      "createdAt": "2023-04-20T09:15:40.545Z", </p><p>      "method": "Manual", </p><p>      "operatorUserId": "97500", </p><p>    },</p><p>]</p> |
| STATUS CODES | <p>200 OK - The request is successful</p><p>400 Bad Request - Invalid request parameters provided</p><p>401 Unauthorized - Requester is unauthorized to perform an action</p><p>403 Forbidden - Requester is forbidden to perform an action</p><p>404 Not Found - Resource not found</p>                                                                                                                            |

<br>

### Assign User to the Marketing Campaigns

| METHOD       | POST                                                                                                                                                                                                                                                                                     |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL          | <https://integration.trueplay.io/api/v1/promo-campaign/{campaignId}/user/{operatorUserId}>                                                                                                                                                                                               |
| HEADER       | X-API-KEY (see value at Integration Settings)                                                                                                                                                                                                                                            |
| PARAMETERS   | <p>- Campaign ID</p><p>- Operator user ID</p>                                                                                                                                                                                                                                            |
| RESPONSE     | <p>{ </p><p>  "campingId": 0, </p><p>  "createdAt": "2023-04-20T09:17:49.302Z", </p><p>  "method": "API", </p><p>  "operatorUserId": "65464", </p><p>  "transaction": "API" </p><p>}</p>                                                                                                 |
| STATUS CODES | <p>200 OK - The request is successful</p><p>400 Bad Request - Invalid request parameters provided</p><p>401 Unauthorized - Requester is unauthorized to perform an action</p><p>403 Forbidden - Requester is forbidden to perform an action</p><p>404 Not Found - Resource not found</p> |

<br>

### Delete User from the Marketing Campaigns

| METHOD       | DELETE                                                                                                                                                                                                                                                                                   |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL          | <https://integration.trueplay.io/api/v1/promo-campaign/{campaignId}/user/{operatorUserId}>                                                                                                                                                                                               |
| HEADER       | X-API-KEY (see value at Integration Settings)                                                                                                                                                                                                                                            |
| PARAMETERS   | <p>- Campaign ID</p><p>- Operator user ID</p>                                                                                                                                                                                                                                            |
| STATUS CODES | <p>200 OK - The request is successful</p><p>400 Bad Request - Invalid request parameters provided</p><p>401 Unauthorized - Requester is unauthorized to perform an action</p><p>403 Forbidden - Requester is forbidden to perform an action</p><p>404 Not Found - Resource not found</p> |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trueplay.io/features/marketing-campaigns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
