Premier Letters Validate API
The Validate API from Premier Letters — 1 operation(s) for validate.
The Validate API from Premier Letters — 1 operation(s) for validate.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/premierletters-com:premierletters-com-validate-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Premierletters Com Validate API
version: 1.0.0
contact:
url: https://www.premierletters.com/developers
description: 'Operations tagged Validate across 2 of this provider''s published API definitions: premierletters-com.json, premierletters-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://www.premierletters.com
security:
- bearerAuth: []
tags:
- name: Validate
paths:
/api/v1/validate:
post:
summary: Dry-run validation + pricing for an order
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OrderCreate'
responses:
'200':
description: Order is valid; includes total_cents and a full PricingBreakdown
content:
application/json:
schema:
type: object
properties:
valid:
type: boolean
total_cents:
type: integer
breakdown:
$ref: '#/components/schemas/PricingBreakdown'
'400':
description: no_return_address_unacknowledged and other request errors
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: One or more recipients/fields failed validation
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Validate
operationId: postApiV1Validate
x-operation-id-source: derived
servers:
- url: https://www.premierletters.com
components:
schemas:
ReturnAddress:
type: object
description: 'Return address written on the envelope. Omit to use the account default (Settings). Required for an envelope order unless the account has a default or no_return_address_ack is true. An explicit no_return_address_ack: true always wins; otherwise a supplied return_address, else the account default. name, address_line1, city, state and zip are required unless return_address_partial_ok is true (then at least one of name, company, address_line1, city, state, zip, printed as written).'
properties:
name:
type: string
maxLength: 100
company:
type: string
maxLength: 100
address_line1:
type: string
maxLength: 255
address_line2:
type: string
maxLength: 255
city:
type: string
maxLength: 100
state:
type: string
description: Two-letter US state code
zip:
type: string
description: 5-digit ZIP or ZIP+4
PricingBreakdown:
type: object
properties:
basePrice:
type: integer
description: Cents
paperSurchargeCents:
type: integer
printedPageSurchargeCents:
type: integer
printedEnvelopeSurchargeCents:
type: integer
signatureSurchargeCents:
type: integer
meterSurchargeCents:
type: integer
postageCents:
type: integer
description: Postage passed through at face value; 0 when the customer stamps it themselves
pieceCentsPerLetter:
type: integer
description: Pen work per piece, excluding postage
totalCents:
type: integer
perLetterCents:
type: integer
pieceCount:
type: integer
OrderOptions:
type: object
properties:
handwriting_style:
type: string
description: Font UUID from GET /api/v1/styles
paper_type:
type: string
enum:
- standard
- premium
product_type:
type: string
description: e.g. letter, card, postcard
authenticity_preset:
type: string
mailing_option:
type: string
enum:
- we_mail
- you_mail_stamped
- you_mail_no_stamp
description: Delivery option. Omit to use the account's default mailing option (else we_mail).
include_letter:
type: boolean
include_envelope:
type: boolean
copies:
type: integer
minimum: 1
maximum: 500
description: Values above 1 only for ship-to-you mailing options
output_mode:
type: string
enum:
- handwritten
- facsimile
- printed_bw
- printed_color
default: handwritten
description: 'How the letter body is produced: pen-written (default); facsimile = the handwriting layout printed on a laser printer; or typed text printed in black & white / color.'
envelope_output_mode:
type:
- string
- 'null'
enum:
- facsimile
- printed_bw
- printed_color
- null
default: null
description: 'How the envelope is produced: null (default) = hand-addressed; facsimile = handwritten addressing printed; or typed and printed. Independent of output_mode.'
Error:
type: object
properties:
error:
type: string
description: Stable machine-readable code, e.g. validation_failed, insufficient_balance, test_mode
message:
type: string
suggestion:
type: string
description: What to do next
details: {}
required:
- error
- message
OrderCreate:
type: object
required:
- message
properties:
message:
type: string
description: Letter body. Supports {{first_name}}/{{last_name}}/{{greeting}} merge fields.
recipients:
type: array
items:
$ref: '#/components/schemas/Recipient'
options:
$ref: '#/components/schemas/OrderOptions'
card_orientation:
type: string
enum:
- portrait
- landscape
default: portrait
description: Folded-card products only (ignored for letter/postcard). portrait = horizontal fold (card taller than wide); landscape = vertical fold (wider than tall).
card_write_mode:
type: string
enum:
- standard
- full
- reverse
default: standard
description: Folded-card products only. standard writes the primary half (bottom for a horizontal fold, right for a vertical fold); reverse writes the other half; full writes across the whole surface and adds a $0.50/recipient surcharge.
page_background:
type: object
description: 'Preview-only positioning aid for pre-printed stock: a PDF or image of the letterhead already on the paper, composited under the handwriting in previews. NEVER printed or pen-written — preview_only is forced true server-side. storage_path must already exist in storage; most API callers can omit this.'
properties:
storage_path:
type: string
source_type:
type: string
enum:
- pdf
- image
opacity:
type: number
minimum: 0
maximum: 1
default: 0.5
payment:
type: object
properties:
method:
type: string
enum:
- card_on_file
- checkout_session
- balance
default: checkout_session
description: balance pays from the prepaid balance; 402 insufficient_balance when short.
return_url:
type: string
format: uri
skip_invalid:
type: boolean
return_address:
$ref: '#/components/schemas/ReturnAddress'
return_address_partial_ok:
type: boolean
default: false
description: 'Send return_address exactly as written although it is incomplete: at least one of name, company, address_line1, city, state, zip. Only the filled lines print (a name alone is fine). Without it an incomplete return_address is refused.'
no_return_address_ack:
type: boolean
description: 'Send with no return address at all; undeliverable mail is then destroyed. An explicit no_return_address_ack: true always wins; otherwise a supplied return_address, else the account default. An envelope order with none of the three is a 400 no_return_address_unacknowledged.'
idempotency_key:
type: string
minLength: 1
maxLength: 255
description: 'Client-supplied key, 1-255 characters. A repeat with the same key and the same body returns the original order (200, idempotent_replay: true) instead of creating a second one. The same key with a different body is a 422 idempotency_key_reused; a repeat while the first request is still running is a 409 idempotency_in_progress. Also accepted as the Idempotency-Key header; the body wins.'
extras:
type: array
maxItems: 20
description: Extra pieces for each envelope (printed insert, printed letter, your own insert, flyer, postcard, business card). GET /api/v1/catalog lists pieces, options and prices. "instant" pieces are charged with the order as their own lines; "request" pieces cost nothing now and are priced by staff afterwards. Unacceptable lines are a 422 invalid_extras.
items:
type: object
required:
- piece
properties:
piece:
type: string
description: Catalog piece key, or sku:<key> for a piece on the account price sheet.
options:
type: object
additionalProperties:
type: string
quantity:
type: integer
minimum: 1
maximum: 10000
default: 1
scope:
type: string
enum:
- per_recipient
- flat
default: per_recipient
artwork_url:
type: string
format: uri
description: https URL of print-ready artwork; required for instant printed pieces.
note:
type: string
maxLength: 1000
role:
type: string
enum:
- pen_stock
description: 'Put the message on this printed piece (printed letter, letter flyer, 4x6 postcard): written by the pen, or printed for printed output modes. Needs a matching product_type; one per recipient.'
mailing:
type: object
description: 'A built mailing, instead of combining options and extras by hand. {"tier":"essential"} alone is valid; anything else overrides the tier. It sets product_type, output_mode, envelope_output_mode, include_letter, include_envelope, paper_type and mailing_option, and puts its pieces in front of any extras. Ids: /llms-full.txt "Build a mailing".'
properties:
tier:
type: string
enum:
- luxe
- signature
- essential
- print
description: 'luxe: Letter and envelope written with a real pen; signature: A real pen on the envelope, printed handwriting inside; essential: Printed handwriting, letter and envelope; print: Clean printed type'
envelope:
type: string
enum:
- pen
- printed_handwriting
- printed_text
- none
envelopeStock:
type: string
enum:
- standard
- premium_white
- premium_cream
main:
type: object
properties:
format:
type: string
enum:
- letter
- card
- postcard
- flyer
- envelope
style:
type: string
enum:
- printed_text
- printed_handwriting
- pen
size:
type: string
description: Product slug for the format (letter; card, card_5x7, a7; postcard).
paper:
type: string
enum:
- standard
- premium_white
- premium
design:
type: string
enum:
- plain_white
- plain_cream
- thank_you
- happy_birthday
- congratulations
- welcome_home
- seasons_greetings
- thinking_of_you
- custom
description: Cards only. custom is quoted, never charged at checkout.
front:
type: string
enum:
- plain
- artwork
description: Postcards only.
contents:
type: array
maxItems: 8
items:
type: object
required:
- item
properties:
item:
type: string
enum:
- flyer_glossy
- half_glossy
- page_bw
- page_color
- extra_letter
- extra_card
- coupon
- business_card
- gift_card
- magnet
- photo_print
- reply_kit
- brochure
- own_insert
qty:
type: integer
minimum: 1
maximum: 5
default: 1
options:
type: object
additionalProperties:
type: string
note:
type: string
maxLength: 1000
addons:
type: array
items:
type: object
required:
- id
properties:
id:
type: string
enum:
- qr_static
- qr_unique
- wax_seal
- foil_seal
- tracking
options:
type: object
additionalProperties:
type: string
delivery:
type: string
enum:
- we_mail
- you_mail_stamped
- you_mail_no_stamp
customRequest:
type: string
maxLength: 2000
description: 'Anything off the menu: quoted before anything is charged, not guaranteed.'
Recipient:
type: object
properties:
first_name:
type: string
last_name:
type: string
address_line1:
type: string
address_line2:
type: string
city:
type: string
state:
type: string
description: Two-letter US state code
zip:
type: string
custom_fields:
type: object
additionalProperties:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: pl_live_... | pl_test_...
description: 'API key from Settings → API keys, or from the agent connect flow. Sent as `Authorization: Bearer pl_live_...`. Live keys (pl_live_) create and charge real orders. Test keys (pl_test_) run the same validation, pricing and return-address checks but never create, charge or send anything: POST /api/v1/orders answers `{ test: true }`, order lists are empty, and balance top-ups, new-card charges and Growth record writes answer 400 test_mode. Webhook endpoints can be managed with either key.'
x-refined-from:
- premierletters-com.json
- premierletters-com-openapi.json