Welcome to intelligent mail.

Lob's Print & Mail APIs deliver robust automation and scale for anything with a stamp.

We gave mail an upgrade.

Now you can program and control physical mail just like e-mail, from automatic triggers to lightning-fast delivery and everything in between. The result? A more timely, relevant, and personal customer experience that's fully automated and trackable. If it's mail, Lob does it better.

Automatic
triggers.

Achieve scale for complex, labor-intensive, expensive processes that no one likes doing. Just set it and forget it.

Print Delivery
Network.

Lob automatically routes print requests through our vast network of vetted printers, so mail gets to its destination faster than ever.

Dynamic control,
for every detail.

Forget rigid templates—our personalization makes your data truly variable, so you can iterate quickly, easily make changes, and do multivariate testing.

Powerful dashboard
and analytics.

Aggregate and piece-by-piece delivery tracking, complete mail history, and comprehensive logging—it's all right there.


Send the following through Lob:

Trigger custom postcards at scale.

From validating a customer's physical address to running lifecycle marketing campaigns, use Lob's Postcards API to trigger delivery of highly personalized and incredible-looking postcards to your customers.

Recurring, Event-Driven Postcards

Send customized postcards based on specific actions your customers take or events you define. Reactivate lapsed users with personalized postcards or verify your customers' physical addresses for identity purposes. Lob triggers each piece of mail on demand, no batching required.

Control with Flexible Templating

With full control over every element in HTML, you can easily A/B test layout, messaging, and more to optimize your postcard campaigns. No need to send in proofs or wait for approvals—the Lob Postcards API does it all.

Track Everything Along the Way

Monitor your postcards as they make their way to their intended recipients, at no additional cost. Keep an eye on your delivery stats and add any additional campaign tracking you'd like, from promo codes to unique URLs and phone numbers.


Easy integration via REST API.

Include your postcard HTML along with a shipping address in one simple API call. Integration is dead simple with pre-built libraries and code examples in Node.js, Ruby, Python, PHP, and Java.

Read Docs View Libraries
  • curl

  • Node

  • Ruby

  • Python

  • PHP

  • Java

  • 
    curl https://api.lob.com/v1/postcards \
      -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
      -d "description=Demo Postcard job" \
      -d "to[name]=Harry Zhang" \
      -d "to[address_line1]=123 Test Street" \
      -d "to[address_city]=Mountain View" \
      -d "to[address_state]=CA" \
      -d "to[address_zip]=94041" \
      -d "to[address_country]=US" \
      --data-urlencode "front=<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>" \
      --data-urlencode "back=<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>" \
      -d "merge_variables[name]=Harry"
    
              
    
    Lob.postcards.create({
      description: 'Demo Postcard job',
      to: {
        name: 'Harry Zhang',
        address_line1: '123 Main Street',
        address_city: 'Mountain View',
        address_state: 'CA',
        address_zip: '94041'
      },
      front: '<html style="padding: 1in; font-size: 50;">Front HTML for {{name}}</html>',
      back: '<html style="padding: 1in; font-size: 20;">Back HTML for {{name}}</html>',
      merge_variables: {
        name: 'Harry'
      }
    }, function (err, res) {
      console.log(err, res);
    });
    
              
    
    @lob.postcards.create(
      description: "Demo Postcard job",
      to: {
        name: "Harry Zhang",
        address_line1: "123 Test Street",
        address_city: "Mountain View",
        address_state: "CA",
        address_country: "US",
        address_zip: 94041
      },
      front: "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>",
      back: "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>",
      merge_variables: {
        name: "Harry"
      }
    )
    
              
    
    lob.Postcard.create(
      to_address = {
        'name': 'Harry Zhang',
        'address_line1': '123 Test Street',
        'address_city': 'Mountain View',
        'address_state': 'CA',
        'address_zip': '94041',
        'address_country': 'US'
      },
      front = '<html style="padding: 1in; font-size: 50;">Front HTML for {{name}}</html>',
      back = '<html style="padding: 1in; font-size: 20;">Back HTML for {{name}}</html>',
      merge_variables = {
        'name': 'Harry'
      }
    )
    
              
    
    $lob->postcards()->create(array(
      'description' => 'Demo Postcard job',
      'to'      => array(
        'name'          => 'Harry Zhang',
        'address_line1' => '123 Main Street',
        'address_city'  => 'Mountain View',
        'address_state' => 'CA',
        'address_zip'   => '94041',
      ),
      'front'                 => '<html style="padding: 1in; font-size: 50;">Front HTML for {{name}}</html>',
      'back'                  => '<html style="padding: 1in; font-size: 20;">Back HTML for {{name}}</html>',
      'merge_variables[name]' => 'Harry'
    ));
    
              
    
    final Map<String, String> mergeVariables = Maps.newHashMap();
    mergeVariables.put("name", "Harry");
    
    final PostcardRequest postcardRequest = PostcardRequest.builder()
      .to(AddressRequest.builder()
        .name("Harry Zhang")
        .line1("123 Test Street")
        .city("Mountain View")
        .state("CA")
        .zip("94041")
        .country("US")
        .build())
      .front("<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>")
      .back("<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>")
      .mergeVariables(mergeVariables)
      .build();
    final PostcardResponse postcard = client.createPostcard(postcardRequest).get();
    
              

    Smarter mail starts with Lob.

    It's dead-simple to get up and running, and our experts are here to help at every step.

    Try It Now Talk to Sales