---
title: "Update task"
method: PUT
path: "/v2/actor-tasks/{actorTaskId}"
tags: ["Actor tasks"]
---

# Update task

`PUT /v2/actor-tasks/{actorTaskId}`

Update settings of a task using values specified by an object passed as JSON
in the POST payload.

If the object does not define a specific property, its value is not updated.

The `publicConfig` field carries the display configuration of the task's public
landing page, and `isPublic` publishes or unpublishes the task itself. Both require
write permission to the task's Actor.

To publish a task, its Actor must be public, `publicConfig.inputSchemaFields` and
`publicConfig.datasetView` must be set, and the Actor must have fewer than 50 published
tasks. If the task isn't ready to be published, the whole update fails and none of it
is applied.

Publishing lists the task among the Actor's examples and makes its input public, so anyone
can view and copy it. The landing page itself is shown only while `publicConfig` still
validates against the Actor's current build, so a new build can stop the page from being
offered while the task stays published and copyable.

The response is the full task object as returned by the
[Get task](/api/v2/actor-task-get) 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.

## Path parameters

- `actorTaskId` string, required

## Request body

- UpdateTaskRequest
  - `name` string
  - `options` TaskOptions
    - `build` string, nullable
    - `timeoutSecs` integer, nullable
    - `memoryMbytes` integer, nullable
    - `maxItems` integer, nullable
    - `maxTotalChargeUsd` number, nullable
    - `restartOnError` boolean, nullable
  - `input` TaskInput — The input configuration for the Actor task. This is a user-defined JSON object that will be passed to the Actor when the task is run.
  - `title` string, nullable
  - `actorStandby` ActorStandby
    - `isEnabled` boolean, nullable — Whether standby mode is enabled for the Actor.
    - `desiredRequestsPerActorRun` integer, nullable — Target number of concurrent HTTP requests a single run is configured to handle.
    - `maxRequestsPerActorRun` integer, nullable — Maximum number of concurrent HTTP requests that can be routed to a single run.
    - `idleTimeoutSecs` integer, nullable — In seconds, how long a run can stay idle without incoming requests before it's terminated.
    - `build` string, nullable — Which build to run in standby mode. Either a build tag or a version number.
    - `memoryMbytes` integer, nullable — In MB, the amount of memory allocated to the run.
    - `disableStandbyFieldsOverride` boolean, nullable — If `true`, prevents the standby mode configuration from being overridden elsewhere.
    - `shouldPassActorInput` boolean, nullable — Whether to pass the Actor's input to the standby run. If `false`, the standby runs start with no input.
  - `publicConfig` TaskPublicConfig — Public-facing configuration of a published task, used by the task's public landing page. The task's publication state is determined by `publishedAt` - a task is published when `publishedAt` is set and unpublished when it is `null`.
    - `publishedAt` string, date-time, nullable — Time when the task was published, or `null` if the task isn't published. This field is server-controlled. To publish or unpublish a task, use the [Update task](/api/v2/actor-task-put) endpoint and set `isPublic`.
    - `seoTitle` string, nullable — Name of the Actor task to display by search engines such as Google. Defaults to the task title. At most 60 characters.
    - `seoDescription` string, nullable — Description of the Actor task to display by search engines such as Google. Defaults to the task description. At most 160 characters.
    - `inputSchemaFields` string[], nullable — Names of the task input fields displayed on the public task page.
    - `datasetName` string, nullable — Name of the dataset from the Actor's dataset schema whose results are displayed. When `null`, the Actor's default dataset is used. That is, the only dataset the Actor declares, or the one named `default` when it declares several.
    - `datasetView` string, nullable — Key of the dataset view from the Actor's dataset schema used to display results. Must be one of the views declared on the resolved dataset. You can't publish a task without it.
  - `isPublic` boolean — Set to `true` to publish the task on its public landing page, or `false` to unpublish it. Sending the value the task already has does nothing.

## Response `200`

- object
  - `data` Task, required
    - `id` string, required
    - `userId` string, required
    - `actId` string, required
    - `name` string, required
    - `username` string, nullable
    - `createdAt` string, date-time, required
    - `modifiedAt` string, date-time, required
    - `removedAt` string, date-time, nullable
    - `stats` TaskStats
      - `totalRuns` integer
    - `options` TaskOptions
      - `build` string, nullable
      - `timeoutSecs` integer, nullable
      - `memoryMbytes` integer, nullable
      - `maxItems` integer, nullable
      - `maxTotalChargeUsd` number, nullable
      - `restartOnError` boolean, nullable
    - `input` TaskInput — The input configuration for the Actor task. This is a user-defined JSON object that will be passed to the Actor when the task is run.
    - `title` string, nullable
    - `actorStandby` ActorStandby
      - `isEnabled` boolean, nullable — Whether standby mode is enabled for the Actor.
      - `desiredRequestsPerActorRun` integer, nullable — Target number of concurrent HTTP requests a single run is configured to handle.
      - `maxRequestsPerActorRun` integer, nullable — Maximum number of concurrent HTTP requests that can be routed to a single run.
      - `idleTimeoutSecs` integer, nullable — In seconds, how long a run can stay idle without incoming requests before it's terminated.
      - `build` string, nullable — Which build to run in standby mode. Either a build tag or a version number.
      - `memoryMbytes` integer, nullable — In MB, the amount of memory allocated to the run.
      - `disableStandbyFieldsOverride` boolean, nullable — If `true`, prevents the standby mode configuration from being overridden elsewhere.
      - `shouldPassActorInput` boolean, nullable — Whether to pass the Actor's input to the standby run. If `false`, the standby runs start with no input.
    - `standbyUrl` string, uri, nullable
    - `isPublic` boolean — Whether the task is published. Based on the `publicConfig.publishedAt` field.
    - `publicConfig` TaskPublicConfig — Public-facing configuration of a published task, used by the task's public landing page. The task's publication state is determined by `publishedAt` - a task is published when `publishedAt` is set and unpublished when it is `null`.
      - `publishedAt` string, date-time, nullable — Time when the task was published, or `null` if the task isn't published. This field is server-controlled. To publish or unpublish a task, use the [Update task](/api/v2/actor-task-put) endpoint and set `isPublic`.
      - `seoTitle` string, nullable — Name of the Actor task to display by search engines such as Google. Defaults to the task title. At most 60 characters.
      - `seoDescription` string, nullable — Description of the Actor task to display by search engines such as Google. Defaults to the task description. At most 160 characters.
      - `inputSchemaFields` string[], nullable — Names of the task input fields displayed on the public task page.
      - `datasetName` string, nullable — Name of the dataset from the Actor's dataset schema whose results are displayed. When `null`, the Actor's default dataset is used. That is, the only dataset the Actor declares, or the one named `default` when it declares several.
      - `datasetView` string, nullable — Key of the dataset view from the Actor's dataset schema used to display results. Must be one of the views declared on the resolved dataset. You can't publish a task without it.

## Other responses

- `400` — Bad request - invalid input parameters or request body.
- `401` — Unauthorized - authentication required or invalid token.
- `403` — Forbidden - insufficient permissions to perform this action.
- `404` — Not found - the requested resource does not exist.
- `405` — Method not allowed.
- `409` — Conflict - the request could not be completed due to a conflict with the current state of the resource.
- `413` — Payload too large - the request body exceeds the size limit.
- `415` — Unsupported media type - the Content-Encoding of the request is not supported.
- `429` — Too many requests - rate limit exceeded.

---

[API](https://skmtc.net/apify/apis/apify-api.md) · [All operations](https://skmtc.net/apify/apis/apify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apify/apify-api/revisions/186271294840/schema)
