Tasks (Legacy)

Create Task (Legacy)

Changed on

Creates a new task or updates an existing task with the same name. Tasks are reusable code snippets that can be executed in browser sessions. Tasks support versioning with draft and published versions.

If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.

post/v1/task

Request

  • Base URL
    https://api.anchorbrowser.io
  • Auth
    API key in header anchor-api-key

Request body

namestring required

Task name (letters, numbers, hyphens, and underscores only)

codestring

Base64 encoded task code (optional)

language'typescript' required

Programming language for the task

descriptionstring

Optional description of the task

Example request

{
  "browserConfiguration": {
    "tags": [
      "production",
      "scraping",
      "customer-123"
    ],
    "domain_allowlist": [
      "example.com",
      "example.org"
    ]
  }
}

Response

Task created or updated successfully

Example response

{
  "data": {
    "browserConfiguration": {
      "tags": [
        "production",
        "scraping",
        "customer-123"
      ],
      "domain_allowlist": [
        "example.com",
        "example.org"
      ]
    }
  }
}

Changes

    • info

      added the new optional request property /

    • info

      added the optional property // to the response with the status

    • info

      endpoint added