Anchor Browser Tasks (Legacy) API
The Tasks (Legacy) API from Anchor Browser — 11 operation(s) for tasks (legacy).
The Tasks (Legacy) API from Anchor Browser — 11 operation(s) for tasks (legacy).
openapi: 3.1.0
info:
title: AnchorBrowser Agentic capabilities Tasks (Legacy) API
version: 1.0.0
description: APIs to manage all browser-related actions and configuration.
servers:
- url: https://api.anchorbrowser.io
description: API server
tags:
- name: Tasks (Legacy)
paths:
/v1/task:
post:
summary: Create Task (Legacy)
description: "Creates a new task or updates an existing task with the same name. Tasks are reusable code snippets \nthat can be executed in browser sessions. Tasks support versioning with draft and published versions.\n\nIf you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.\n"
security:
- api_key_header: []
tags:
- Tasks (Legacy)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskRequest'
examples:
createTask:
summary: Create a new task
value:
name: web-scraper
language: typescript
description: A task to scrape product information from e-commerce sites
code: Y29uc3QgYW5jaG9yID0gcmVxdWlyZSgnYW5jaG9yYnJvd3NlcicpOwoKYXN5bmMgZnVuY3Rpb24gcnVuKCkgewogIGNvbnN0IHNlc3Npb24gPSBhd2FpdCBhbmNob3IuY3JlYXRlU2Vzc2lvbigpOwogIGF3YWl0IHNlc3Npb24uZ29UbygnaHR0cHM6Ly9leGFtcGxlLmNvbScpOwogIGNvbnN0IHRpdGxlID0gYXdhaXQgc2Vzc2lvbi5nZXRUaXRsZSgpOwogIGNvbnNvbGUubG9nKHRpdGxlKTsKICBhd2FpdCBzZXNzaW9uLmNsb3NlKCk7Cn0KcnVuKCk7
responses:
'200':
description: Task created or updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
'400':
description: Invalid request or validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Task name already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to create task
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
get:
summary: List Tasks (Legacy)
description: "Retrieves a paginated list of all tasks for the authenticated team. Tasks are returned \nwith their latest version information and metadata.\n\nIf you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.\n"
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: page
in: query
required: false
description: Page number
schema:
type: string
pattern: ^[1-9]\d*$
default: '1'
- name: limit
in: query
required: false
description: Number of tasks per page
schema:
type: string
pattern: ^[1-9]\d*$
default: '10'
responses:
'200':
description: List of tasks retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskListResponse'
'500':
description: Failed to list tasks
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/run:
post:
summary: Run Task (Legacy)
description: 'Executes a task in a browser session. The task can be run with a specific version or the latest version.
Optionally, you can provide an existing session ID or let the system create a new one.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RunTaskRequest'
examples:
runTask:
summary: Run a task with specific version
value:
taskId: 550e8400-e29b-41d4-a716-446655440000
version: '1'
inputs:
ANCHOR_TARGET_URL: https://example.com
ANCHOR_MAX_PAGES: '10'
runTaskLatest:
summary: Run task with latest version
value:
taskId: 550e8400-e29b-41d4-a716-446655440000
version: latest
responses:
'200':
description: Task executed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/RunTaskResponse'
'404':
description: Task or session not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Task execution failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/run/{taskName}:
post:
summary: Run Task by Name (Legacy)
description: 'Executes a task by its name, always using the latest version. This is a convenience endpoint
for running tasks without needing to know the task ID.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskName
in: path
required: true
description: The name of the task to run
schema:
type: string
pattern: ^[a-zA-Z0-9_-]+$
example: web-scraper
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RunTaskByNameRequest'
responses:
'200':
description: Task executed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/RunTaskResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Task execution failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}:
get:
summary: Get Task Metadata (Legacy)
description: 'Retrieves task metadata without the code content. Useful for getting task information
without downloading the full task code.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task to retrieve
schema:
type: string
format: uuid
responses:
'200':
description: Task metadata retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskMetadataResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
put:
summary: Update Task Metadata (Legacy)
description: 'Updates task metadata (name and description). This does not affect the task code or versions.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task to update
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTaskMetadataRequest'
responses:
'200':
description: Task metadata updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskMetadataResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Task name already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to update task
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
delete:
summary: Delete Task (Legacy)
description: 'Soft deletes a task and all its versions. The task will no longer be accessible
but the data is preserved for potential recovery.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task to delete
schema:
type: string
format: uuid
responses:
'200':
description: Task deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTaskResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to delete task
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/versions:
get:
summary: List Task Versions (Legacy)
description: 'Retrieves all versions of a specific task, including draft and published versions.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
responses:
'200':
description: Task versions retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionsListResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task versions
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/latest:
get:
summary: Get Latest Task Version (Legacy)
description: 'Retrieves the latest version of a task, including the full code content.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
responses:
'200':
description: Latest task version retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionResponse'
'404':
description: Task or version not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task version
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/draft:
get:
summary: Get Task Draft (Legacy)
description: 'Retrieves the draft version of a task, including the full code content.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
responses:
'200':
description: Task draft retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionResponse'
'404':
description: Task or draft not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task draft
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
summary: Create or Update Task Draft (Legacy)
description: 'Creates or updates the draft version of a task. Draft versions are used for development
and testing before publishing.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DraftTaskRequest'
responses:
'200':
description: Task draft created or updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to create or update task draft
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/deploy:
post:
summary: Deploy Task (Legacy)
description: 'Deploys a task by creating a new version with auto-incremented version number.
This is the recommended way to publish task changes.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PublishVersionRequest'
responses:
'200':
description: Task deployed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to deploy task
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/executions:
get:
summary: List Task Executions (Legacy)
description: 'Retrieves execution history for a task, including success/failure status,
execution times, and outputs. Results can be filtered by version and status.
If you are using the new Task Builder, see the Tasks V2 endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
- name: page
in: query
required: false
description: Page number
schema:
type: string
pattern: ^[1-9]\d*$
default: '1'
- name: limit
in: query
required: false
description: Number of results per page
schema:
type: string
pattern: ^[1-9]\d*$
default: '10'
- name: status
in: query
required: false
description: Filter by execution status
schema:
type: string
enum:
- success
- failure
- timeout
- cancelled
- queued
- running
- name: version
in: query
required: false
description: Filter by task version
schema:
type: string
responses:
'200':
description: Task executions retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskExecutionResultsListResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task executions
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/executions/{executionId}:
get:
summary: Get Task Execution Result (Legacy)
description: 'Retrieves a single execution result by its ID. This endpoint is useful for polling
execution status in async mode or retrieving detailed execution information.
If you are using the new Task Builder, see the Tasks V2 endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
- name: executionId
in: path
required: true
description: The ID of the execution result
schema:
type: string
format: uuid
responses:
'200':
description: Execution result retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskExecutionResultResponse'
'404':
description: Task or execution result not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve execution result
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/task/{taskId}/{taskVersion}:
get:
summary: Get Task Version (Legacy)
description: 'Retrieves a specific version of a task, including the full code content.
If you are using the new Task Builder, see the Tasks V2 endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
- name: taskVersion
in: path
required: true
description: The version to retrieve (draft, latest, or version number)
schema:
type: string
pattern: ^(draft|latest|\d+)$
responses:
'200':
description: Task version retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionResponse'
'404':
description: Task or version not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task version
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
summary: Publish Task Version (Legacy)
description: 'Publishes a specific version of a task. This creates a new version if it doesn''t exist,
or updates an existing version''s metadata.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
- name: taskVersion
in: path
required: true
description: The version to publish (cannot be draft)
schema:
type: string
pattern: ^\d+$
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PublishVersionRequest'
responses:
'200':
description: Task version published successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskVersionResponse'
'400':
description: Cannot publish to draft version
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to publish task version
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
delete:
summary: Delete Task Version (Legacy)
description: 'Soft deletes a specific version of a task. The version will no longer be accessible
but the data is preserved for potential recovery.
If you are using the new Task Builder, see the Tasks V2 endpoints in this API reference.
'
security:
- api_key_header: []
tags:
- Tasks (Legacy)
parameters:
- name: taskId
in: path
required: true
description: The ID of the task
schema:
type: string
format: uuid
- name: taskVersion
in: path
required: true
description: The version to delete
schema:
type: string
pattern: ^(draft|latest|\d+)$
responses:
'200':
description: Task version deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTaskResponse'
'404':
description: Task or version not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to delete task version
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
DraftTaskRequest:
type: object
properties:
code:
type: string
minLength: 1
pattern: ^[A-Za-z0-9+/]*={0,2}$
description: Base64 encoded task code
language:
type: string
enum:
- typescript
description: Programming language for the task
description:
type: string
maxLength: 1000
description: Optional description of the version
browserConfiguration:
$ref: '#/components/schemas/SessionConfig'
description: Browser configuration for task execution
required:
- code
TaskExecutionResultsListResponse:
type: object
properties:
data:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/TaskExecutionResult'
pagination:
type: object
properties:
page:
type: integer
minimum: 1
description: Current page number
limit:
type: integer
minimum: 1
description: Number of results per page
total:
type: integer
minimum: 0
description: Total number of results
totalPages:
type: integer
minimum: 0
description: Total number of pages
required:
- page
- limit
- total
- totalPages
required:
- results
- pagination
TaskListResponse:
type: object
properties:
data:
type: object
properties:
tasks:
type: array
items:
$ref: '#/components/schemas/Task'
total:
type: integer
minimum: 0
description: Total number of tasks
page:
type: integer
minimum: 1
description: Current page number
limit:
type: integer
minimum: 1
maximum: 100
description: Number of tasks per page
required:
- tasks
- total
- page
- limit
ProxyConfig:
description: 'Proxy Documentation available at [Proxy Documentation](/advanced/proxy)
'
type: object
oneOf:
- $ref: '#/components/schemas/AnchorProxy'
- $ref: '#/components/schemas/CustomProxy'
PublishVersionRequest:
type: object
properties:
code:
type: string
minLength: 1
pattern: ^[A-Za-z0-9+/]*={0,2}$
description: Base64 encoded task code (required for new versions)
language:
type: string
enum:
- typescript
description: Programming language for the task
description:
type: string
maxLength: 1000
description: Optional description of the version
browserConfiguration:
$ref: '#/components/schemas/SessionConfig'
description: Browser configuration for task execution
TaskResponse:
type: object
properties:
data:
$ref: '#/components/schemas/Task'
AnchorProxy:
title: Anchor Proxy
type: object
properties:
active:
type: boolean
type:
type: string
enum:
- anchor_proxy
description: Create a session with a proxy to access websites as if you're browsing from a computer in that country.
title: anchor_proxy
country_code:
$ref: '#/components/schemas/AnchorProxyCountryCode'
description: 'Supported country codes ISO 2 lowercase
'
region:
type: string
description: 'Region code for more specific geographic targeting.
The city parameter can only be used when region is also provided.
'
city:
type: string
description: 'City name for precise geographic targeting. Supported for anchor_proxy only.
Can only be used when region is also provided.
'
required:
- active
Task:
type: object
properties:
id:
type: string
format: uuid
description: Unique identifier for the task
name:
type: string
pattern: ^[a-zA-Z0-9_-]+$
minLength: 1
maxLength: 255
description: Task name (letters, numbers, hyphens, and underscores only)
teamId:
type: string
format: uuid
description: Team identifier that owns this task
description:
type: string
maxLength: 1000
description: Optional description of the task
latestVersion:
type: string
description: Latest version identifier (draft, latest, or version number)
code:
type: string
description: Base64 encoded task code
language:
type: string
enum:
- typescript
description: Programming language for the task
browserConfiguration:
$ref: '#/components/schemas/SessionConfig'
description: Browser configuration for task execution
deleted:
type: boolean
description: Whether the task is soft deleted
createdAt:
type: string
format: date-time
description: Task creation timestamp
updatedAt:
type: string
format: date-time
description: Task last update timestamp
required:
- id
- name
- teamId
- latestVersion
- code
- language
- deleted
- createdAt
- updatedAt
TaskMetadata:
type: object
properties:
id:
type: string
format: uuid
description: Unique identifier for the task
name:
type: string
pattern: ^[a-zA-Z0-9_-]+$
minLength: 1
maxLength: 255
description: Task name
teamId:
type: string
format: uuid
description: Team identifier that owns this task
description:
type: string
maxLength: 1000
description: Optional description of the task
latest:
type: string
description: Latest version identifier
deleted:
type: boolean
description: Whether the task is soft deleted
createdAt:
type: string
format: date-time
description: Task creation timestamp
updatedAt:
type: string
format: date-time
description: Task last update timestamp
required:
- id
- name
- teamId
- latest
- deleted
- createdAt
- updatedAt
TaskExecutionResultResponse:
type: object
properties:
data:
$ref: '#/components/schemas/TaskExecutionResult'
ErrorResponse:
type: object
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
AnchorProxyCountryCode:
type: string
t
# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/anchorbrowser/refs/heads/main/openapi/anchorbrowser-tasks-legacy-api-openapi.yml