> ## Documentation Index
> Fetch the complete documentation index at: https://paperplane-justin-winter-s-projects.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload PDF bytes (keyless dev only)

> Keyless-dev upload sink. With storage configured, POST /v1/uploads hands back a real signed URL and the browser never touches this route — which is why it hard-refuses unless storage is the in-memory fallback. It exists so the two-step upload flow is the only client path, dev included.



## OpenAPI

````yaml /openapi.json put /v1/uploads/{key}
openapi: 3.1.0
info:
  title: paperplane API
  version: 1.0.0
  summary: Send real physical mail from code.
  description: >-
    Upload a PDF or paste text; we print it and hand it to USPS the next
    business day. No account required — pay per letter with a Stripe link or a
    prepaid credit code, and use `sandbox: true` to exercise the whole flow for
    free.


    Every failure returns the same envelope: `status`, a stable machine-readable
    `code`, a human `reason`, and a `next` array of concrete recovery steps.


    This document is generated from the same zod schemas the server validates
    with, so it cannot describe an endpoint that does not exist.
  contact:
    name: paperplane support
    url: https://sendpaperplane.com/contact
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
  termsOfService: https://sendpaperplane.com/terms
servers:
  - url: https://sendpaperplane.com
    description: Production
security: []
tags:
  - name: Mail
    description: Quote, send, track, and cancel letters.
  - name: Credits
    description: Prepaid balances that pay for letters without a card.
  - name: Reviews
    description: Post-delivery feedback. Identity is derived from the order, not supplied.
  - name: Addresses
    description: >-
      Typeahead and reverse geocoding. Convenience only; USPS verification is
      authoritative.
  - name: Meta
    description: Machine-readable description of this API.
paths:
  /v1/uploads/{key}:
    put:
      tags:
        - Mail
      summary: Upload PDF bytes (keyless dev only)
      description: >-
        Keyless-dev upload sink. With storage configured, POST /v1/uploads hands
        back a real signed URL and the browser never touches this route — which
        is why it hard-refuses unless storage is the in-memory fallback. It
        exists so the two-step upload flow is the only client path, dev
        included.
      operationId: putUploadedFile
      parameters:
        - name: key
          in: path
          required: true
          description: >-
            Opaque key returned by POST /v1/uploads. Anything else is refused
            with 400 before storage is ever touched.
          schema:
            type: string
            pattern: ^up_[0-9a-f]{32}\.pdf$
      responses:
        '204':
          description: Bytes stored; pass the key as `upload_key` on POST /v1/orders.
        '400':
          description: upload_key is not a key this server issued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: This route only exists in keyless dev mode.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: PDF exceeds the 10MB limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        status:
          type: string
          enum:
            - failed
            - action_required
        code:
          type: string
        reason:
          type: string
        next:
          type: array
          items:
            type: string
      required:
        - status
        - code
        - reason
        - next

````