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

# Cancel letter

> Cancel a letter.



## OpenAPI

````yaml POST /letters/{id}/cancel
openapi: 3.0.0
info:
  title: Posta API
  description: Posta API
  version: '2024-07-30'
servers:
  - url: https://api.posta.co
    description: Posta API endpoint
    variables: {}
security: []
tags:
  - name: Letters
  - name: Assets
  - name: Asset Versions
paths:
  /letters/{id}/cancel:
    post:
      tags:
        - Letters
      summary: Cancel letter
      description: Cancel a letter.
      operationId: cancelLetter
      parameters:
        - name: id
          in: path
          required: true
          description: The unique identifier of the letter to cancel.
          schema:
            type: string
      responses:
        '202':
          description: >-
            The request has been accepted for processing, but processing has not
            yet completed.
        '400':
          description: The server could not understand the request due to invalid syntax.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Access is unauthorized.
        '403':
          description: Access is forbidden.
        '429':
          description: Client error
          headers:
            P-RateLimit-Limit:
              required: false
              schema:
                type: integer
            P-RateLimit-Remaining:
              required: false
              schema:
                type: integer
            P-RateLimit-Reset:
              required: false
              schema:
                type: string
                format: date-time
        '500':
          description: Server error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          description: Errors object is representing the request field validation errors
      allOf:
        - type: object
          required:
            - type
            - title
            - detail
            - status
          properties:
            type:
              type: string
              description: The type of the error
            title:
              type: string
              description: A brief summary of the error
            detail:
              type: string
              description: A detailed description of the error
            status:
              type: number
              enum:
                - 400
              description: The HTTP status code
          description: RFC 7807 problem details object
      description: Request validation error response
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````