Skip to main content
POST
/
task
/
schedules
/
bulk
Bulk create task schedule
curl --request POST \
  --url https://apiweb.mile.app/api/v3/task/schedules/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "schedules": [
    {
      "hubId": "<string>",
      "name": "<string>",
      "periode": "<string>",
      "flow": "<string>",
      "flowId": "<string>",
      "startTime": "<string>",
      "endTime": "<string>",
      "task": {},
      "assignee": "<array>",
      "interval": 50,
      "frequency": "daily"
    }
  ]
}
'
{
  "success": 1,
  "failed": 1,
  "schedules": [
    {
      "status": true,
      "message": "Task Scheduler has been created",
      "_id": "63fc2ccaea976f77fb2ff802",
      "name": "Daily Morning Visit"
    },
    {
      "status": false,
      "message": "The schedules field is required.",
      "_id": "63fc2ccaea976f77fb2ff802",
      "name": "Visit"
    }
  ],
  "failed_index": [
    1
  ]
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
schedules
object[]
required
Maximum array length: 50

Response

Success

success
integer

Total number of success created schedule.

failed
integer

Total number of failed created schedule.

schedules
object[]

List result of created task schedule.

failed_index
object[]

List of failed index of schedule.