Lob.com Resource Proofs API

The resource proofs endpoint allows you to create a final rendering of any template. This is best practice to ensure that you are visually validating your creative before any mail pieces use the template. The API provides endpoints for creating, updating, and retrieving template proofs. back to top

OpenAPI Specification

lobcom-resource-proofs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Lob Accounts Resource Proofs API
  version: 1.22.0
  description: 'The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p>

    '
  license:
    name: MIT
    url: https://mit-license.org/
  contact:
    name: Lob Developer Experience
    url: https://support.lob.com/
    email: lob-openapi@lob.com
  termsOfService: https://www.lob.com/legal
servers:
- url: https://api.lob.com/v1
  description: production
security:
- basicAuth: []
tags:
- name: Resource Proofs
  description: 'The resource proofs endpoint allows you to create a final rendering of any template. This is best practice to ensure that you are visually validating your creative before any mail pieces use the template. The API provides endpoints for creating, updating, and retrieving template proofs.

    <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to top</a></div>

    '
paths:
  /resource_proofs/{res_prf_id}:
    parameters:
    - in: path
      name: res_prf_id
      description: id of the resource proof
      required: true
      schema:
        $ref: '#/components/schemas/res_prf_id'
    get:
      operationId: resource_proof_retrieve
      summary: Retrieve
      description: Retrieves the details of an existing resource proof. You need only supply the unique resource proof identifier.
      tags:
      - Resource Proofs
      responses:
        '200':
          description: Returns a resource proof object
          content:
            $ref: '#/components/mediaTypes/resource_proof'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/resource_proofs/res_prf_example123 \\\n  -u <YOUR API KEY>:\n"
        label: CURL
    patch:
      operationId: resource_proof_update
      summary: Update
      description: Updates the specified resource proof.
      tags:
      - Resource Proofs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/resource_proof_updatable'
            example:
              template_id: tmpl_a1234dddg
      responses:
        '200':
          description: Returns an updated resource proof object
          content:
            $ref: '#/components/mediaTypes/resource_proof'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
      - lang: Shell
        source: "curl -X PATCH https://api.lob.com/v1/resource_proofs/res_prf_example123 \\\n  -u <YOUR API KEY>: \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"template_id\": \"tmpl_a1234dddg\"}'\n"
        label: CURL
  /resource_proofs:
    post:
      operationId: resource_proof_create
      summary: Create
      description: Creates a new resource proof with the provided properties.
      tags:
      - Resource Proofs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/resource_proof_editable'
            example:
              resource_type: postcard
              resource_parameters:
                front: tmpl_a1234dddg
                back: tmpl_a1234dddg
                to: adr_a1234dddg
      responses:
        '201':
          $ref: '#/components/responses/post_resource_proof'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/resource_proofs \\\n  -u <YOUR API KEY>: \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"resource_type\": \"postcard\",\n    \"resource_parameters\": {\n      \"front\": \"tmpl_a1234dddg\",\n      \"back\": \"tmpl_a1234dddg\",\n      \"to\": \"adr_a1234dddg\"\n    }\n  }'\n"
        label: CURL
