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
Actor ID or a tilde-separated owner's username and Actor name.
Example:janedoe~my-actorBodyrequired
- name string requiredExample:
MyActor - description string | null nullableExample:
My favourite actor! - isPublic boolean requiredExample:
false actorPermissionLevel object
- anyOf
- ActorPermissionLevel
- null
- ActorPermissionLevel (string)
Determines permissions that the Actor requires to run. For more information, see the Actor permissions documentation.
Possible values: [
Example:LIMITED_PERMISSIONS,FULL_PERMISSIONS]LIMITED_PERMISSIONS
- seoTitle string | null nullableExample:
My actor - seoDescription string | null nullableExample:
My actor is the best - title string | null nullableExample:
My Actor - restartOnError boolean deprecatedExample:
false versions object[] required
- versionNumber string | null nullableExample:
0.0 sourceType object
- anyOf
- VersionSourceType
- null
- VersionSourceType (string)
Possible values: [
SOURCE_FILES,GIT_REPO,TARBALL,GITHUB_GIST]
envVars object[]
- name string requiredExample:
MY_ENV_VAR - value string requiredExample:
my-value - isSecret boolean | null nullableExample:
false
- name string requiredExample:
- applyEnvVarsToBuild boolean | null nullableExample:
false - buildTag string | null nullableExample:
latest sourceFiles object[]
- anyOf
- SourceCodeFile
- SourceCodeFolder
- format SourceCodeFileFormat (string) required
Possible values: [
Example:BASE64,TEXT]TEXT - content string requiredExample:
console.log('This is the main.js file'); - name string requiredExample:
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.
- versionNumber string | null nullableExample:
pricingInfos object[]
- oneOf
- PayPerEventActorPricingInfo
- PricePerDatasetItemActorPricingInfo
- FlatPricePerMonthActorPricingInfo
- FreeActorPricingInfo
- 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
- defaultRunOptions
- null
- build string requiredExample:
latest - timeoutSecs integerExample:
3600 - memoryMbytes integer requiredExample:
2048 - restartOnError booleanExample:
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
buildIdornull.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
nullvalue. 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"
}
}
}
}
Schema
data object required
- id string requiredExample:
zdc3Pyhyz3m8vjDeM - userId string requiredExample:
wRsJZtadYvn4mBZmm - name string requiredExample:
MyActor - username string requiredExample:
jane35 - description string | null nullableExample:
My favourite actor! - restartOnError boolean deprecatedExample:
false - isPublic boolean requiredExample:
false - actorPermissionLevel ActorPermissionLevel (string)
Determines permissions that the Actor requires to run. For more information, see the Actor permissions documentation.
Possible values: [
Example:LIMITED_PERMISSIONS,FULL_PERMISSIONS]LIMITED_PERMISSIONS - createdAt string<date-time> requiredExample:
2019-07-08T11:27:57.401Z - modifiedAt string<date-time> requiredExample:
2019-07-08T14:01:05.546Z stats object required
- totalBuilds integerExample:
9 - totalRuns integerExample:
16 - totalUsers integerExample:
6 - totalUsers7Days integerExample:
2 - totalUsers30Days integerExample:
6 - totalUsers90Days integerExample:
6 - totalMetamorphs integerExample:
2 - lastRunStartedAt string<date-time>Example:
2019-07-08T14:01:05.546Z
- totalBuilds integerExample:
versions object[] required
- versionNumber string requiredExample:
0.0 sourceType object required
- anyOf
- VersionSourceType
- null
- VersionSourceType (string)
Possible values: [
SOURCE_FILES,GIT_REPO,TARBALL,GITHUB_GIST]
envVars object[]
- name string requiredExample:
MY_ENV_VAR - value string requiredExample:
my-value - isSecret boolean | null nullableExample:
false
- name string requiredExample:
- applyEnvVarsToBuild boolean | null nullableExample:
false - buildTag stringExample:
latest sourceFiles object[]
- anyOf
- SourceCodeFile
- SourceCodeFolder
- format SourceCodeFileFormat (string) required
Possible values: [
Example:BASE64,TEXT]TEXT - content string requiredExample:
console.log('This is the main.js file'); - name string requiredExample:
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.
- versionNumber string requiredExample:
pricingInfos object[]
- oneOf
- PayPerEventActorPricingInfo
- PricePerDatasetItemActorPricingInfo
- FlatPricePerMonthActorPricingInfo
- FreeActorPricingInfo
- 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
defaultRunOptions object required
- build string requiredExample:
latest - timeoutSecs integerExample:
3600 - memoryMbytes integer requiredExample:
2048 - restartOnError booleanExample:
false
- build string requiredExample:
exampleRunInput object
- anyOf
- exampleRunInput
- null
- body string requiredExample:
{ "helloWorld": 123 } - contentType string requiredExample:
application/json; charset=utf-8
- isDeprecated boolean | null nullableExample:
false - deploymentKey stringExample:
ssh-rsa AAAA ... - title string | null nullableExample:
My Actor taggedBuilds object
- anyOf
- TaggedBuilds
- null
- object
A dictionary mapping build tag names (e.g., "latest", "beta") to their build information.
Example:{"latest":{"buildId":"z2EryhbfhgSyqj6Hn","buildNumber":"0.0.2","finishedAt":"2019-06-10T11:15:49.286Z"},"beta":{"buildId":"abc123def456","buildNumber":"1.0.0-beta","finishedAt":"2019-07-15T14:30:00.000Z"}}
- readmeSummary string
A brief, LLM-generated readme summary
- id string requiredExample:
Status 400
Bad request - invalid input parameters or request body.
{
"error": {
"type": "invalid-input",
"message": "Invalid input: The request body contains invalid data."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample: