Use a valid Bearer token to authenticate.
The API payloads for creating a task may difference from other API payloads, as tasks are parts of a flow, thus their attributes dynamically adjust to the respective task's flow. There are 2 easy ways to easily create a payload task:
### Generate payload from API
1. Send request endpoint [ GET /flow/{flowName}/task ](#tag/Flow/operation/getCreateTaskPayload)
2. Copy the response from section `bodyRequest`
### Generate payload from UI
1. Visit https://web.mile.app/flow/flow
2. Select Flow.
3. Open **Configuration** tab.
4. Click **API Example**.
5. Finnaly, there will be a complete description to create a task according to chosen flow.
6. Also its able to click **Copy Curl** for copy the generated request body based on the selected flow that can be used for create task.
The unique name of organization's flow. Use GET /flows API to get the list of flow names.
Example: Visit
Fundamental entity within an organization, serving as the central point for managing various operational components. Use GET /hubs endpoint to get the list of Hub IDs. Example: 634e98498ce07d29474a7e29
This field's type & value is according to Flow's setting. Use GET /flow/{flowName}/task API to get example of payload.
Example: Jack Ward
This field's type & value is according to Flow's setting. Use GET /flow/{flowName}/task API to get example of payload.
Example: Gambir Jakarta
This field's type & value is according to Flow's setting. Use GET /flow/{flowName}/task API to get example of payload.
Example: -6.230815251,106.75684387
Start time refers to the designated time for users to begin a task. If startTime is not provided, it will default to the configured time in the flow. You can view the datetime format here.
Example: 2022-11-02T07:28:23+00:00
End time is the deadline for completing a task. If endTime is not specified, it will default to the configured time in the flow.The task cannot be completed if the date has passed the endtime. You can view the datetime format here
Example: 2022-11-05T07:28:23+00:00
You can assign tasks using user email according to their task hub. To assign tasks to multiple users, use a comma (',') as a separator.
Example: ['leandro@mile.app']