Cancel queued tasks

Atomically cancel pending Tasks without deleting their audit history. Provide exactly one selector: taskIds, batchId, or allPending=true. Running and terminal selected or batch Tasks are reported as skipped. Cancellation does not interrupt an in-flight attempt.

OpenAPI

````yaml post /api/v2/tasks/cancel
openapi: 3.0.0
info:
version: 2.0.0
title: GetVoiceBot API
description: GetVoiceBot API Documentation
servers:
- url: https://api.getvoicebot.com
description: GetVoiceBot Production
variables:
baseUrl:
default: api.getvoicebot.com
description: Production API Root
security: []
tags:
- name: Agents
- name: Inbound Email
description: Control which senders may create inbound email work for an Agent.
- name: Features
description: Inspect capabilities available within an account hierarchy.
- name: Conversation Logs
description: Query conversation activity and calculate account-level metrics.
- name: Computer Agents
description: Set up, configure, inspect, and manage GetVoiceBot Computer Agents.
- name: Computer Agent Sessions
description: View and reset Computer Agent sessions.
- name: Accounts
- name: Agent Templates
description: Create, manage, and apply reusable Agent configurations.
paths:
/api/v2/tasks/cancel:
post:
tags:
- Tasks
summary: Cancel queued tasks
description: >-
Atomically cancel pending Tasks without deleting their audit history.
Provide exactly one selector: taskIds, batchId, or allPending=true.
Running and terminal selected or batch Tasks are reported as skipped.
Cancellation does not interrupt an in-flight attempt.
parameters:
- name: targetAccountId
in: query
required: false
description: Limit cancellation to one agent account in the organization
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
taskIds:
type: array
maxItems: 1000
items:
type: string
batchId:
type: string
description: Cancel every pending task in this submission batch
allPending:
type: boolean
example: false
responses:
'200':
description: Cancellation result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
requested:
type: number
example: 3
matched:
type: number
example: 3
canceled:
type: number
example: 2
skipped:
type: number
example: 1
batchId:
type: string
example: f52b1e01-5cbc-483c-9939-3bf7d37e1426
canceledTaskIds:
type: array
example:
- task-id-1
- task-id-2
items:
type: string
xml:
name: main
application/xml:
schema:
type: object
properties:
success:
type: boolean
example: true
requested:
type: number
example: 3
matched:
type: number
example: 3
canceled:
type: number
example: 2
skipped:
type: number
example: 1
batchId:
type: string
example: f52b1e01-5cbc-483c-9939-3bf7d37e1426
canceledTaskIds:
type: array
example:
- task-id-1
- task-id-2
items:
type: string
xml:
name: main
'400':
description: Invalid selection
'401':
description: Unauthorized
'403':
description: Target account is outside the organization
'500':
description: Internal Server Error
security:
- apiKeyAuth: []
components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: query
name: token
description: GetVoiceBot API Token

````