POST
/
tasks
/
batch-create
curl --request POST \
  --url https://api.mergent.co/v2/tasks/batch-create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "name": "4cf95241-fa19-47ef-8a67-71e483747649",
    "queue": "default",
    "request": {
      "url": "https://example.com",
      "headers": {
        "Authorization": "8BOHec9yUJMJ4sJFqUuC5w==",
        "Content-Type": "application/json"
      },
      "body": "Hello, world!"
    },
    "scheduled_for": "2021-10-01T15:53:05Z",
    "delay": "5m"
  }
]'
[
  {
    "id": "4cf95241-fa19-47ef-8a67-71e483747649",
    "name": "4cf95241-fa19-47ef-8a67-71e483747649",
    "queue": "default",
    "status": "queued",
    "request": {
      "url": "https://example.com",
      "headers": {
        "Authorization": "8BOHec9yUJMJ4sJFqUuC5w==",
        "Content-Type": "application/json"
      },
      "body": "Hello, world!"
    },
    "scheduled_for": "2021-10-01T15:53:05Z",
    "created_at": "2021-10-01T15:53:05Z"
  }
]

Authorizations

Authorization
string
header
required

The Mergent API uses API keys to authenticate requests. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Body

application/json · object[]

The params for creating or updating tasks.

Response

201
application/json
A list of tasks in sorted order, with the most recent tasks appearing first.

The response is of type object[].