curl --request POST \
--url https://api.anchorbrowser.io/v1/task/{taskId}/{taskVersion} \
--header 'Content-Type: application/json' \
--header 'anchor-api-key: <api-key>' \
--data '
{
"code": "<string>",
"language": "typescript",
"description": "<string>",
"browserConfiguration": {
"initial_url": "<string>",
"recording": {
"active": true
},
"proxy": {
"active": true,
"type": "anchor_proxy",
"country_code": "us",
"region": "<string>",
"city": "<string>"
},
"timeout": {
"max_duration": 123,
"idle_timeout": 123
},
"live_view": {
"read_only": true
}
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"code": "<string>",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"language": "typescript",
"description": "<string>",
"browserConfiguration": {
"initial_url": "<string>",
"recording": {
"active": true
},
"proxy": {
"active": true,
"type": "anchor_proxy",
"country_code": "us",
"region": "<string>",
"city": "<string>"
},
"timeout": {
"max_duration": 123,
"idle_timeout": 123
},
"live_view": {
"read_only": true
}
}
}
}Publishes a specific version of a task. This creates a new version if it doesn’t exist, or updates an existing version’s metadata.
curl --request POST \
--url https://api.anchorbrowser.io/v1/task/{taskId}/{taskVersion} \
--header 'Content-Type: application/json' \
--header 'anchor-api-key: <api-key>' \
--data '
{
"code": "<string>",
"language": "typescript",
"description": "<string>",
"browserConfiguration": {
"initial_url": "<string>",
"recording": {
"active": true
},
"proxy": {
"active": true,
"type": "anchor_proxy",
"country_code": "us",
"region": "<string>",
"city": "<string>"
},
"timeout": {
"max_duration": 123,
"idle_timeout": 123
},
"live_view": {
"read_only": true
}
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"code": "<string>",
"deleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"language": "typescript",
"description": "<string>",
"browserConfiguration": {
"initial_url": "<string>",
"recording": {
"active": true
},
"proxy": {
"active": true,
"type": "anchor_proxy",
"country_code": "us",
"region": "<string>",
"city": "<string>"
},
"timeout": {
"max_duration": 123,
"idle_timeout": 123
},
"live_view": {
"read_only": true
}
}
}
}API key passed in the header
The ID of the task
The version to publish (cannot be draft)
Base64 encoded task code (required for new versions)
1Programming language for the task
typescript Optional description of the version
1000Browser configuration for task execution
Show child attributes
The URL to navigate to when the browser session starts. If not provided, the browser will load an empty page.
Proxy Documentation available at Proxy Documentation
Show child attributes
On change make sure to update the country_code.
Create a session with a residential proxy to access websites as if you're browsing from a computer in that country.
anchor_proxy, anchor_residential, anchor_mobile, anchor_gov Supported country codes ISO 2 lowercase
On change make sure to update the Proxy type.
af, al, dz, ad, ao, as, ag, ar, am, aw, au, at, az, bs, bh, bb, by, be, bz, bj, bm, bo, ba, br, bg, bf, cm, ca, cv, td, cl, co, cg, cr, ci, hr, cu, cy, cz, dk, dm, do, ec, eg, sv, ee, et, fo, fi, fr, gf, pf, ga, gm, ge, de, gh, gi, gr, gd, gp, gt, gg, gn, gw, gy, ht, hn, hu, is, in, ir, iq, ie, il, it, jm, jp, jo, kz, kw, kg, lv, lb, ly, li, lt, lu, mk, ml, mt, mq, mr, mx, md, mc, me, ma, nl, nz, ni, ng, no, pk, pa, py, pe, ph, pl, pt, pr, qa, ro, lc, sm, sa, sn, rs, sc, sl, sk, si, so, za, kr, es, sr, se, ch, sy, st, tw, tj, tg, tt, tn, tr, tc, ua, ae, us, uy, uz, ve, ye Region code for more specific geographic targeting. The city parameter can only be used when region is also provided.
City name for precise geographic targeting. Supported for anchor_proxy only. Can only be used when region is also provided.
Timeout configurations for the browser session.
Show child attributes
Maximum amount of time (in minutes) for the browser to run before terminating. Defaults to 20.
The amount of time (in minutes) the browser session waits for new connections after all others are closed before stopping. Defaults to 5.
Task version published successfully
Show child attributes
Unique identifier for the task version
Parent task identifier
Version identifier (draft, latest, or version number)
Base64 encoded task code
Whether the version is soft deleted
Version creation timestamp
Version last update timestamp
Programming language for the task
typescript Optional description of the version
1000Browser configuration for task execution
Show child attributes
The URL to navigate to when the browser session starts. If not provided, the browser will load an empty page.
Proxy Documentation available at Proxy Documentation
Show child attributes
On change make sure to update the country_code.
Create a session with a residential proxy to access websites as if you're browsing from a computer in that country.
anchor_proxy, anchor_residential, anchor_mobile, anchor_gov Supported country codes ISO 2 lowercase
On change make sure to update the Proxy type.
af, al, dz, ad, ao, as, ag, ar, am, aw, au, at, az, bs, bh, bb, by, be, bz, bj, bm, bo, ba, br, bg, bf, cm, ca, cv, td, cl, co, cg, cr, ci, hr, cu, cy, cz, dk, dm, do, ec, eg, sv, ee, et, fo, fi, fr, gf, pf, ga, gm, ge, de, gh, gi, gr, gd, gp, gt, gg, gn, gw, gy, ht, hn, hu, is, in, ir, iq, ie, il, it, jm, jp, jo, kz, kw, kg, lv, lb, ly, li, lt, lu, mk, ml, mt, mq, mr, mx, md, mc, me, ma, nl, nz, ni, ng, no, pk, pa, py, pe, ph, pl, pt, pr, qa, ro, lc, sm, sa, sn, rs, sc, sl, sk, si, so, za, kr, es, sr, se, ch, sy, st, tw, tj, tg, tt, tn, tr, tc, ua, ae, us, uy, uz, ve, ye Region code for more specific geographic targeting. The city parameter can only be used when region is also provided.
City name for precise geographic targeting. Supported for anchor_proxy only. Can only be used when region is also provided.
Timeout configurations for the browser session.
Show child attributes
Maximum amount of time (in minutes) for the browser to run before terminating. Defaults to 20.
The amount of time (in minutes) the browser session waits for new connections after all others are closed before stopping. Defaults to 5.
Was this page helpful?