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

# Cancel a print job

> Cancels a print job that is still queued or sent; the agent drops it if it already has it. Jobs the printer has received can no longer be cancelled.



## OpenAPI

````yaml /openapi/openapi.json post /v1/printjobs/{id}/cancel
openapi: 3.1.0
info:
  contact:
    name: PrintEasy
    url: https://docs.printeasy.adfinite.com
  description: >-
    Cloud printing API: send PDFs and raw jobs to printers attached to computers
    running the PrintEasy agent.
  title: PrintEasy API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.printeasy.adfinite.com
security:
  - ApiKeyAuth: []
  - BasicAuth: []
tags:
  - description: Who you are, your plan and usage
    name: Account
  - description: Machines running the PrintEasy agent
    name: Computers
  - description: Printers reported by agents
    name: Printers
  - description: Submit and track print jobs
    name: Print jobs
  - description: Signed event delivery to your HTTPS endpoints
    name: Webhooks
  - description: Cursor based event feed
    name: Events
  - description: Prints used this period
    name: Usage
paths:
  /v1/printjobs/{id}/cancel:
    post:
      tags:
        - Print jobs
      summary: Cancel a print job
      description: >-
        Cancels a print job that is still queued or sent; the agent drops it if
        it already has it. Jobs the printer has received can no longer be
        cancelled.
      operationId: cancelPrintJob
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrintJob'
          description: The cancelled job
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid API key or session
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            The key scope or member role does not allow this; members cannot
            cancel jobs
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found in this organization and mode
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The job is past the point where it can be cancelled
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Rate limit or test mode cap reached; retry after the Retry-After
            header
      security:
        - ApiKeyAuth: []
        - BasicAuth: []
components:
  schemas:
    PrintJob:
      example:
        computerId: 0192f1a0-7c00-7000-8000-0000000000cc
        contentType: pdf_uri
        createdAt: '2026-10-14T10:00:00.000Z'
        expireAfter: 86400
        expiresAt: '2026-10-15T10:00:00.000Z'
        fileSha256: 9f2c4a1e0b7d3f5a8c6e2d4b1a9f7e5c3b1d9f7a5e3c1b9d7f5a3e1c9b7d5f3a
        fileSize: 48213
        finishedAt: '2026-10-14T10:00:09.000Z'
        id: 0192f1a0-7c00-7000-8000-0000000000aa
        mode: live
        options:
          copies: 1
          paper: A4
        printerId: 0192f1a0-7c00-7000-8000-0000000000bb
        printingAt: '2026-10-14T10:00:03.000Z'
        qty: 1
        receivedAt: '2026-10-14T10:00:02.000Z'
        sentAt: '2026-10-14T10:00:01.000Z'
        source: api
        state: done
        stateMessage: null
        title: Invoice 1042
      properties:
        computerId:
          type: string
        contentType:
          enum:
            - pdf_uri
            - pdf_base64
            - raw_uri
            - raw_base64
          type: string
        createdAt:
          type: string
        expireAfter:
          type: number
        expiresAt:
          type: string
        fileSha256:
          type:
            - string
            - 'null'
        fileSize:
          type:
            - number
            - 'null'
        finishedAt:
          type:
            - string
            - 'null'
        id:
          type: string
        mode:
          enum:
            - live
            - test
          type: string
        options:
          additionalProperties: false
          properties:
            bin:
              maxLength: 100
              minLength: 1
              type: string
            collate:
              type: boolean
            color:
              type: boolean
            copies:
              maximum: 999
              minimum: 1
              type: integer
            dpi:
              pattern: ^\d+x\d+$
              type: string
            duplex:
              enum:
                - one-sided
                - long-edge
                - short-edge
              type: string
            fit_to_page:
              type: boolean
            media:
              maxLength: 100
              minLength: 1
              type: string
            nup:
              maximum: 16
              minimum: 1
              type: integer
            pages:
              pattern: ^\d+(-\d+)?(,\d+(-\d+)?)*$
              type: string
            paper:
              maxLength: 100
              minLength: 1
              type: string
            rotate:
              anyOf:
                - enum:
                    - 0
                  type: number
                - enum:
                    - 90
                  type: number
                - enum:
                    - 180
                  type: number
                - enum:
                    - 270
                  type: number
          type: object
        printerId:
          type: string
        printingAt:
          type:
            - string
            - 'null'
        qty:
          type: number
        receivedAt:
          type:
            - string
            - 'null'
        sentAt:
          type:
            - string
            - 'null'
        source:
          type: string
        state:
          enum:
            - queued
            - sent
            - received
            - printing
            - done
            - error
            - cancelled
            - expired
          type: string
        stateMessage:
          type:
            - string
            - 'null'
        title:
          type: string
      required:
        - id
        - mode
        - printerId
        - computerId
        - title
        - source
        - contentType
        - fileSize
        - fileSha256
        - options
        - qty
        - expireAfter
        - state
        - stateMessage
        - createdAt
        - sentAt
        - receivedAt
        - printingAt
        - finishedAt
        - expiresAt
      type: object
    Error:
      description: >-
        Every error response uses this envelope; code is stable, message is for
        humans.
      properties:
        error:
          properties:
            code:
              example: not_found
              type: string
            message:
              example: Printer not found
              type: string
            request_id:
              example: 4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a
              type: string
          required:
            - code
            - message
            - request_id
          type: object
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: pe_live_ or pe_test_ key
      description: >-
        Send `Authorization: Bearer <API key>`. Use a pe_test_ key in the
        playground; it only reaches virtual test printers.
      scheme: bearer
      type: http
      x-default: pe_test_REPLACE_WITH_YOUR_TEST_KEY
    BasicAuth:
      description: >-
        PrintNode compatible: put the API key in the username with an empty
        password
      scheme: basic
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.