Actor tasks

Create Actor task

Changed on

Create a new task with settings specified by the object passed as JSON in the POST payload.

The response is the full task object as returned by the Get Actor task endpoint.

The request needs to specify the Content-Type: application/json HTTP header!

When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL.

post/v2/actor-tasks

Request

  • Base URL
    https://api.apify.com
  • Auth
    • HTTP bearer
    • or API key in query parameter token

Request body

actIdstring required
namestring
titlestring nullable
descriptionstring nullable

Example request

{
  "actId": "asADASadYvn4mBZmm",
  "name": "my-task",
  "options": {
    "build": "latest",
    "timeoutSecs": 300,
    "memoryMbytes": 128
  },
  "input": {
    "hello": "world"
  }
}

Response

Example response

{
  "data": {
    "id": "zdc3Pyhyz3m8vjDeM",
    "userId": "wRsJZtadYvn4mBZmm",
    "actId": "asADASadYvn4mBZmm",
    "name": "my-task",
    "username": "janedoe",
    "createdAt": "2018-10-26T07:23:14.855Z",
    "modifiedAt": "2018-10-26T13:30:49.578Z",
    "removedAt": null,
    "stats": {
      "totalRuns": 15
    },
    "options": {
      "build": "latest",
      "timeoutSecs": 300,
      "memoryMbytes": 128
    },
    "input": {
      "hello": "world"
    }
  }
}

Changes

    • breaking

      request property /// was restricted to a list of enum values

    • warning

      added the new MULTI_TENANT enum value to the /// response property for the response status

    • warning

      added the new SINGLE_TENANT enum value to the /// response property for the response status

    • warning

      added the new undefined enum value to the /// response property for the response status

    • info

      added the new MULTI_TENANT enum value to the request property ///

    • info

      added the new SINGLE_TENANT enum value to the request property ///

    • info

      added the new undefined enum value to the request property ///

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status