allOf: - $ref: "../../../shared/models/form_factor/input_to.yml" - $ref: "../../../shared/models/form_factor/input_from.yml" - type: object required: - to - from - file properties: file: description: >- Notes: - HTML merge variables should not include delimiting whitespace. - All pages of a supplied PDF file must be sized at 8.5"x11", while supplied HTML will be rendered and trimmed to as many 8.5"x11" pages as necessary. - For design specifications, please see our [PDF](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_template.pdf) and [HTML](#section/HTML-Examples) templates. - If a `custom_envelope` is used, follow [this template](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_custom_envelope.pdf). - For domestic destinations, the file limit is 60 pages single-sided or 120 pages double-sided. For international destinations, the file limit is 6 pages single-sided or 12 pages double-sided. PDFs that surpass the file limit will error, while HTML that renders more pages than the file limit will be trimmed. - Any letters over 6 pages single-sided or 12 pages double-sided will be placed in a [flat envelope](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_flat_template.pdf) instead of the standard double window envelope. See [pricing](https://lob.com/pricing/print-mail#compare) for extra costs incurred. oneOf: - $ref: "../../../shared/attributes/html_string.yml" - $ref: "../../../shared/attributes/model_ids/tmpl_id.yml" - $ref: "../../../shared/attributes/remote_file_url.yml" - type: string pattern: "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$" extra_service: type: string enum: - certified - certified_return_receipt - registered - null description: | Add an extra service to your letter. See [pricing](https://www.lob.com/pricing/print-mail#compare) for extra costs incurred. * `certified` - track and confirm delivery for domestic destinations. An extra sheet (1 PDF page single-sided or 2 PDF pages double-sided) is added to the beginning of your letter for address and barcode information. See here for templates: [#10 envelope](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_template.pdf) and [flat envelope](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_flat_template.pdf) (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet. * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter * `registered` - provides tracking and confirmation for international addresses nullable: true cards: description: A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. type: array items: $ref: "../../../shared/attributes/model_ids/card_id.yml" minItems: 0 maxItems: 1 nullable: true mail_type: $ref: "../../../shared/attributes/mail_type.yml" 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. 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 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. This feature is exclusive to certain customers. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. * `top_first_page` - (default) print address information at the top of your provided first page * `insert_blank_page` - insert a blank address page at the beginning of your file (you will be charged for the extra page) * `bottom_first_page_center` - **(deprecation planned within a few months)** print address information at the bottom center of your provided first page * `bottom_first_page` - print address information at the bottom of your provided first page default: top_first_page return_envelope: oneOf: - type: string - type: boolean description: >- Indicates if a return envelope is requested for the letter. The value corresponding to this field is by default a boolean. But if the account is signed up for custom return envelopes, the value is of type string and is `no_9_single_window` for a standard return envelope and a custom `return_envelope_id` for non-standard return envelopes. To include a return envelope with your letter, set to `true` and specify the `perforated_page`. See [pricing](https://www.lob.com/pricing/print-mail#compare) for extra costs incurred. default: false perforated_page: type: integer description: >- Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our [perforation guide](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf). nullable: true custom_envelope: type: object description: >- A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. Accepts an envelope ID for any customized envelope with available inventory. If no inventory is available for the specified ID, the letter will not be sent, and an error will be returned. If the letter has more than 6 sheets, it will be sent in a blank flat envelope. Custom envelopes may be created and ordered from the dashboard. This feature is exclusive to certain customers. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. required: - id - url - object properties: id: type: string description: The unique identifier of the custom envelope used. maxLength: 40 url: type: string description: The url of the envelope asset used. object: allOf: - $ref: "../../../shared/attributes/object.yml" - type: string enum: - envelope default: envelope nullable: true billing_group_id: $ref: "../../../shared/attributes/billing_group_id.yml"