---
title: "Create Task"
method: POST
path: "/v1/task"
tags: ["Tasks"]
---

# Create Task

`POST /v1/task`

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.

## Request body

- CreateTaskRequest
  - `name` string, required — Task name (letters, numbers, hyphens, and underscores only)
  - `code` string — Base64 encoded task code (optional)
  - `language` 'typescript', required — Programming language for the task
  - `description` string — Optional description of the task
  - `browserConfiguration` SessionConfig — Session-related configurations.
    - `initial_url` string, uri — The URL to navigate to when the browser session starts. If not provided, the browser will load an empty page.
    - `recording` object — Configuration for session recording.
      - `active` boolean — Enable or disable video recording of the browser session. Defaults to `true`.
    - `proxy` union — Proxy Documentation available at [Proxy Documentation](/advanced/proxy)
      - object
        - `active` boolean, required
        - `type` union — **On change make sure to update the country_code.**
          - 'anchor_proxy' | 'anchor_residential' | 'anchor_mobile' | 'anchor_gov' — 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' — Create a session with a mobile proxy to access websites as if you're browsing from a mobile device in that country.
          - 'anchor_proxy' | 'anchor_residential' | 'anchor_mobile' | 'anchor_gov' — Create your session with a residential proxy to access websites as if you're browsing from a computer in that country. This option reduces the chance of being blocked by governmental websites.
          - 'anchor_proxy' | 'anchor_residential' | 'anchor_mobile' | 'anchor_gov' — Create a session with a proxy to access websites as if you're browsing from a computer in that country.
        - `country_code` union — 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'
          - 'af' | 'al' | 'dz' | 'ad' | 'ao' | 'ag' | 'ar' | 'am' | 'aw' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'by' | 'be' | 'bz' | 'bj' | 'bm' | 'bo' | 'ba' | 'bw' | 'br' | 'bn' | 'bg' | 'bf' | 'bi' | 'kh' | 'cm' | 'ca' | 'cv' | 'td' | 'cl' | 'cn' | 'co' | 'cg' | 'cr' | 'ci' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'dj' | 'dm' | 'do' | 'ec' | 'eg' | 'sv' | 'gq' | 'ee' | 'sz' | 'et' | 'fj' | 'fi' | 'fr' | 'pf' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gr' | 'gd' | 'gt' | 'gn' | 'gy' | 'ht' | 'hn' | 'hk' | 'hu' | 'is' | 'in' | 'id' | 'ir' | 'iq' | 'ie' | 'il' | 'it' | 'jm' | 'jp' | 'jo' | 'kz' | 'ke' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'ls' | 'lr' | 'ly' | 'lt' | 'lu' | 'mk' | 'mg' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mr' | 'mx' | 'md' | 'mn' | 'me' | 'ma' | 'mz' | 'mm' | 'na' | 'np' | 'nl' | 'nc' | 'nz' | 'ni' | 'ne' | 'ng' | 'no' | 'om' | 'pk' | 'pa' | 'pg' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'pr' | 'qa' | 'ro' | 'ru' | 'rw' | 'lc' | 'ws' | 'sm' | 'sa' | 'sn' | 'rs' | 'sl' | 'sg' | 'sk' | 'si' | 'so' | 'za' | 'kr' | 'ss' | 'es' | 'lk' | 'sd' | 'sr' | 'se' | 'ch' | 'sy' | 'st' | 'tw' | 'tj' | 'tz' | 'th' | 'tl' | 'tr' | 'tg' | 'tt' | 'tn' | 'tm' | 'ug' | 'ua' | 'gb' | 'us' | 'uy' | 'uz' | 'vu' | 've' | 'vn' | 'ye' | 'zm' | 'zw'
          - 'af' | 'al' | 'dz' | 'ao' | 'ag' | 'ar' | 'am' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'be' | 'bz' | 'bj' | 'bt' | 'bo' | 'ba' | 'bw' | 'br' | 'bg' | 'bf' | 'kh' | 'cm' | 'ca' | 'cv' | 'cl' | 'cn' | 'co' | 'cg' | 'ci' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'do' | 'ec' | 'eg' | 'sv' | 'ee' | 'et' | 'fj' | 'fi' | 'fr' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gr' | 'gt' | 'gw' | 'gy' | 'ht' | 'hn' | 'hu' | 'is' | 'in' | 'id' | 'iq' | 'ie' | 'il' | 'it' | 'jm' | 'jp' | 'jo' | 'kz' | 'ke' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'lr' | 'ly' | 'lt' | 'mk' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mu' | 'mx' | 'md' | 'mn' | 'me' | 'ma' | 'mz' | 'np' | 'nl' | 'nc' | 'nz' | 'na' | 'ni' | 'ng' | 'no' | 'om' | 'pk' | 'pa' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'qa' | 'ro' | 'ru' | 'rw' | 'sa' | 'sn' | 'rs' | 'sl' | 'sg' | 'sk' | 'si' | 'za' | 'kr' | 'es' | 'lk' | 'sd' | 'se' | 'ch' | 'sy' | 'tw' | 'tj' | 'tz' | 'th' | 'tg' | 'tt' | 'tn' | 'tr' | 'ug' | 'ua' | 'ae' | 'gb' | 'us' | 'uy' | 'uz' | 've' | 'vn' | 'ye' | 'zm' | 'zw'
          - '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` string — Region code for more specific geographic targeting. The city parameter can only be used when region is also provided.
        - `city` string — City name for precise geographic targeting. Supported for anchor_proxy only. Can only be used when region is also provided.
      - object
        - `type` 'custom', required
        - `server` string, required — Proxy server address
        - `username` string, required — Proxy username
        - `password` string, required — Proxy password
        - `active` boolean, required
    - `timeout` object — Timeout configurations for the browser session.
      - `max_duration` integer — Maximum amount of time (in minutes) for the browser to run before terminating. Defaults to `20`.
      - `idle_timeout` integer — The amount of time (in minutes) the browser session waits for new connections after all others are closed before stopping. Defaults to `5`.
    - `live_view` object — Configuration for live viewing the browser session.
      - `read_only` boolean — Enable or disable read-only mode for live viewing. Defaults to `false`.

