Passport Photo Print & Mailing API

Print passport photos and mail them to your customers. Enabled per account — contact us to try it.

Want to try the Print & Mailing API? Printing is enabled per account. Contact support@idphoto.ai with your print sizes and expected volume, and we will set up a trial.

The Print & Mailing API prints passport photos and mails them to your customers at US addresses. You send a photo and a mailing address. We print the photos on 4×6 inch photo paper, cut them, and mail them with USPS in a rigid mailer. You get the tracking number through the API or a webhook. Printing is enabled per account: to try it, contact support@idphoto.ai with your print sizes and expected volume. Endpoints and fields are in the Print & Mail API documentation.

What the Print & Mailing API does

Passport photos laid out on a 4×6 inch sheet for printing
We print your photos on 4×6 inch photo paper and mail them to your customer with USPS.

How it works

  1. Prepare the photo with the Passport Photo API and check it with Photo Compliance Check, or use your own finished photo.
  2. Create a print order with the photo, the number of pairs, the shipping method and the recipient's US mailing address. The order is paid from your print balance.
  3. We check the photo's format and resolution, then print and cut the photos and pack them in a rigid mailer with a packing slip.
  4. We mail them with USPS. You get the status and tracking number by webhook or by querying the order, and pass them on to your customer.

Create a print order

curl -sS -X POST "https://saas-api.idphotoapp.com/api/print/create-order" \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "apiSecret": "YOUR_API_SECRET",
    "idempotencyKey": "order-10023",
    "externalOrderId": "10023",
    "photoUuid": "example-photo-uuid",
    "photoPairs": 1,
    "shippingMethod": "USPS_GROUND_ADVANTAGE",
    "recipient": {
      "name": "Jane Doe",
      "address1": "123 Main St",
      "city": "San Jose",
      "state": "CA",
      "zip": "95112",
      "country": "US"
    }
  }'

The response returns the orderId, the status PENDING, the printed size and the number of sheets. Sending the same idempotencyKey again returns the same order and never charges twice, so a retry after a timeout is safe. To print your own photo instead, send photoImage (Base64) and printSize, for example {"width": 35, "height": 45, "unit": "mm"}.

Shipping options

shippingMethodTracking number
USPS_FIRST_CLASSNo
USPS_GROUND_ADVANTAGEYes
USPS_PRIORITYYes

Print sizes

We print at 300 DPI with a white border, each photo at its exact printed size. Your photo needs at least 200 DPI at that size.

Photo sizePhotos per 4×6 inch sheet
2×2 in (US passport and visa)2
35×45 mm (Schengen, UK and many others)6
33×48 mm (China visa)4
50×70 mm2

Order status and webhooks

Every order moves through PENDING → IN_PRODUCTION → SHIPPED → DELIVERED. We send a signed webhook to your HTTPS address at each step after PENDING, so you can update your customer without polling.

You can also look up one order by our orderId or your own externalOrderId, or list your orders by creation time or status.

Test with sandbox orders

Set "isSandbox": true on an order to test your integration. A sandbox order goes through the same checks as a real one, but it is never charged, printed or mailed. It moves to the next status about once a minute, so you receive the full set of webhooks within a few minutes. You can pick the path: delivered, failed, returned, or First-Class with no tracking number.

Who uses it

Printing is enabled per account. To try it, contact support@idphoto.ai with your print sizes and expected volume, and we will set up a trial.

Only need a file to print yourself?

If your customers print at home or in your studio, the Passport Photo API can also return a printable sheet of repeated photos: add photoSheet to POST /v2/makeIdPhoto. For a UK passport applied for online, no print is needed at all: use a UK passport photo code instead.

FAQ

Can I mail a passport photo through the API?

Yes. Create a print order with the photo and a US mailing address. We print the photos and mail them with USPS, and you track the order by status and webhook. Printing is enabled per account — to try it, contact support@idphoto.ai.

Can I send my own photo instead of a photoUuid?

Yes. Send a finished JPEG or PNG of up to 5 MB as photoImage, with its printed size in printSize. It must be at least 200 DPI at that size.

Do you check whether the photo meets passport rules?

No. We check the format, size and resolution only. Check the photo with Photo Compliance Check before you order a print.

Where can you mail to?

US addresses only, including APO/FPO.

How does my customer track the package?

With Ground Advantage or Priority Mail, the order gets a USPS tracking number and link when it ships. You receive them by webhook and can pass them on, or we can email the recipient a shipping notice. First-Class mail has no tracking number.

Can I cancel an order?

Yes, while it is still PENDING. The full amount goes back to your balance. Once printing starts, the order cannot be canceled.

How do I test without printing anything?

Create orders with "isSandbox": true. They pass the same checks and send the same webhooks, but are never charged, printed or mailed.

Streamline Your Photo Fulfillment

Printing is enabled per account. Contact us to try the Print & Mailing API.