> ## 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.

# Get a signed URL to upload a PDF

> Mint a one-shot signed URL so the PDF goes straight to storage instead of base64 through this API. Returns an opaque `upload_key` to pass as `upload_key` on POST /v1/orders. No auth, so a crude per-IP throttle bounds abuse; the bucket enforces 10MB and `application/pdf`, the order path enforces the velocity caps, and the 30-day sweep collects anything abandoned.



## OpenAPI

````yaml /openapi.json post /v1/uploads
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:
    post:
      tags:
        - Mail
      summary: Get a signed URL to upload a PDF
      description: >-
        Mint a one-shot signed URL so the PDF goes straight to storage instead
        of base64 through this API. Returns an opaque `upload_key` to pass as
        `upload_key` on POST /v1/orders. No auth, so a crude per-IP throttle
        bounds abuse; the bucket enforces 10MB and `application/pdf`, the order
        path enforces the velocity caps, and the 30-day sweep collects anything
        abandoned.
      operationId: createUploadTicket
      responses:
        '201':
          description: Upload ticket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadTicketResponse'
              example:
                status: ok
                upload_key: upl_a1b2c3d4e5f6
                upload_url: >-
                  https://storage.paperplane.app/uploads/upl_a1b2c3d4e5f6?signature=...
                method: PUT
                headers:
                  Content-Type: application/pdf
                expires_in: 900
                max_bytes: 10485760
                next:
                  - PUT your PDF bytes to upload_url
                  - Pass upload_key as upload_key on POST /v1/orders
        '429':
          description: Rate limited (10/minute per IP).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                example: 60
components:
  schemas:
    UploadTicketResponse:
      type: object
      properties:
        status:
          type: string
          const: ok
        upload_key:
          type: string
        upload_url:
          type: string
        method:
          type: string
          const: PUT
        headers:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        expires_in:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        max_bytes:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        next:
          type: array
          items:
            type: string
      required:
        - status
        - upload_key
        - upload_url
        - method
        - headers
        - expires_in
        - max_bytes
        - next
    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

````