## Response `200`

Task created or updated successfully

- TaskResponse
  - `data` Task
    - `id` string, uuid, required — Unique identifier for the task
    - `name` string, required — Task name (letters, numbers, hyphens, and underscores only)
    - `teamId` string, uuid, required — Team identifier that owns this task
    - `description` string — Optional description of the task
    - `latestVersion` string, required — Latest version identifier (draft, latest, or version number)
    - `code` string, required — Base64 encoded task code
    - `language` 'typescript', required — Programming language for the task
    - `browserConfiguration` SessionConfig — Session-related configurations.
      - `initial_url` string, uri — The URL to navigate to when the browser session starts. If not provided, the browser will load an empty page.
      - `recording` object — Configuration for session recording.
        - `active` boolean — Enable or disable video recording of the browser session. Defaults to `true`.
      - `proxy` union — Proxy Documentation available at [Proxy Documentation](/advanced/proxy)
        - object
          - `active` boolean, required
          - `type` union — **On change make sure to update the country_code.**
            - 'anchor_proxy' | 'anchor_residential' | 'anchor_mobile' | 'anchor_gov' — 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' — Create a session with a mobile proxy to access websites as if you're browsing from a mobile device in that country.
            - 'anchor_proxy' | 'anchor_residential' | 'anchor_mobile' | 'anchor_gov' — Create your session with a residential proxy to access websites as if you're browsing from a computer in that country. This option reduces the chance of being blocked by governmental websites.
            - 'anchor_proxy' | 'anchor_residential' | 'anchor_mobile' | 'anchor_gov' — Create a session with a proxy to access websites as if you're browsing from a computer in that country.
          - `country_code` union — 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'
            - 'af' | 'al' | 'dz' | 'ad' | 'ao' | 'ag' | 'ar' | 'am' | 'aw' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'by' | 'be' | 'bz' | 'bj' | 'bm' | 'bo' | 'ba' | 'bw' | 'br' | 'bn' | 'bg' | 'bf' | 'bi' | 'kh' | 'cm' | 'ca' | 'cv' | 'td' | 'cl' | 'cn' | 'co' | 'cg' | 'cr' | 'ci' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'dj' | 'dm' | 'do' | 'ec' | 'eg' | 'sv' | 'gq' | 'ee' | 'sz' | 'et' | 'fj' | 'fi' | 'fr' | 'pf' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gr' | 'gd' | 'gt' | 'gn' | 'gy' | 'ht' | 'hn' | 'hk' | 'hu' | 'is' | 'in' | 'id' | 'ir' | 'iq' | 'ie' | 'il' | 'it' | 'jm' | 'jp' | 'jo' | 'kz' | 'ke' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'ls' | 'lr' | 'ly' | 'lt' | 'lu' | 'mk' | 'mg' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mr' | 'mx' | 'md' | 'mn' | 'me' | 'ma' | 'mz' | 'mm' | 'na' | 'np' | 'nl' | 'nc' | 'nz' | 'ni' | 'ne' | 'ng' | 'no' | 'om' | 'pk' | 'pa' | 'pg' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'pr' | 'qa' | 'ro' | 'ru' | 'rw' | 'lc' | 'ws' | 'sm' | 'sa' | 'sn' | 'rs' | 'sl' | 'sg' | 'sk' | 'si' | 'so' | 'za' | 'kr' | 'ss' | 'es' | 'lk' | 'sd' | 'sr' | 'se' | 'ch' | 'sy' | 'st' | 'tw' | 'tj' | 'tz' | 'th' | 'tl' | 'tr' | 'tg' | 'tt' | 'tn' | 'tm' | 'ug' | 'ua' | 'gb' | 'us' | 'uy' | 'uz' | 'vu' | 've' | 'vn' | 'ye' | 'zm' | 'zw'
            - 'af' | 'al' | 'dz' | 'ao' | 'ag' | 'ar' | 'am' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'be' | 'bz' | 'bj' | 'bt' | 'bo' | 'ba' | 'bw' | 'br' | 'bg' | 'bf' | 'kh' | 'cm' | 'ca' | 'cv' | 'cl' | 'cn' | 'co' | 'cg' | 'ci' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'do' | 'ec' | 'eg' | 'sv' | 'ee' | 'et' | 'fj' | 'fi' | 'fr' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gr' | 'gt' | 'gw' | 'gy' | 'ht' | 'hn' | 'hu' | 'is' | 'in' | 'id' | 'iq' | 'ie' | 'il' | 'it' | 'jm' | 'jp' | 'jo' | 'kz' | 'ke' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'lr' | 'ly' | 'lt' | 'mk' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mu' | 'mx' | 'md' | 'mn' | 'me' | 'ma' | 'mz' | 'np' | 'nl' | 'nc' | 'nz' | 'na' | 'ni' | 'ng' | 'no' | 'om' | 'pk' | 'pa' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'qa' | 'ro' | 'ru' | 'rw' | 'sa' | 'sn' | 'rs' | 'sl' | 'sg' | 'sk' | 'si' | 'za' | 'kr' | 'es' | 'lk' | 'sd' | 'se' | 'ch' | 'sy' | 'tw' | 'tj' | 'tz' | 'th' | 'tg' | 'tt' | 'tn' | 'tr' | 'ug' | 'ua' | 'ae' | 'gb' | 'us' | 'uy' | 'uz' | 've' | 'vn' | 'ye' | 'zm' | 'zw'
            - '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` string — Region code for more specific geographic targeting. The city parameter can only be used when region is also provided.
          - `city` string — City name for precise geographic targeting. Supported for anchor_proxy only. Can only be used when region is also provided.
        - object
          - `type` 'custom', required
          - `server` string, required — Proxy server address
          - `username` string, required — Proxy username
          - `password` string, required — Proxy password
          - `active` boolean, required
      - `timeout` object — Timeout configurations for the browser session.
        - `max_duration` integer — Maximum amount of time (in minutes) for the browser to run before terminating. Defaults to `20`.
        - `idle_timeout` integer — The amount of time (in minutes) the browser session waits for new connections after all others are closed before stopping. Defaults to `5`.
      - `live_view` object — Configuration for live viewing the browser session.
        - `read_only` boolean — Enable or disable read-only mode for live viewing. Defaults to `false`.
    - `deleted` boolean, required — Whether the task is soft deleted
    - `createdAt` string, date-time, required — Task creation timestamp
    - `updatedAt` string, date-time, required — Task last update timestamp

## Other responses

- `400` — Invalid request or validation failed
- `409` — Task name already exists
- `500` — Failed to create task

## Changes

- **2025-10-20** `918bcdcb6208` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/changes/v1/task/post.md)

---

[API](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api.md) · [All operations](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anchorbrowser/anchorbrowser-api/revisions/8f77fa55fe1f/schema)
