Skip to main content

Update Actor

PUT 

/v2/acts/:actorId

Updates settings of an Actor using values specified by an Actor object passed as JSON in the POST payload. If the object does not define a specific property, its value will not be updated.

The response is the full Actor object as returned by the Get Actor 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. (More info).

If you want to make your Actor public using isPublic: true, you will need to provide the Actor's title and the categories under which that Actor will be classified in Apify Store. For this, it's best to use the constants from our apify-shared-js package.

Request

Path Parameters

    actorId string required

    Actor ID or a tilde-separated owner's username and Actor name.


    Example: janedoe~my-actor

Bodyrequired

  • name string required
    Example: MyActor
  • description string | null nullable
    Example: My favourite actor!
  • isPublic boolean required
    Example: false
  • actorPermissionLevel object
      anyOf
    • ActorPermissionLevel (string)

      Determines permissions that the Actor requires to run. For more information, see the Actor permissions documentation.

      Possible values: [LIMITED_PERMISSIONS, FULL_PERMISSIONS]


      Example: LIMITED_PERMISSIONS
  • seoTitle string | null nullable
    Example: My actor
  • seoDescription string | null nullable
    Example: My actor is the best
  • title string | null nullable
    Example: My Actor
  • restartOnError boolean deprecated
    Example: false
  • versions object[] required
    • versionNumber string | null nullable
      Example: 0.0
    • sourceType object
        anyOf
      • VersionSourceType (string)

        Possible values: [SOURCE_FILES, GIT_REPO, TARBALL, GITHUB_GIST]

    • envVars object[]
      • name string required
        Example: MY_ENV_VAR
      • value string required
        Example: my-value
      • isSecret boolean | null nullable
        Example: false
    • applyEnvVarsToBuild boolean | null nullable
      Example: false
    • buildTag string | null nullable
      Example: latest
    • sourceFiles object[]
        anyOf
      • format SourceCodeFileFormat (string) required

        Possible values: [BASE64, TEXT]


        Example: TEXT
      • content string required
        Example: console.log('This is the main.js file');
      • name string required
        Example: src/main.js
    • gitRepoUrl string | null nullable

      URL of the Git repository when sourceType is GIT_REPO.

    • tarballUrl string | null nullable

      URL of the tarball when sourceType is TARBALL.

    • gitHubGistUrl string | null nullable

      URL of the GitHub Gist when sourceType is GITHUB_GIST.

  • pricingInfos object[]
      oneOf
    • apifyMarginPercentage number required

      In [0, 1], fraction of pricePerUnitUsd that goes to Apify

    • createdAt string<date-time> required

      When this pricing info record has been created

    • startedAt string<date-time> required

      Since when is this pricing info record effective for a given Actor

    • notifiedAboutFutureChangeAt string,null<date-time> nullable
    • notifiedAboutChangeAt string,null<date-time> nullable
    • reasonForChange string | null nullable
    • pricingModel PricingModel (string) required

      Possible values: [PAY_PER_EVENT, PRICE_PER_DATASET_ITEM, FLAT_PRICE_PER_MONTH, FREE]

    • pricingPerEvent object required
      • actorChargeEvents object
        • property name* ActorChargeEvent
          • eventPriceUsd number required
          • eventTitle string required
          • eventDescription string required
    • minimalMaxTotalChargeUsd number | null nullable
  • categories string[] nullable
  • defaultRunOptions object
      anyOf
    • build string required
      Example: latest
    • timeoutSecs integer
      Example: 3600
    • memoryMbytes integer required
      Example: 2048
    • restartOnError boolean
      Example: false
  • taggedBuilds object,null

    An object to modify tags on the Actor's builds. The key is the tag name (e.g., latest), and the value is either an object with a buildId or null.

    This operation is a patch; any existing tags that you omit from this object will be preserved.

    • To create or reassign a tag, provide the tag name with a buildId. e.g., to assign the latest tag:

       

      {
      "latest": {
      "buildId": "z2EryhbfhgSyqj6Hn"
      }
      }
    • To remove a tag, provide the tag name with a null value. e.g., to remove the beta tag:

       

      {
      "beta": null
      }
    • To perform multiple operations, combine them. The following reassigns latest and removes beta, while preserving any other existing tags.

       

      {
      "latest": {
      "buildId": "z2EryhbfhgSyqj6Hn"
      },
      "beta": null
      }
    • property name* BuildTag
      • buildId string required

Status 200

Response Headers
    {
    "data": {
    "id": "zdc3Pyhyz3m8vjDeM",
    "userId": "wRsJZtadYvn4mBZmm",
    "name": "MyActor",
    "username": "jane35",
    "description": "My favourite Actor!",
    "isPublic": false,
    "actorPermissionLevel": "LIMITED_PERMISSIONS",
    "createdAt": "2019-07-08T11:27:57.401Z",
    "modifiedAt": "2019-07-08T14:01:05.546Z",
    "stats": {
    "totalBuilds": 9,
    "totalRuns": 16,
    "totalUsers": 6,
    "totalUsers7Days": 2,
    "totalUsers30Days": 6,
    "totalUsers90Days": 6,
    "totalMetamorphs": 2,
    "lastRunStartedAt": "2019-07-08T14:01:05.546Z"
    },
    "versions": [
    {
    "versionNumber": "0.1",
    "envVars": null,
    "sourceType": "SOURCE_FILES",
    "applyEnvVarsToBuild": false,
    "buildTag": "latest",
    "sourceFiles": []
    },
    {
    "versionNumber": "0.2",
    "sourceType": "GIT_REPO",
    "envVars": null,
    "applyEnvVarsToBuild": false,
    "buildTag": "latest",
    "gitRepoUrl": "https://github.com/jane35/my-actor"
    },
    {
    "versionNumber": "0.3",
    "sourceType": "TARBALL",
    "envVars": null,
    "applyEnvVarsToBuild": false,
    "buildTag": "latest",
    "tarballUrl": "https://github.com/jane35/my-actor/archive/master.zip"
    },
    {
    "versionNumber": "0.4",
    "sourceType": "GITHUB_GIST",
    "envVars": null,
    "applyEnvVarsToBuild": false,
    "buildTag": "latest",
    "gitHubGistUrl": "https://gist.github.com/jane35/e51feb784yu89"
    }
    ],
    "defaultRunOptions": {
    "build": "latest",
    "timeoutSecs": 3600,
    "memoryMbytes": 2048,
    "restartOnError": false
    },
    "exampleRunInput": {
    "body": "{ \"helloWorld\": 123 }",
    "contentType": "application/json; charset=utf-8"
    },
    "isDeprecated": false,
    "deploymentKey": "ssh-rsa AAAA ...",
    "title": "My Actor",
    "taggedBuilds": {
    "latest": {
    "buildId": "z2EryhbfhgSyqj6Hn",
    "buildNumber": "0.0.2",
    "finishedAt": "2019-06-10T11:15:49.286Z"
    }
    }
    }
    }