Campaign Registration
Prerequisites¶
To sync with the API for registering campaign, make sure to issue an authorization token (API KEY). If you already have the key, request the additional permissions. Refer to Hive Server API > Notification > Push v4 > Authentication to check how to request and issue the authorization token.
API for registering campaign¶
Basic Data and Request Variables¶
| Method | POST | |||||
| URL | /push/campaigns | |||||
| Division | Field Name | Description | Type | Required | ||
|---|---|---|---|---|---|---|
| Header | Content-Type | application/json;charset=utf-8 | ||||
| Authorization | bearer {{API KEY}} | |||||
| Body | id | Essential field for editing campaign | Integer | △ | ||
| status | Essential field for editing campaign | Integer | △ | |||
| company | Company
| String | O | |||
| companyIndex | Company code (the company number registered on AppCenter) | Integer | O | |||
| Description | Description of a campaign | String | O | |||
| notice | Notification type (default: true).• true: Sent as an announcement notification.Will not be sent to users who have not agreed to receive notifications. If the sending time is at night (21:00~08:00), additional consent for night notifications is required. See Announcement Notification Workflow. • false: Sent as a game notification (mandatory operational notification). Sent regardless of user consent.※ If notifications are blocked at the device/OS level, notifications may not be delivered regardless of the value of this field. | Boolean | X | |||
| Type | Sending type
| String | O | |||
| targetingId | Targeting ID Essential field in case of targeting campaign | Integer | △ | |||
| registrant | name | Registrant name | String | X | ||
| id | Registrant id | String | O | |||
| reservation | localizing | This flag determines whether to apply the schedule based on the user's time zone when sending notifications.
| Boolean | O | ||
| startDate | startDate represents the date when the scheduled notification sending begins, and endDate represents the date when the notification sending ends.During the period between these two dates, push notifications will be sent according to the specified time ( time field).(ISO 8601 format, YYYY-MM-DD) | String | O | |||
| endDate | String | O | ||||
| time | The time of sending push (HH:mm) | String | O | |||
| gmtOffset | This field is used to specify the time zone for sending notifications when localizing is set to false. It indicates the difference (in seconds) from UTC and can have a value between -43200 and 50400. The default value is 32400, which is the offset for Korea Standard Time (KST).-18000 represents UTC-5 (EST).32400 represents UTC+9 (KST).Example: If startDate is 2025-11-06, time is 17:00, and gmtOffset is -18000, it will start sending at 2025-11-06T17:00-5:00. | Long | X | |||
| repeat | This flag indicates whether to repeat the sending of notifications during a specific period. | Boolean | O | |||
| weekday | This indicates the days of the week on which notifications will be sent repeatedly.
| Integer[] | X | |||
| skip | he date to skip sending pushes in the period of constant sending | String[] | X | |||
| distribution | enable | Whether to send distributed or not | Boolean | X | ||
| interval | The interval of distributed sending | Integer | X | |||
| count | The count of distributed sending | Integer | X | |||
| continents | The information list by selected continent (Refer to the country code) Check the CampaignContinent structure and example below | CampaignContinent[] | O | |||
| countries | The information of selected country (Refer to the country code) | String[] | O | |||
| game | gameindex | Game index | Integer | O | ||
| serverIds | The list of server ID | String[] | X | |||
| apps[] | appindex | App index | Integer | O | ||
| appid | AppId | String | O | |||
| defaultLanguage | Default setting language (Refer to the language code) | String | O | |||
| notification | {{LANGUAGE}} | Message information Check the message structure and example below | Message | X | ||
| option | badge | Badge for push notification | Integer | X | ||
| overwrite | Whether to overwrite pushes or not | Boolean | X | |||
| collapseKey | Key value for overwriting pushes | String | X | |||
| engagement | User Engagement | String | X | |||
| comment | Comment | String | X | |||
| groupKey | The group key value to expose notifications in group when a user receives notifications in iOS or Android OS environment. The notification setting chosen in the device OS is applied by default. For more details about the option, see the following documentation. | String | X | |||
| android | icon | This is the icon image file name exposed when a push notification appears on the user's device. The image file should be located in /src/main/res/drawable. See here for the supported image file formats. If you want to expose an image on the web instead of an image file, type the image URL in this field instead of an image file name. If this field is left empty, the app icon image will be exposed. | String | X | ||
| sound | This is the name of the notification sound file to be played when a push notification appears on the user's device. You can specify a sound source file included in the app bundle, and the sound source file should be located in /src/main/res/raw. If this field is left empty, the system’s default sound file is used. | String | X | |||
| priority | Priority of messages to be sent to Android devices. This priority is an FCM concept that controls when messages are sent. It can have values of NORMAL or HIGH; the default is NORMAL. For more information, see Firebase Guide.
| enum(NORMAL, HIGH) | X | |||
| ios | sound | This is the name of the notification sound source file to be played when a push notification appears on the user's device. The sound file must exist in the app container's Library/Sounds or the app's main bundle. If this field is empty, it is automatically set to "default" and the user's Apple device system default sound source is used. td> | String | X | ||
Announcement notification workflow¶
Announcement notifications are sent only if the game app user has agreed to receive them. If the sending time is between 21:00 and 08:00 the next day, additional consent for night notifications is required.
Details of the announcement notification workflow are as follows:
- If the user does not agree to receive announcement notifications, all messages set as announcements will not be sent.
- Only users who have agreed to receive announcement notifications can additionally agree to receive night notifications.
Warning
Regulations for advertising announcement notifications for Korean users
If you send announcement notifications to Korean users, they are considered advertising notifications and must comply with Article 50 of the Act on Promotion of Information and Communications Network Utilization and Information Protection. The advertising notification message must include a phrase indicating it is an advertisement and instructions for unsubscribing.
- Example of advertising notification message: (Ad) {message_body} (Unsubscribe: Change in settings)
Note
For more details about option, see the respective markets' guidelines.
- iOS: Generating a remote notification
- Android: FirebaseNotification
CampaignContinent structure¶
| Division | Field Name | Description | Type | Required |
|---|---|---|---|---|
| CampaignContinent | continent | Continent type | String | O |
| countries | The code of countries in a continent | String[] | O |
CampaignContinent Example¶
[
{
"name": "Africa",
"countries": [
"Algeria",
"Angola",
"Benin",
"Sudan",
"Swaziland",
"Tanzania",
"Togo",
"Tunisia",
"Zambia",
"Zimbabwe"
]
}
]
Message structure¶
| Division | Field Name | Description | Type | Required | |
| Message | android | title | Title | String | O |
| message | Message | String | O | ||
| messageExpanded | Expanded message | String | X | ||
| imageUrl | Image URL | String | X | ||
| ticker | Ticker | String | X | ||
| summaryText | Summarized message | String | X | ||
| iOS | title | Title | String | O | |
| message | Message | String | O | ||
| mediaUrl | Image URL | String | X | ||
Message example¶
{
"ko": {
"android": {
"messageExpanded": "(Ad) TEST(Block: Available in settings)",
"ticker": "gg",
"title": "(Ad)test",
"message": "(Ad) test (Restriction: Available in settings)",
"summaryText": "",
"imageUrl": ""
},
"ios": {
"mediaUrl": "",
"title": "Push",
"message": "(Ad) TEST (Block: Available in settings)"
},
}
}
Output result¶
| Header | Content-Type | application/json;charset=utf-8 | |
| UUID | {{UUID}} | ||
| Body | Body is empty if success | ||
Response state code¶
| Key | Value | Description |
|---|---|---|
| 200 | Success | (Body is empty) |
| 400 | Bad Request | POST data is omitted JSON format error Required element is omitted or invalid Available to check additionally with reason message in Body |
| 401 | Unauthorized | Authorization header in request message is omitted or invalid Authorization token (API KEY) is not registered No access permission to the relevant API |
| 403 | Forbidden | Authorization scheme of Authorization header is not "Bearer" (Supported Bearer only) |
| 404 | Not Found | Request URL is wrong |
| 500 | Internal Server Error | Internal error on server |
| 502 | Bad Gateway | Push gateway server is overloaded Network connects in a wrong way |
| 503 | Service Unavailable | API server or authorization server is frozen |
Sample code¶
Campaign registration¶
- Call
curl -v -L \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API KEY}" \
-d '{
"description": "TEST",
"status": 1,
"company": "gcp",
"companyIndex": 3,
"type": "B",
"targetingId": 0,
"reservation": {
"localizing": false,
"startDate": "2025-11-06",
"endDate": "2025-11-06",
"time": "17:00:00",
"gmtOffset": 32400,
"repeat": false,
"periodType": "",
"weekday": [],
"skip": []
},
"game": {
"gameName": "Step by Step",
"gameindex": 597,
"serverIds": [],
"apps": [
{
"appindex": 20009,
"appid": "com.gcp.stepbystep.android.google.global.normal",
"versions": []
}
],
"serverAll": true
},
"distribution": {
"enable": false,
"interval": 0,
"count": 0
},
"defaultLanguage": "ko",
"option": {
"badge": 1,
"engagement": "",
"overwrite": false,
"collapseKey": "0",
"comment": "",
"groupKey": "",
"android": {
"icon": "",
"sound": "",
"priority": "high"
},
"ios": {
"sound": ""
}
},
"registrant": {
"id": "test",
"name": "Test"
},
"notification": {
"ko": {
"android": {
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)",
"messageExpanded": "",
"ticker": "",
"summaryText": "",
"imageUrl": ""
},
"ios": {
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)",
"mediaUrl": ""
}
}
},
"countries": [
"KR"
],
"continents": [
{
"name": "Africa",
"countries": []
},
{
"name": "Americas",
"countries": []
},
{
"name": "Asia",
"countries": [
"South Korea"
]
},
{
"name": "Europe",
"countries": []
},
{
"name": "Oceania",
"countries": []
},
{
"name": "Polar",
"countries": []
}
]
}' \
https://sandbox-notification.qpyou.cn/push/campaigns
- Request
> POST /push/campaigns HTTP/1.1
> User-Agent: curl/7.29.0
> Host: sandbox-notification.qpyou.cn
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer {API KEY}
> Content-Length: 1314
> Expect: 100-continue
- Response
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Length: 1491
< Content-Type: application/json
<: 3d18420b-4cf3-48a8-a3bf-6c9ac6cbe86a
<
{
"uuid": "3d18420b-4cf3-48a8-a3bf-6c9ac6cbe86a",
"status": 1,
"modify": true,
"id": 10163,
"type": "B",
"company": "gcp",
"companyIndex": 3,
"description": "TEST",
"targetingId": 0,
"reservation": {
"localizing": false,
"startDate": "2025-11-06",
"endDate": "2025-11-06",
"time": "17:00:00",
"repeat": false,
"gmtOffset": 32400
},
"distribution": {
"count": 0,
"interval": 0,
"enable": false
},
"continents": [
{
"name": "Africa",
"countries": []
},
{
"name": "Americas",
"countries": []
},
{
"name": "Asia",
"countries": [
"South Korea"
]
},
{
"name": "Europe",
"countries": []
},
{
"name": "Oceania",
"countries": []
},
{
"name": "Polar",
"countries": []
}
],
"countries": [
"KR"
],
"lastEndTime": 1762448400,
"lastEndTimestamp": 1762416000,
"tasks": {
"17:00:00": {
"startTime": 1762448400,
"endTime": 1762448400,
"time": "17:00:00",
"gmtOffset": 32400,
"zones": [
"Asia/Seoul"
],
"startTimestamp": 1762416000,
"endTimestamp": 1762416000
}
},
"game": {
"gameindex": 597,
"gameName": "Step by Step",
"apps": [
{
"appid": "com.gcp.stepbystep.android.google.global.normal",
"appindex": 20009
}
]
},
"defaultLanguage": "ko",
"notification": {
"ko": {
"android": {
"messageExpanded": "",
"ticker": "",
"summaryText": "",
"imageUrl": "",
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)"
},
"ios": {
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)",
"mediaUrl": ""
}
}
},
"option": {
"badge": 1,
"engagement": "",
"overwrite": false,
"collapseKey": "0",
"comment": "",
"groupKey": "",
"android": {
"icon": "",
"priority": "high",
"sound": ""
},
"ios": {
"sound": ""
}
},
"timestamp": {
"date": "2024-10-21 15:18:57.923",
"time": 1729491537923
},
"registrant": {
"name": "Test",
"id": "test"
},
"dryRun": false,
"debug": false
}
Campaign modification¶
- Call
curl -v -L \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API KEY}" \
-d '{
"id": 10163,
"description": "TEST",
"status": 1,
"company": "gcp",
"companyIndex": 3,
"type": "B",
"targetingId": 0,
"reservation": {
"localizing": false,
"startDate": "2025-11-06",
"endDate": "2025-11-06",
"time": "17:00:00",
"gmtOffset": -18000,
"repeat": false,
"periodType": "",
"weekday": [],
"skip": []
},
"game": {
"gameName": "Step by Step",
"gameindex": 597,
"serverIds": [],
"apps": [
{
"appindex": 20009,
"appid": "com.gcp.stepbystep.android.google.global.normal",
"versions": []
}
],
"serverAll": true
},
"distribution": {
"enable": false,
"interval": 0,
"count": 0
},
"defaultLanguage": "ko",
"option": {
"badge": 1,
"engagement": "",
"overwrite": false,
"collapseKey": "0",
"comment": "",
"groupKey": "",
"android": {
"icon": "",
"sound": "",
"priority": "high"
},
"ios": {
"sound": ""
}
},
"timestamp": {
"time": 0,
"date": ""
},
"registrant": {
"id": "test",
"name": "Test"
},
"notification": {
"ko": {
"android": {
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)",
"messageExpanded": "",
"ticker": "",
"summaryText": "",
"imageUrl": ""
},
"ios": {
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)",
"mediaUrl": ""
}
}
},
"countries": [
"KR"
],
"continents": [
{
"name": "Africa",
"countries": []
},
{
"name": "Americas",
"countries": []
},
{
"name": "Asia",
"countries": [
"South Korea"
]
},
{
"name": "Europe",
"countries": []
},
{
"name": "Oceania",
"countries": []
},
{
"name": "Polar",
"countries": []
}
]
}' \
https://sandbox-notification.qpyou.cn/push/campaigns
- Request
> POST /push/campaigns HTTP/1.1
> User-Agent: curl/7.29.0
> Host: sandbox-notification.qpyou.cn
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer {API KEY}
> Content-Length: 1314
> Expect: 100-continue
- Response
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Length: 1491
< Content-Type: application/json
< UUID: 65420989-ab96-4587-b19a-195fe13f9086
<
{
"uuid": "65420989-ab96-4587-b19a-195fe13f9086",
"status": 1,
"id": 10163,
"type": "B",
"company": "gcp",
"companyIndex": 3,
"description": "TEST",
"targetingId": 0,
"reservation": {
"localizing": false,
"startDate": "2025-11-06",
"endDate": "2025-11-06",
"time": "17:00:00",
"repeat": false,
"gmtOffset": -18000
},
"distribution": {
"count": 0,
"interval": 0,
"enable": false
},
"continents": [
{
"name": "Africa",
"countries": []
},
{
"name": "Americas",
"countries": []
},
{
"name": "Asia",
"countries": [
"South Korea"
]
},
{
"name": "Europe",
"countries": []
},
{
"name": "Oceania",
"countries": []
},
{
"name": "Polar",
"countries": []
}
],
"countries": [
"KR"
],
"lastEndTime": 1762498800,
"lastEndTimestamp": 1762466400,
"tasks": {
"07:00:00": {
"startTime": 1762498800,
"endTime": 1762498800,
"time": "07:00:00",
"gmtOffset": -18000,
"zones": [
"Asia/Seoul"
],
"startTimestamp": 1762466400,
"endTimestamp": 1762466400
}
},
"game": {
"gameindex": 597,
"gameName": "Step by Step",
"apps": [
{
"appid": "com.gcp.stepbystep.android.google.global.normal",
"appindex": 20009
}
]
},
"defaultLanguage": "ko",
"notification": {
"ko": {
"android": {
"messageExpanded": "",
"ticker": "",
"summaryText": "",
"imageUrl": "",
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)"
},
"ios": {
"title": "TEST",
"message": "(Advertising) TEST (Unsubscribe: Change in settings)",
"mediaUrl": ""
}
}
},
"option": {
"badge": 1,
"engagement": "",
"overwrite": false,
"collapseKey": "0",
"comment": "",
"groupKey": "",
"android": {
"icon": "",
"priority": "high",
"sound": ""
},
"ios": {
"sound": ""
}
},
"timestamp": {
"date": "2024-10-21 15:25:45.611",
"time": 1729491945611
},
"registrant": {
"name": "Test",
"id": "test"
},
"dryRun": false,
"debug": false
}
Country code¶
| Continent | Country | Code | Country | Code |
|---|---|---|---|---|
| Africa | Angola | AO | Madagascar | MG |
| Burkina Faso | BF | Mali | ML | |
| Burundi | BI | Mauritania | MR | |
| Benin | BJ | Mauritius | MU | |
| Botswana | BW | Malawi | MW | |
| Democratic Republic of the Congo | CD | Mozambique | MZ | |
| Central African Republic | CF | Namibia | NA | |
| Republic of the Congo | CG | Niger | NE | |
| Ivory Coast | CI | Nigeria | NG | |
| Cameroon | CM | Reunion | RE | |
| Cape Verde | CV | Rwanda | RW | |
| Djibouti | DJ | Seychelles | SC | |
| Algeria | DZ | Sudan | SD | |
| Egypt | EG | Saint Helena | SH | |
| Western Sahara | EH | Sierra Leone | SL | |
| Eritrea | ER | Senegal | SN | |
| Ethiopia | ET | Somalia | SO | |
| Gabon | GA | South Sudan | SS | |
| Ghana | GH | Sao Tome and Principe | ST | |
| Gambia | GM | Swaziland | SZ | |
| Guinea | GN | Chad | TD | |
| Equatorial Guinea | GQ | French Southern Territories | TF | |
| Guinea-Bissau | GW | Togo | TG | |
| British Indian Ocean Territory | IO | Tunisia | TN | |
| Kenya | KE | Tanzania | TZ | |
| Comoros | KM | Uganda | UG | |
| Liberia | LR | Mayotte | YT | |
| Lesotho | LS | South Africa | ZA | |
| Libya | LY | Zambia | ZM | |
| Morocco | MA | Zimbabwe | ZW | |
| Americas | Antigua and Barbuda | AG | Honduras | HN |
| Anguilla | AI | Haiti | HT | |
| Argentina | AR | Jamaica | JM | |
| Aruba | AW | Saint Kitts and Nevis | KN | |
| Barbados | BB | Cayman Islands | KY | |
| Saint Barthélemy | BL | Saint Lucia | LC | |
| Bermuda | BM | Saint Martin | MF | |
| Bolivia | BO | Martinique | MQ | |
| Bonaire, Saint Eustatius and Saba | BQ | Montserrat | MS | |
| Brazil | BR | Mexico | MX | |
| Bahamas | BS | Nicaragua | NI | |
| Belize | BZ | Panama | PA | |
| Canada | CA | Peru | PE | |
| Chile | CL | Saint Pierre and Miquelon | PM | |
| Colombia | CO | Puerto Rico | PR | |
| Costa Rica | CR | Paraguay | PY | |
| Cuba | CU | Suriname | SR | |
| Curaçao | CW | El Salvador | SV | |
| Dominica | DM | Sint Maarten | SX | |
| Dominican Republic | DO | Turks and Caicos Islands | TC | |
| Ecuador | EC | Trinidad and Tobago | TT | |
| Falkland Islands | FK | United States Minor Outlying Islands | UM | |
| Grenada | GD | United States | US | |
| French Guiana | GF | Uruguay | UY | |
| Greenland | GL | Saint Vincent and the Grenadines | VC | |
| Guadeloupe | GP | Venezuela | VE | |
| South Georgia and the South Sandwich Islands | GS | British Virgin Islands | VG | |
| Guatemala | GT | U.S. Virgin Islands | VI | |
| Guyana | GY | |||
| Asia | United Arab Emirates | AE | Lebanon | LB |
| Afghanistan | AF | Sri Lanka | LK | |
| Armenia | AM | Myanmar | MM | |
| Azerbaijan | AZ | Mongolia | MN | |
| Bangladesh | BD | Macao | MO | |
| Bahrain | BH | Maldives | MV | |
| Brunei | BN | Malaysia | MY | |
| Bhutan | BT | Nepal | NP | |
| China | CN | Oman | OM | |
| Georgia | GE | Philippines | PH | |
| Hong Kong | HK | Pakistan | PK | |
| Indonesia | ID | Palestinian Territory | PS | |
| Israel | IL | Qatar | QA | |
| India | IN | Saudi Arabia | SA | |
| Iraq | IQ | Singapore | SG | |
| Iran | IR | Syria | SY | |
| Jordan | JO | Thailand | TH | |
| Japan | JP | Tajikistan | TJ | |
| Kyrgyzstan | KG | East Timor | TL | |
| Cambodia | KH | Turkmenistan | TM | |
| North Korea | KP | Turkey | TR | |
| South Korea | KR | Taiwan | TW | |
| Kuwait | KW | Uzbekistan | UZ | |
| Kazakhstan | KZ | Vietnam | VN | |
| Laos | LA | Yemen | YE | |
| Europe | Andorra | AD | Iceland | IS |
| Albania | AL | Italy | IT | |
| Austria | AT | Jersey | JE | |
| Aland Islands | AX | Liechtenstein | LI | |
| Bosnia and Herzegovina | BA | Lithuania | LT | |
| Belgium | BE | Luxembourg | LU | |
| Bulgaria | BG | Latvia | LV | |
| Belarus | BY | Monaco | MC | |
| Switzerland | CH | Moldova | MD | |
| Cyprus | CY | Montenegro | ME | |
| Czech Republic | CZ | Macedonia | MK | |
| Germany | DE | Malta | MT | |
| Denmark | DK | Netherlands | NL | |
| Estonia | EE | Norway | NO | |
| Spain | ES | Poland | PL | |
| Finland | FI | Portugal | PT | |
| Faroe Islands | FO | Romania | RO | |
| France | FR | Serbia | RS | |
| United Kingdom | GB | Russia | RU | |
| Guernsey | GG | Sweden | SE | |
| Gibraltar | GI | Slovenia | SI | |
| Greece | GR | Svalbard and Jan Mayen | SJ | |
| Croatia | HR | Slovakia | SK | |
| Hungary | HU | San Marino | SM | |
| Ireland | IE | Ukraine | UA | |
| Isle of Man | IM | Vatican | VA | |
| Oceania | American Samoa | AS | Niue | NU |
| Australia | AU | New Zealand | NZ | |
| Cocos Islands | CC | French Polynesia | PF | |
| Cook Islands | CK | Papua New Guinea | PG | |
| Christmas Island | CX | Pitcairn | PN | |
| Fiji | FJ | Palau | PW | |
| Micronesia | FM | Solomon Islands | SB | |
| Guam | GU | Tokelau | TK | |
| Kiribati | KI | Tonga | TO | |
| Marshall Islands | MH | Tuvalu | TV | |
| Northern Mariana Islands | MP | Vanuatu | VU | |
| New Caledonia | NC | Wallis and Futuna | WF | |
| Norfolk Island | NF | Samoa | WS | |
| Nauru | NR | |||
| Polar | Antarctica | AQ |
Language Code¶
| Language code | Language |
|---|---|
| ko | Korean |
| zh-hans | Chinese (Simplified) |
| zh-hant | Chinese (Traditional) |
| en | English |
| ja | Japanese |
| ar | Arabic |
| fr | French |
| de | German |
| es | Spanish |
| pt | Portuguese |
| th | Thai |
| it | Italian |
| ru | Russian |
| id | Indonesian |
| vi | Vietnamese |
| tr | Turkish |