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

# Update a draft

> Changes only the draft fields you send. `null` clears a field, and `address` and `recipient` are replaced as a whole. A postcard that is no longer a draft can't be changed (`409`). Fields that aren't listed, such as `status`, return `422`. Requires the `postcards:write` ability.



## OpenAPI

````yaml /en/openapi.yaml patch /api/postcards/{id}
openapi: 3.1.0
info:
  title: Paperjoy API
  version: '2026-10-19'
  description: >-
    Create, preview, and track real handwritten postcards. The API key decides
    whether a request runs in test or live mode.
  termsOfService: https://paperjoy.co/regulamin
  license:
    name: Proprietary
    url: https://paperjoy.co/regulamin
servers:
  - url: https://paperjoy.co
security:
  - bearerAuth: []
tags:
  - name: Account
    description: The authenticated account and its credit balance.
  - name: Postcards
    description: Create, preview, list, and retrieve postcards.
  - name: Signatures
    description: Custom handwritten signatures available to your organization.
paths:
  /api/postcards/{id}:
    patch:
      tags:
        - Postcards
      summary: Update a draft
      description: >-
        Changes only the draft fields you send. `null` clears a field, and
        `address` and `recipient` are replaced as a whole. A postcard that is no
        longer a draft can't be changed (`409`). Fields that aren't listed, such
        as `status`, return `422`. Requires the `postcards:write` ability.
      operationId: updateDraftPostcard
      parameters:
        - $ref: '#/components/parameters/PostcardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDraftPostcardRequest'
            example:
              content: |-
                Dear Anna,
                thank you for your first order! See you soon.
      responses:
        '200':
          description: The updated draft.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostcardResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/NotDraft'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    PostcardId:
      name: id
      in: path
      required: true
      description: The postcard ID.
      schema:
        type: string
        examples:
          - pc_MXP7a4Ni0c
  schemas:
    UpdateDraftPostcardRequest:
      type: object
      additionalProperties: false
      description: Send only the fields you want to change. `null` clears a field.
      properties:
        address:
          oneOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        recipient:
          oneOf:
            - $ref: '#/components/schemas/Recipient'
            - type: 'null'
        content:
          type:
            - string
            - 'null'
          maxLength: 300
        signature:
          $ref: '#/components/schemas/TypedSignature'
        signature_id:
          $ref: '#/components/schemas/SignatureIdInput'
        font_id:
          oneOf:
            - $ref: '#/components/schemas/FontId'
            - type: 'null'
        mistake:
          $ref: '#/components/schemas/Mistake'
    PostcardResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Postcard'
    Address:
      type: object
      required:
        - line_1
        - postal_code
        - country
        - city
      properties:
        line_1:
          type: string
          maxLength: 255
          description: Street and building number.
          examples:
            - ul. Marszałkowska 10
        line_2:
          type:
            - string
            - 'null'
          maxLength: 255
          description: Apartment, floor, or other detail.
          examples:
            - m. 4
        postal_code:
          type: string
          pattern: ^\d{2}-\d{3}$
          examples:
            - 00-001
        country:
          type: string
          enum:
            - PL
        city:
          type: string
          maxLength: 255
          examples:
            - Warszawa
    Recipient:
      type: object
      description: Send `first_name`, `company_name`, or both.
      properties:
        prefix:
          type:
            - string
            - 'null'
          maxLength: 30
          examples:
            - Pani
        first_name:
          type:
            - string
            - 'null'
          maxLength: 255
        last_name:
          type:
            - string
            - 'null'
          maxLength: 255
        company_name:
          type:
            - string
            - 'null'
          maxLength: 255
    TypedSignature:
      type:
        - string
        - 'null'
      maxLength: 50
      description: >-
        A sign-off written on one line at the bottom of the card. Do not send
        together with `signature_id`.
    SignatureIdInput:
      type:
        - string
        - 'null'
      description: >-
        An active custom signature ID from `GET /api/signatures`. Requires a
        plan with custom signatures. Do not send together with `signature`.
      examples:
        - sig_ZeXOkSQjTp
    FontId:
      type: string
      enum:
        - font-1
        - font-2
      description: >-
        `font-1` is clear, rounded handwriting. `font-2` is a faster, joined-up
        cursive.
    Mistake:
      type: boolean
      default: false
      description: >-
        Cross out one word and write it again, like a real person would. The
        same message always gets the same correction.
    Postcard:
      type: object
      required:
        - id
        - test_mode
        - recipient
        - signature
        - signature_id
        - mistake
        - status
        - submitted_at
        - sent_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
          examples:
            - pc_MXP7a4Ni0c
        test_mode:
          type: boolean
          description: >-
            `true` for a test postcard. Test postcards are free and are never
            written or mailed.
        address:
          description: The delivery address. Can be `null` only in a draft.
          oneOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        recipient:
          oneOf:
            - $ref: '#/components/schemas/Recipient'
            - type: 'null'
        content:
          type:
            - string
            - 'null'
          maxLength: 300
          description: The message. Can be `null` only in a draft.
        signature:
          type:
            - string
            - 'null'
          maxLength: 50
          description: >-
            The typed signature, or `null` when the postcard uses a custom
            signature.
        signature_id:
          type:
            - string
            - 'null'
          description: The custom signature used on the postcard, or `null`.
          examples:
            - sig_ZeXOkSQjTp
        font_id:
          description: The handwriting. Can be `null` only in a draft.
          oneOf:
            - $ref: '#/components/schemas/FontId'
            - type: 'null'
        mistake:
          type: boolean
          description: >-
            Whether one word is crossed out and rewritten to look naturally
            handwritten.
        status:
          $ref: '#/components/schemas/PostcardStatus'
        submitted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the postcard was ordered. `null` while it's a draft.
        sent_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the postcard was mailed. `null` until the status is `sent`.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ValidationError:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    PostcardStatus:
      type: string
      description: >-
        Where the postcard is in production. Treat unknown values as "in
        progress".
      enum:
        - draft
        - new
        - queued
        - rejected
        - pair_claimed
        - in_progress
        - pair_completed
        - sent
  responses:
    Unauthorized:
      description: The API key is missing, invalid, revoked, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Unauthenticated.
    Forbidden:
      description: >-
        The API key lacks the required ability, or the resource belongs to
        someone else.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: This action is unauthorized.
    NotFound:
      description: The resource does not exist or belongs to the other mode.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Not found.
    NotDraft:
      description: >-
        The postcard is no longer a draft, or the `Idempotency-Key` was used
        with a different request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: >-
              Postcard pc_MXP7a4Ni0c has already been submitted (status: new).
              Only drafts can be changed, submitted, or deleted.
    ValidationError:
      description: >-
        A field is invalid, the text does not fit on the card or envelope, or
        the `Idempotency-Key` is longer than 255 characters.
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/ValidationError'
              - $ref: '#/components/schemas/Error'
          examples:
            field:
              summary: Invalid field
              value:
                message: The selected font id is invalid.
                errors:
                  font_id:
                    - The selected font id is invalid.
            card_fit:
              summary: Message does not fit on the card
              value:
                message: >-
                  The content does not fit on the postcard. Shorten it or remove
                  blank lines.
                errors:
                  content:
                    - >-
                      The content does not fit on the postcard. Shorten it or
                      remove blank lines.
            envelope_fit:
              summary: Address does not fit on the envelope
              value:
                message: The sender or recipient address does not fit on the envelope.
                errors:
                  address:
                    - >-
                      The sender or recipient address does not fit on the
                      envelope.
            draft_limit:
              summary: Too many open drafts
              value:
                message: >-
                  You already have 100 open drafts. Submit or delete some of
                  them before saving another draft.
                errors:
                  draft:
                    - >-
                      You already have 100 open drafts. Submit or delete some of
                      them before saving another draft.
            signature_unavailable:
              summary: Custom signature unavailable
              value:
                message: >-
                  The selected signature is unavailable or is not active for
                  your plan.
                errors:
                  signature_id:
                    - >-
                      The selected signature is unavailable or is not active for
                      your plan.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Paperjoy API key. Keys starting with `pj_test_` use test mode; keys
        starting with `pj_live_` use live mode.

````

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