---
title: "Update Project Batches"
method: POST
path: "/batches/{projectId}"
tags: ["Batches"]
---

# Update Project Batches

`POST /batches/{projectId}`

Updates batch definitions for a project

## Path parameters

- `projectId` string, required

## Request body

- BatchUpdateRequest
  - `batches` Batch[], required
    - `_id` string — Batch ID (auto-generated if not provided)
    - `name` string, required — Batch name

## Response `200`

Batches updated successfully

- ProjectResponse
  - `status` string
  - `data` object
    - `project` Project
      - `_id` string
      - `name` string
      - `description` string
      - `type` 'ango' | 'pct' | 'iframe'
      - `owner` string — Owner email
      - `organization` string — Organization ID
      - `categorySchema` CategorySchema — Label configuration schema that defines the annotation tools, classifications, and relations for a project. This schema determines what annotation types are available to users and how they can label assets. **Note:** Schema structure varies between Ango and PCT projects. - Ango projects: Use standard annotation tools (bounding-box, polygon, etc.) - PCT projects: Use PCT tool type with markingTools array and nested classifications with PCT-specific fields
        - `tools` Tool[] — Array of annotation tools (bounding box, polygon, segmentation, etc.)
          - `schemaId` string, required — Unique identifier for this tool
          - `title` string, required — Display name for the tool
          - `tool` 'bounding-box' | 'polygon' | 'polyline' | 'point' | 'rotated-bounding-box' | 'segmentation' | 'brush' | 'medical-brush' | 'ner' | 'pdf' | 'pct' | 'angle', required — Type of annotation tool
          - `required` boolean — Whether this annotation is required
          - `color` string — Hex color code for this annotation class
          - `shortcutKey` string — Keyboard shortcut for quick selection
          - `classifications` Classification[] — Nested classifications specific to this tool
            - `schemaId` string, required — Unique identifier for this classification
            - `title` string, required — Question or label text
            - `tool` 'radio' | 'checkbox' | 'single-dropdown' | 'multi-dropdown' | 'tree-dropdown' | 'single-tree-dropdown' | 'text' | 'boolean', required — Type of classification input (same as 'type')
            - `color` string — Hex color code for this classification
            - `required` boolean — Whether answering this classification is required
            - `shortcutKey` string — Keyboard shortcut key
            - `columnField` boolean — Whether to show in column view
            - `frameSpecific` boolean — Whether classification is frame-specific (for videos)
            - `showDropdown` boolean — Whether to show as dropdown in UI
            - `richText` boolean — Whether to enable rich text input (for text type)
            - `regex` string, nullable — Regular expression for text validation (for text type)
            - `parentOptionId` string, nullable — Parent option ID for nested classifications
            - `options` ClassificationOption[] — Available options (not used for text type)
              - …
            - `treeOptions` object[] — Tree-structured options (for tree-dropdown types)
              - …
            - `classifications` Classification[] — Nested child classifications
            - `multiple` boolean — Allow multiple selections
            - `parentToolType` string — (PCT only) Parent tool type this classification belongs to
            - `parentToolId` string — (PCT only) Parent tool schemaId this classification is associated with
            - `attributeLevel` 'Class Level' | 'Instance Level' — (PCT only) Level at which this attribute applies
            - `defaultValue` union — Default value for this classification (type varies based on classification tool type)
              - …
            - `exportName` string — (PCT only) Name used when exporting data
            - `displayName` string — (PCT only) Display name shown in the annotation interface
            - `abbreviatedName` string — (PCT only) Abbreviated name for compact UI views
            - `attributeMode` 'Time Varying' | 'Constant' | 'Sensor Specific' — (PCT only) Attribute mode determining how values persist across frames. - Time Varying: Value can change per frame - Constant: Single value for entire sequence - Sensor Specific: Different values per sensor
            - `associatedMarkingTool` string[] — (PCT only) Marking tools this classification is associated with. This classification will only be available when using these marking tools.
          - `multiple` boolean — Allow creating multiple instances of this annotation
          - `exportName` string — (PCT only) Name used when exporting data (for organizing exported annotations)
          - `displayName` string — (PCT only) Display name shown in the annotation interface
          - `abbreviatedName` string — (PCT only) Abbreviated name for compact UI views
          - `markingTools` string[] — (PCT only) List of marking tools enabled for this PCT tool. Available marking tools: polygon, polygon2d, polyline, polyline2d, cuboid, rectangle
          - `truncate` boolean — (PCT only) Enable truncation for this tool
          - `presetCuboidDimensions` boolean — (PCT only) Enable preset cuboid dimensions
          - `cuboidLength` string — (PCT only) Preset cuboid length value (stored as string)
          - `cuboidWidth` string — (PCT only) Preset cuboid width value (stored as string)
          - `cuboidHeight` string — (PCT only) Preset cuboid height value (stored as string)
          - `keypointWithVerticalLine` boolean — (PCT only) Enable keypoint with vertical line feature
          - `edgeLengthConstraint` string — (PCT only) Minimum edge length constraint (stored as string)
          - `hasInstance` boolean — (PCT only) Enable instance tracking for this tool
        - `classifications` Classification[] — Array of classification questions (radio, checkbox, dropdown, text, etc.)
          - `schemaId` string, required — Unique identifier for this classification
          - `title` string, required — Question or label text
          - `tool` 'radio' | 'checkbox' | 'single-dropdown' | 'multi-dropdown' | 'tree-dropdown' | 'single-tree-dropdown' | 'text' | 'boolean', required — Type of classification input (same as 'type')
          - `color` string — Hex color code for this classification
          - `required` boolean — Whether answering this classification is required
          - `shortcutKey` string — Keyboard shortcut key
          - `columnField` boolean — Whether to show in column view
          - `frameSpecific` boolean — Whether classification is frame-specific (for videos)
          - `showDropdown` boolean — Whether to show as dropdown in UI
          - `richText` boolean — Whether to enable rich text input (for text type)
          - `regex` string, nullable — Regular expression for text validation (for text type)
          - `parentOptionId` string, nullable — Parent option ID for nested classifications
          - `options` ClassificationOption[] — Available options (not used for text type)
            - `schemaId` string, required — Unique identifier for this option
            - `value` string, required — Display text and internal value for this option
            - `label` string — Alternative display text (deprecated, use 'value')
            - `children` Classification[] — Nested classifications that appear when this option is selected
          - `treeOptions` object[] — Tree-structured options (for tree-dropdown types)
          - `classifications` Classification[] — Nested child classifications
          - `multiple` boolean — Allow multiple selections
          - `parentToolType` string — (PCT only) Parent tool type this classification belongs to
          - `parentToolId` string — (PCT only) Parent tool schemaId this classification is associated with
          - `attributeLevel` 'Class Level' | 'Instance Level' — (PCT only) Level at which this attribute applies
          - `defaultValue` union — Default value for this classification (type varies based on classification tool type)
            - boolean
            - string
            - number
          - `exportName` string — (PCT only) Name used when exporting data
          - `displayName` string — (PCT only) Display name shown in the annotation interface
          - `abbreviatedName` string — (PCT only) Abbreviated name for compact UI views
          - `attributeMode` 'Time Varying' | 'Constant' | 'Sensor Specific' — (PCT only) Attribute mode determining how values persist across frames. - Time Varying: Value can change per frame - Constant: Single value for entire sequence - Sensor Specific: Different values per sensor
          - `associatedMarkingTool` string[] — (PCT only) Marking tools this classification is associated with. This classification will only be available when using these marking tools.
        - `relations` Relation[] — Array of relation types that can connect annotations
          - `schemaId` string, required — Unique identifier for this relation
          - `title` string, required — Display name for the relation
          - `tool` 'one-to-one' | 'group' | 'one-to-many', required — Type of relation tool: - `one-to-one`: Direct 1:1 connection between annotations (Ango only) - `group`: Non-directional grouping of multiple annotations (Ango only) - `one-to-many`: Hierarchical parent-child relationship (PCT only)
          - `color` string — Hex color code for this relation
          - `required` boolean — Whether this relation must be used in annotations
          - `classifications` unknown[] — Nested classification questions attached to this relation. Allows adding metadata or attributes to the relationship itself.
            - unknown
          - `multiple` boolean — Whether multiple instances of this relation can be created
          - `shortcutKey` string — Keyboard shortcut to quickly create this relation
          - `parentTool` string — (PCT only) For one-to-many relations, specifies the schemaId of the parent tool. Only applicable when `tool: "one-to-many"`.
          - `childTools` string[] — (PCT only) For one-to-many relations, specifies the schemaIds of allowed child tools. Only applicable when `tool: "one-to-many"`.
      - `stages` Stage[]
        - `id` string, required — Unique identifier for this stage
        - `name` string — Display name for this stage
        - `type` 'Label' | 'Review' | 'Logic' | 'Plugin' | 'Webhook' | 'Consensus' | 'Hold' | 'Start' | 'Complete' | 'Archive', required — Type of stage
        - `next` string[] — Array of next stage IDs (for Logic stages, order matters)
        - `position` object — Position in workflow diagram UI
          - `x` number
          - `y` number
        - `assignedTo` string[] — Users assigned to work on this stage (Label/Review stages)
        - `rememberAssignee` boolean — Auto-assign to previous stage's user (sticky assignment)
        - `logic` LogicConfig — Logic stage routing configuration. Routes tasks based on conditions. Conditions are evaluated in order, first match wins.
          - `type` 'AnnotationType' | 'Annotator' | 'RandomSample' | 'Duration' | 'Batch' | 'IssueErrorCode' — Type of logic routing
          - `value` object — Default value (usually empty)
          - `conditions` LogicCondition[] — Array of routing conditions
            - `type` 'AnnotationType' | 'Annotator' | 'RandomSample' | 'Duration' | 'Batch' | 'IssueErrorCode' — Type of condition
            - `value` object — Condition-specific value
              - …
            - `index` number — Index of next stage in parent's next array
        - `pluginId` string — Plugin ID to execute (Plugin stages only)
        - `pluginConfig` object — Plugin-specific configuration (Plugin stages only)
        - `webhook` WebhookConfig — Webhook configuration for external API integration
          - `url` string, uri, required — Webhook endpoint URL
          - `method` 'POST' | 'PUT' — HTTP method
          - `authType` 'no_auth' | 'secret' | 'bearer_token' — Authentication type
          - `secret` string — Secret for HMAC signature (authType=secret)
          - `token` string — Bearer token (authType=bearer_token)
          - `timeout` number — Timeout in milliseconds
          - `retryCount` number — Number of retry attempts
        - `consensusConfig` ConsensusConfig — Consensus configuration for multi-annotator agreement
          - `version` 1 | 2 — Consensus algorithm version (1 or 2, v2 recommended)
          - `threshold` number — Minimum agreement score (0-1) required to pass
          - `adjudicationMethod` 'majority' | 'union' | 'intersection' | 'first' — Method for resolving disagreements
          - `dynamicConsensus` boolean — Add more copies if threshold not met
          - `minCopies` number — Minimum number of consensus copies
          - `maxCopies` number — Maximum number of consensus copies (dynamic consensus)
        - `readOnly` boolean — Whether this stage is read-only (users can view but not edit)
        - `preventRequeue` boolean — Prevent tasks from being requeued to this stage
        - `autoForward` boolean — Automatically advance to next stage without user action
        - `consensusId` string — Links stage to a consensus stage (used in consensus workflows)
        - `consensusDynamic` boolean — Dynamic vs static consensus stage
      - `assignedTo` Assignee[]
        - `assignee` string — User email
        - `role` 'Manager' | 'Labeler' | 'Reviewer' | 'Lead'
      - `batches` Batch[]
        - `_id` string — Batch ID (auto-generated if not provided)
        - `name` string, required — Batch name
      - `queueVersion` number
      - `assetCount` integer
      - `benchmarkEnabled` boolean
      - `benchmarkRatio` number
      - `instructions` string — Instructions URL
      - `ocrLanguage` string
      - `idleTimeout` number — Idle timeout in seconds
      - `projectPlugins` object
      - `pluginPresets` object[]
      - `errorCodesEnabled` boolean
      - `errorSchema` object
      - `exportStorageId` string
      - `exportStorageBucket` string
      - `exportStoragePath` string
      - `exportStorageEnabled` boolean
      - `taskSkipEnabled` boolean
      - `unassignSkippedTask` boolean
      - `gcSyncEnabled` boolean
      - `deleted` boolean
      - `createdAt` string, date-time
      - `updatedAt` string, date-time

---

[API](https://skmtc.dev/imerit/apis/ango-hub-api-v2.md) · [All operations](https://skmtc.dev/imerit/apis/ango-hub-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imerit/ango-hub-api-v2/revisions/a1fd1e59951c/schema)
