> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withmithras.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Legacy cancel

> Compatibility endpoint for queue items addressed by account_id and content_id.



## OpenAPI

````yaml /openapi.json post /cancel
openapi: 3.1.0
info:
  title: Phonefarm Public API
  description: >-
    Process-first public API for externally triggered Phonefarm execution across
    TikTok and Instagram.
  version: '2026-05-09'
servers:
  - url: https://phonefarm.withmithras.com
security:
  - bearerAuth: []
paths:
  /cancel:
    post:
      tags:
        - Legacy
      summary: Legacy cancel
      description: >-
        Compatibility endpoint for queue items addressed by account_id and
        content_id.
      operationId: legacyCancel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LegacyCancelRequest'
      responses:
        '200':
          description: Queue item cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyCancelResponse'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Requested process, account, or queue item was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: State conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid request payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected runtime, environment, or database failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LegacyCancelRequest:
      type: object
      properties:
        content_id:
          type: string
          minLength: 1
        account_id:
          type: string
          minLength: 1
        reason:
          type: string
          minLength: 1
      required:
        - content_id
        - account_id
        - reason
    LegacyCancelResponse:
      type: object
      properties:
        status:
          type: string
          const: cancelled
        queue_item_id:
          type: string
          format: uuid
        previous_status:
          type: string
      required:
        - status
        - queue_item_id
        - previous_status
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: PHONEFARM_API_KEY

````