components:
  schemas:
    address_fields_us:
      type: object
      required:
      - address_line1
      - address_city
      - address_state
      - address_zip
      properties:
        address_line1:
          type: string
          description: The primary number, street name, and directional information.
          maxLength: 64
        address_line2:
          type: string
          description: An optional field containing any information which can't fit into line 1.
          maxLength: 64
          nullable: true
        address_city:
          type: string
          maxLength: 200
        address_state:
          type: string
          description: 2 letter state short-name code
          pattern: ^[a-zA-Z]{2}$
        address_zip:
          type: string
          description: 'Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.

            '
          pattern: ^\d{5}(-\d{4})?$
    remote_file_url:
      type: string
      description: 'The location of a remote file. Remote URLs have a 5 MB file size limit and must be downloaded within 40 seconds.

        '
      pattern: ^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$
    res_prf_status:
      type: string
      description: The processing status of the resource proof.
      enum:
      - processing
      - completed
      - failed
    double_sided:
      type: boolean
      description: Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`.
      default: true
    date_created:
      type: string
      format: date-time
      description: A timestamp in ISO 8601 format of the date the resource was created.
    input_to:
      type: object
      properties:
        to:
          description: 'Must either be an address ID or an inline object with correct address parameters. If an object is used, an address will be created, corrected, and standardized for free whenever possible using our US Address Verification engine (if it is a US address), and returned back with an ID. Depending on your <a href="https://dashboard.lob.com/#/settings/editions" target="_blank">Print & Mail Edition</a>, US addresses may also be run through <a href="#tag/National-Change-of-Address">National Change of Address Linkage(NCOALink)</a>. Non-US addresses will be standardized into uppercase only. If a US address used does not meet your account’s <a href="https://dashboard.lob.com/#/settings/account" target="_blank">US Mail strictness setting</a>, the request will fail. <a href="https://help.lob.com/print-and-mail/all-about-addresses" target="_blank">Lob Guide: Verification of Mailing Addresses</a>'
          oneOf:
          - $ref: '#/components/schemas/adr_id'
          - $ref: '#/components/schemas/inline_address'
    resource_proof_editable:
      required:
      - resource_type
      - resource_parameters
      oneOf:
      - title: Postcard Resource Proof
        type: object
        properties:
          template_id:
            type: string
            nullable: true
            description: The template ID to associate with the resource proof.
          resource_type:
            type: string
            enum:
            - postcard
            description: The type of resource to generate a proof for.
          resource_parameters:
            $ref: '#/components/schemas/postcard_resource_parameters'
      - title: Letter Resource Proof
        type: object
        properties:
          template_id:
            type: string
            nullable: true
            description: The template ID to associate with the resource proof.
          resource_type:
            type: string
            enum:
            - letter
            description: The type of resource to generate a proof for.
          resource_parameters:
            $ref: '#/components/schemas/letter_resource_parameters'
      - title: Self Mailer Resource Proof
        type: object
        properties:
          template_id:
            type: string
            nullable: true
            description: The template ID to associate with the resource proof.
          resource_type:
            type: string
            enum:
            - self_mailer
            description: The type of resource to generate a proof for.
          resource_parameters:
            $ref: '#/components/schemas/self_mailer_resource_parameters'
      discriminator:
        propertyName: resource_type
        mapping:
          postcard: '#/components/schemas/0'
          letter: '#/components/schemas/1'
          self_mailer: '#/components/schemas/2'
    country_extended:
      type: string
      description: Must be a 2 letter country short-name code (ISO 3166). Does not accept `US`, `AS`, `PR`, `FM`, `GU`, `MH`, `MP`, `PW`, or `VI`. For these addresses, please use the US verification API. Also does not accept `PS`, which is not currently supported.
      enum:
      - AD
      - AE
      - AF
      - AG
      - AI
      - AL
      - AN
      - AO
      - AQ
      - AR
      - AT
      - AU
      - AW
      - AZ
      - BA
      - BB
      - BD
      - BE
      - BF
      - BG
      - BH
      - BI
      - BJ
      - BM
      - BN
      - BO
      - BQ
      - BR
      - BS
      - BT
      - BW
      - BY
      - BZ
      - CA
      - CD
      - CG
      - CH
      - CI
      - CK
      - CL
      - CM
      - CN
      - CO
      - CR
      - CS
      - CU
      - CV
      - CW
      - CY
      - CZ
      - DE
      - DJ
      - DK
      - DM
      - DO
      - DZ
      - EC
      - EE
      - EG
      - EH
      - ER
      - ES
      - ET
      - FI
      - FJ
      - FK
      - FO
      - FR
      - GA
      - GB
      - GD
      - GE
      - GH
      - GI
      - GL
      - GM
      - GN
      - GQ
      - GR
      - GS
      - GT
      - GW
      - GY
      - HK
      - HN
      - HR
      - HT
      - HU
      - ID
      - IE
      - IL
      - IN
      - IO
      - IQ
      - IR
      - IS
      - IT
      - JM
      - JO
      - JP
      - KE
      - KG
      - KH
      - KI
      - KM
      - KN
      - KP
      - KR
      - KW
      - KY
      - KZ
      - LA
      - LB
      - LC
      - LI
      - LK
      - LR
      - LS
      - LT
      - LU
      - LV
      - LY
      - MA
      - MC
      - MD
      - ME
      - MG
      - MK
      - ML
      - MM
      - MN
      - MO
      - MR
      - MS
      - MT
      - MU
      - MV
      - MW
      - MX
      - MY
      - MZ
      - NA
      - NE
      - NF
      - NG
      - NI
      - NL
      - 'NO'
      - NP
      - NR
      - NU
      - NZ
      - OM
      - PA
      - PE
      - PG
      - PH
      - PK
      - PL
      - PN
      - PT
      - PY
      - QA
      - RO
      - RS
      - RU
      - RW
      - SA
      - SB
      - SC
      - SD
      - SE
      - SG
      - SH
      - SI
      - SK
      - SL
      - SM
      - SN
      - SO
      - SR
      - SS
      - ST
      - SV
      - SX
      - SY
      - SZ
      - TC
      - TD
      - TG
      - TH
      - TJ
      - TK
      - TL
      - TM
      - TN
      - TO
      - TR
      - TT
      - TV
      - TW
      - TZ
      - UA
      - UG
      - UY
      - UZ
      - VA
      - VC
      - VE
      - VG
      - VN
      - VU
      - WS
      - YE
      - ZA
      - ZM
      - ZW
    address_placement:
      type: string
      enum:
      - top_first_page
      - insert_blank_page
      - bottom_first_page_center
      - bottom_first_page
      description: "Specifies the location of the address information that will show through the double-window envelope. To see how this will impact your letter design, view our letter template.\nSome values are exclusive to certain customers. Upgrade to the appropriate <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a> to gain access.\n  * `top_first_page` - (default) print address information at the top of your provided first page\n  * `insert_blank_page` - insert a blank address page at the beginning of your file (you will be charged for the extra page)\n  * `bottom_first_page_center` - **(exclusive, deprecation planned within a few months)** print address information at the bottom center of your provided first page\n  * `bottom_first_page` - **(exclusive)** print address information at the bottom of your provided first page\n"
      default: top_first_page
    resource_proof_base:
      type: object
      properties:
        template_id:
          type: string
          nullable: true
          description: The template ID associated with the resource proof, if any.
        resource_type:
          $ref: '#/components/schemas/res_prf_resource_type'
        status:
          $ref: '#/components/schemas/res_prf_status'
        thumbnails:
          type: array
          description: Thumbnail images of the resource proof.
          items:
            $ref: '#/components/schemas/thumbnail'
        url:
          type: string
          nullable: true
          description: A URL to the resource proof PDF.
        errors:
          type: array
          description: Errors encountered during processing.
          items:
            $ref: '#/components/schemas/issue_entry'
    issue_entry:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: A machine-readable error code.
        message:
          type: string
          description: A human-readable description of the issue.
        urls:
          type: array
          description: Relevant URLs for more information.
          items:
            type: string
    address_editable_us:
      allOf:
      - $ref: '#/components/schemas/address_fields_us'
      - type: object
        anyOf:
        - title: address obj with `name` defined
          required:
          - name
        - title: address obj with `company` defined
          required:
          - company
        properties:
          description:
            $ref: '#/components/schemas/resource_description'
          name:
            type: string
            description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address.

              '
            maxLength: 40
            nullable: true
          company:
            $ref: '#/components/schemas/company'
          phone:
            type: string
            description: Must be no longer than 40 characters.
            maxLength: 40
            nullable: true
          email:
            type: string
            description: Must be no longer than 100 characters.
            maxLength: 100
            nullable: true
          address_country:
            type: string
            enum:
            - US
            default: US
          metadata:
            $ref: '#/components/schemas/metadata'
    self_mailer_size:
      type: string
      enum:
      - 6x18_bifold
      - 11x9_bifold
      - 12x9_bifold
      - 17.75x9_trifold
      description: Specifies the size of the self mailer. The `17.75x9_trifold` size is in beta. Contact support@lob.com or your account contact to learn more.
      default: 6x18_bifold
    company:
      type: string
      description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. This field can be used for any secondary recipient information which is not part of the actual mailing address (Company Name, Department, Attention Line, etc).

        '
      maxLength: 40
      nullable: true
    adr_id:
      type: string
      description: Unique identifier prefixed with `adr_`.
      pattern: ^adr_[a-zA-Z0-9]+$
    tmpl_id:
      type: string
      description: Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates).
      pattern: ^tmpl_[a-zA-Z0-9]+$
    merge_variables:
      type: object
      description: 'You can input a merge variable payload object to your template or QR code redirect URLs to render dynamic content. For example, if you have a template like: `{{variable_name}}`, pass in `{"variable_name": "Harry"}` to render `Harry`. `merge_variables` must be an object. Any type of value is accepted as long as the object is valid JSON; you can use `strings`, `numbers`, `booleans`, `arrays`, `objects`, or `null`. The max length of the object is 25,000 characters. If you call `JSON.stringify` on your object, it can be no longer than 25,000 characters. Your variable names cannot contain any whitespace or any of the following special characters: `!`, `"`, `#`, `%`, `&`, `''`, `(`, `)`, `*`, `+`, `,`, `/`, `;`, `<`, `=`, `>`, `@`, `[`, `\`, `]`, `^`, `` ` ``, `{`, `|`, `}`, `~`. More instructions can be found in <a href="https://help.lob.com/print-and-mail/designing-mail-creatives/dynamic-personalization#using-html-and-merge-variables-10" target="_blank">our guide to using html and merge variables</a>. Depending on your <a href="https://dashboard.lob.com/#/settings/account" target="_blank">Merge Variable strictness</a> setting, if you define variables in your HTML but do not pass them here, you will either receive an error or the variable will render as an empty string. These settings only apply on HTML templates and not on QR code redirect URLs.'
      maxLength: 25000
      nullable: true
    postcard_size:
      type: string
      enum:
      - 4x6
      - 6x9
      - 6x11
      description: 'Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations.

        '
      default: 4x6
    color:
      type: boolean
      description: Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white.
    resource_description:
      type: string
      description: 'An internal description that identifies this resource. Must be no longer than 255 characters.

        '
      maxLength: 255
      nullable: true
    letter_resource_parameters:
      allOf:
      - $ref: '#/components/schemas/input_to'
      - $ref: '#/components/schemas/input_from'
      - type: object
        required:
        - to
        - from
        - file
        - color
        properties:
          merge_variables:
            $ref: '#/components/schemas/merge_variables'
          file:
            $ref: '#/components/schemas/ltr_file'
          color:
            allOf:
            - $ref: '#/components/schemas/color'
            - default: false
          double_sided:
            $ref: '#/components/schemas/double_sided'
          address_placement:
            $ref: '#/components/schemas/address_placement'
          size:
            $ref: '#/components/schemas/ltr_size'
    inline_address_us:
      allOf:
      - $ref: '#/components/schemas/address_editable_us'
      - type: object
        required:
        - address_line1
        - address_city
        - address_state
        - address_zip
    res_prf_resource_type:
      type: string
      description: The type of resource to generate a proof for.
      enum:
      - postcard
      - letter
      - self_mailer
    date_modified:
      type: string
      format: date-time
      description: A timestamp in ISO 8601 format of the date the resource was last modified.
    res_prf_id:
      type: string
      description: Unique identifier prefixed with `res_prf_`.
      pattern: ^res_prf_[a-zA-Z0-9]+$
    inline_address_intl:
      allOf:
      - $ref: '#/components/schemas/address_editable_intl'
      - type: object
        required:
        - address_line1
        - address_country
      - type: object
        oneOf:
        - required:
          - address_city
          - address_state
        - required:
          - address_zip
    psc_front:
      description: 'The artwork to use as the front of your postcard.


        Notes:

        - HTML merge variables should not include delimiting whitespace.

        - PDF, PNG, and JPGs must be sized at 4.25"x6.25", 6.25"x9.25", or 6.25"x11.25" at 300 DPI, while supplied HTML will be rendered to the specified `size`.


        See [here](#section/HTML-Examples) for HTML examples.

        '
      oneOf:
      - $ref: '#/components/schemas/html_string'
      - $ref: '#/components/schemas/tmpl_id'
      - $ref: '#/components/schemas/remote_file_url'
      - $ref: '#/components/schemas/local_file_path'
    inline_address:
      oneOf:
      - $ref: '#/components/schemas/inline_address_us'
      - $ref: '#/components/schemas/inline_address_intl'
    thumbnail:
      type: object
      properties:
        small:
          $ref: '#/components/schemas/signed_link'
        medium:
          $ref: '#/components/schemas/signed_link'
        large:
          $ref: '#/components/schemas/signed_link'
    html_string:
      type: string
      description: An HTML string of under 10,000 characters.
      maxLength: 10000
      pattern: <
    resource_proof:
      allOf:
      - $ref: '#/components/schemas/resource_proof_base'
      - type: object
        required:
        - id
        - resource_type
        - status
        - thumbnails
        - errors
        - date_created
        - date_modified
        - object
        properties:
          id:
            $ref: '#/components/schemas/res_prf_id'
          date_created:
            $ref: '#/components/schemas/date_created'
          date_modified:
            $ref: '#/components/schemas/date_modified'
          object:
            type: string
            description: Value is resource type.
            default: resource_proof
    address_editable_intl:
      allOf:
      - $ref: '#/components/schemas/address_fields_intl'
      - type: object
        anyOf:
        - title: address obj with `name` defined
          required:
          - name
        - title: address obj with `company` defined
          required:
          - company
        properties:
          description:
            $ref: '#/components/schemas/resource_description'
          name:
            type: string
            description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address.

              '
            maxLength: 40
            nullable: true
          company:
            $ref: '#/components/schemas/company'
          phone:
            type: string
            description: Must be no longer than 40 characters.
            maxLength: 40
            nullable: true
          email:
            type: string
            description: Must be no longer than 100 characters.
            maxLength: 100
            nullable: true
          address_country:
            $ref: '#/components/schemas/country_extended'
          metadata:
            $ref: '#/components/schemas/metadata'
    postcard_resource_parameters:
      allOf:
      - $ref: '#/components/schemas/input_to'
      - $ref: '#/components/schemas/input_from_us'
      - type: object
        required:
        - to
        - front
        - back
        properties:
          size:
            $ref: '#/components/schemas/postcard_size'
          merge_variables:
            $ref: '#/components/schemas/merge_variables'
          front:
            $ref: '#/components/schemas/psc_front'
          back:
            $ref: '#/components/schemas/psc_back'
    signed_link:
      type: string
      description: A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated.
      pattern: ^https://lob-assets.com/(letters|postcards|bank-accounts|checks|self-mailers|cards|order-creatives)/([a-z]{3,4}_[a-z0-9]{15,16}|[a-z]{3}_[a-z0-9]{26}_[a-z]{4}_[a-z0-9]{26})('|_signature)(.pdf|_thumb_[a-z]+_[0-9]+.png|.png)?(version=[a-z0-9]*&)expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+
    psc_back:
      description: "The artwork to use as the back of your postcard.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 4.25\"x6.25\", 6.25\"x9.25\", or 6.25\"x11.25\" at 300 DPI, while supplied HTML will be rendered to the specified `size`.\n- Be sure to leave room for address and postage information by following the templates provided here:\n  - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/4x6_postcard.pdf\" target=\"_blank\">4x6 template</a>\n  - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x9_postcard.pdf\" target=\"_blank\">6x9 template</a>\n  - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x11_postcard.pdf\" target=\"_blank\">6x11 template</a>\n\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
      oneOf:
      - $ref: '#/components/schemas/html_string'
      - $ref: '#/components/schemas/tmpl_id'
      - $ref: '#/components/schemas/remote_file_url'
      - $ref: '#/components/schemas/local_file_path'
    input_from:
      type: object
      properties:
        from:
          description: Must either be an address ID or an inline object with correct address parameters. Must be a US address unless using a `custom_envelope`. All addresses will be standardized into uppercase without being modified by verification.
          oneOf:
          - $ref: '#/components/schemas/adr_id'
          - $ref: '#/components/schemas/inline_address'
    metadata:
      type: object
      additionalProperties:
        type: string
      description: 'Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `"` and `\`. i.e. ''{"customer_id" : "NEWYORK2015"}'' Nested objects are not supported.  See [Metadata](#section/Metadata) for more information.'
      maxLength: 500
      pattern: '[^"\\]{0,500}'
    local_file_path:
      type: string
      description: The path to a local file.
      pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$
    input_from_us:
      type: object
      properties:
        from:
          description: '*Required* if `to` address is international. Must either be an address ID or an inline object with correct address parameters. Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification.'
          oneOf:
          - $ref: '#/components/schemas/adr_id'
          - $ref: '#/components/schemas/inline_address_us'
    resource_proof_updatable:
      type: object
      properties:
        template_id:
          type: string
          nullable: true
          description: The template ID to associate with the resource proof.
    ltr_size:
      type: string
      enum:
      - us_letter
      - us_legal
      description: 'Specifies the size of the letter. It accepts two values `us_letter` and `us_legal`. If the [Lob-Version header](#tag/Versioning-and-Changelog) in the request is set to `2024-01-01` and above, the `size` property is automatically included with the default value of `us_letter`, unless explicitly specified.


        Please note that attempting to include the `size` property in the request with the `Lob-Version` header predating to `2024-01-01` will result in an error.

        '
      default: us_letter
    error:
      type: object
      description: Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - message
          - status_code
          - code
          properties:
            message:
              type: string
              description: A human-readable message with more details about the error
              example: Rate limit exceeded. Please wait 5 seconds and try your request again.
            status_code:
              $ref: '#/components/schemas/failure_status_code'
            code:
              type: string
              enum:
              - bad_request
              - conflict
              - feature_limit_reached
              - internal_server_error
              - invalid
              - not_deletable
              - not_found
              - request_timeout
              - service_unavailable
              - unrecognized_endpoint
              - unsupported_lob_version
              - address_length_exceeds_limit
              - bank_account_already_verified
              - bank_error
              - billing_address_required
              - custom_envelope_inventory_depleted
              - deleted_bank_account
              - failed_deliverability_strictness
              - file_pages_below_min
              - file_pages_exceed_max
              - file_size_exceeds_limit
              - foreign_return_address
              - inconsistent_page_dimensions
              - invalid_bank_account
              - invalid_bank_account_verification
              - invalid_check_international
              - invalid_country_covid
              - invalid_file
              - invalid_file_dimensions
              - invalid_file_download_time
              - invalid_file_url
              - invalid_image_dpi
              - invalid_international_feature
              - invalid_perforation_return_envelope
              - invalid_template_html
              - mail_use_type_can_not_be_null
              - merge_variable_required
              - merge_variable_whitespace
              - payment_method_unverified
              - pdf_encrypted
              - special_characters_restricted
              - unembedded_fonts
              - email_required
              - invalid_api_key
              - publishable_key_not_allowed
              - rate_limit_exceeded
              - unauthorized
              - unauthorized_token
              description: 'A pre-defined string identifying an error. Error codes fall into three categories:


                **GENERIC**

                * `bad_request` - 422: an invalid request was made. See error message for details.

                * `conflict` - 409/422: this operation would leave data in a conflicted state.

                * `feature_limit_reached` - 403: the account has reached its resource limit and requires upgrading to add more.

                * `internal_server_error` - 500: an error has occured on Lob''s servers. Please try request again.

                * `invalid` - 422: an invalid request was made. See error message for details.

                * `not_deletable` - 422: an attempt was made to delete a resource, but the resource cannot be deleted.

                * `not_found` - 404: the requested resource was not found.

                * `request_timeout` - 408: the request took too long. Please try again.

                * `service_unavailable` - 503: the Lob servers are temporarily unavailable. Please try agian.

                * `unrecognized_endpoint` - 404: the requested endpoint doesn''t exist.

                * `unsupported_lob_version` - 422: an unsupported Lob API version was requested.


                **ADVANCED**

                * `address_length_exceeds_limit` - 422: the sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.

                * `bank_account_already_verified` - 422: the bank account has already been verified.

                * `bank_error` - 422: there''s an issue with the bank account.

                * `billing_address_required` - 403: in order to create a live mail piece, your account needs to set up a billing address.

                * `custom_envelope_inventory_depleted` - 422: custom envelope inventory is depleted, and more will need to be ordered.

                * `deleted_bank_account` - 404: checks cannot be created with a deleted bank account.

                * `failed_deliverability_strictness` - 422: the `to` address doesn''t meet strictness requirements. See <a href="https://dashboard.lob.com/#/settings/account" target="_blank">Account Settings</a> to configure strictness.

                * `file_pages_below_min` - 422: not enough pages.

                * `file_pages_exceed_max` - 422: too many pages.

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lobcom/refs/heads/main/openapi/lobcom-resource-proofs-api-openapi.yml