Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action.

Request Details

Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many create-task requests within a short time will cause a create conflict error.

Request Properties
Description String

Description the task

IsActive (required) Boolean

Whether the schedule is active. Inactive schedule will not trigger task execution.

Name (required) String

Name of the task. This is a unique identifier for tasks in the title.

Parameter (required) ActionsOnPlayersInSegmentTaskParameter

Task details related to segment and action

Schedule String

Cron expression for the run schedule of the task. The expression should be in UTC.

POST https://{{TitleID}}
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
  "Name": "PushNotificationVIP_Halloween",
  "Description": "Send push notification to VIP players about Halloween event",
  "IsActive": false,
  "Parameter": {
    "SegmentId": "274828AF93F13472",
    "ActionId": "898665F02BF5B41E"

Response Details

Result Properties
TaskId String

ID of the task

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
  "code": 200,
  "status": "OK",
  "data": {
    "TaskId": "644FA3A39C9714BC"



Possible Error Codes

Name Code
InvalidScheduledTaskName 1256
InvalidTaskSchedule 1257
ScheduledTaskCreateConflict 1255
ScheduledTaskNameConflict 1254