# Create Task

The create task enpoint is used to register a new task for execution at a later date.

# Endpoint

POST /tasks/create

# Parameters

# Body

Name Type Description
executionTime Integer The time at which the task is to be executed. In milliseconds since unix the epoch. Click here for more information.
temporalAccuracy String How precisely the execution time should be matched. Click here for more information.
task Object JSON object which defines the http parameters for the execution. This object can not exceed a size of 16kb
task.url String The http url the task will call. Only https is supported.
task.header Object JSON object that will be set as the header parameter.
task.method String The http method.
task.body Any The http body.

# Example

{
    "executionTime": 1632140100000,
    "temporalAccuracy": "MINUTE",
    "task": {
        "url": "https://jsonplaceholder.typicode.com/todos/1",
        "header": {},
        "method": "GET",
        "body": "test"
    }
}

# Return

# Parameters

# Body

Name Type Description
statusCode Integer Http status code of the create operation.
message String Status message of the create operation.
body.id String The id of the newly created task, can be used the fetch its status with the /tasks/:id endpoint

# Example

{
    "statusCode": 200,
    "message": "Operation successful",
    "body": {
        "id": "856f2922-c47b-47a5-9dcd-3ddd3304b937"
    }
}