openapi-client-generator 0.1.9

Generates a client library based on an OpenAPI spec.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
openapi: 3.0.3

info:
  title: Lob
  version: "1.5.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>
    Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
  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

tags:
  - name: Addresses
    description: |
      To add an address to your address book, you create a new address object. You can retrieve and delete individual
      addresses as well as get a list of addresses. Addresses are identified by a unique random ID.

  - name: Authentication
    x-traitTag: true
    description: |
      Requests made to the API are protected with [HTTP Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
      In order to properly authenticate with the API you must use your API key as the username
      while leaving the password blank. Requests not properly authenticated will return a `401`
      [error code](#tag/Errors). You can find your account's API keys
      in your [Dashboard Settings](https://dashboard.lob.com/#/settings/keys).
      ### Example Request
      curl uses the -u flag to pass basic auth credentials (adding a colon after your API key will prevent it from asking you for a
      password). One of our test API keys has been filled into all the examples on the page, so you can test out any example right away.
      ```bash
      curl https://api.lob.com/v1/addresses \
        -u test_0dc8dXXXXXXXXXXXXXXXXXXXXXX5b0cc:
      ```
      ## API Keys
        Lob authenticates your API requests using your account's API keys.
        If you do not include your key when making an API request, or use
        one that is incorrect or outdated, Lob returns an error with a `401`
        HTTP response code. You can find all API keys in your dashboard
        under [Settings](https://dashboard.lob.com/#/settings/keys).
        There are two types of API keys: *secret* and *publishable*.
        - **Secret API keys** should be kept confidential and only stored on your own servers.
        Your account's secret API key can perform any API request to Lob without restriction.
        - **Publishable API keys** are limited to US verifications, international verifications,
        and US autocomplete requests. While we encourage you to use a secret key for maximum
        security, you can publish these keys to JavaScript code or in an Android or iPhone app
        without exposing print and mail services or your secret key. Publishable keys are always
        prefixed with `[environment]_pub`.
        Every type comes with a pair of keys: one for the testing environment and one for the
        live environment. We recommend reading [Test and Live Environments](#tag/Test-and-Live-Environments)
        for more information.

  - name: Bank Accounts
    description: |
      Bank Accounts allow you to store your bank account securely in our system. The API provides
      endpoints for creating bank accounts, deleting bank accounts, verifying bank accounts,
      retrieving individual bank accounts, and retrieving a list of bank accounts.

  - name: Beta Program
    x-traitTag: true
    description: |
      At Lob, we pride ourselves on building high quality platform capabilities rapidly
      and iteratively, so we can constantly be delivering additional value to our customers.
      When evaluating a new product or feature from Lob, you may see that it has been released in Beta.

      Typically, something in Beta means that the feature is early in its lifecycle here at
      Lob. While we fully stand behind the quality of everything we release in Beta, we do
      anticipate receiving a higher level of customer feedback on Beta features, as well as a
      faster pace of changes from our engineering team in response to that feedback.

      By participating in a Lob Beta program, you will have the opportunity to get early access
      to a new product capability, as well as having a unique opportunity to influence the product's
      direction with your feedback.

      You should also anticipate that features in Beta may have functional or design limitations,
      and might change rapidly as we receive customer feedback and make improvements. In particular,
      new APIs in Beta may also go through more frequent versioning and version deprecation cycles
      than our more mature APIs.

      If you are participating in a Beta program and want to provide feedback, please feel free to
      [contact us](https://lob.com/support#contact)!

  - name: Billing Groups
    description: |
      The Billing Groups API allows you to create and view labels that can be attached to certain consumption-based
      usages of Letters, Checks, Postcards and Self-Mailers to customize your bill. Please check each
      resource API section to learn more about how to access the Billing Groups API.

  - name: Bulk Intl Verifications
    description: Verify a list of non-US addresses.

  - name: Bulk US Verifications
    description: Verify a list of US addresses.

  - name: Card Orders
    description: |
      The card orders endpoint allows you to easily create card orders for existing cards.
      The API provides endpoints for creating card orders and listing card orders for a given card.

  - name: Cards
    description: |
      The cards endpoint allows you to easily create cards that can later be affixed to Letters.
      The API provides endpoints for creating cards, retrieving individual cards, creating card orders, and retrieving a list of cards.

  - name: Checks
    description: |
      Checks allow you to send payments via physical checks. The API provides endpoints
      for creating checks, retrieving individual checks, canceling checks, and retrieving a list of checks.

  - name: Errors
    x-traitTag: true
    description: |
      Lob uses RESTful HTTP response codes to indicate success or failure of an API request - read below for more information. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end.

      <table>
        <tr>
          <th style="white-space: nowrap">ATTRIBUTE</th>
          <th style="white-space: nowrap">DESCRIPTION</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>code</code></td>
          <td style="white-space: nowrap">A consistent machine-keyable string identifying the error</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>status_code</code></td>
          <td style="white-space: nowrap">A conventional HTTP status code</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>message</code></td>
          <td style="white-space: nowrap">A human-readable, subject-to-change message with more details about the error</td>
        </tr>
      </table>

      ### HTTP Status Code Summary

      <table>
        <tr>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>200</code></td>
          <td style="white-space: nowrap">SUCCESS</td>
          <td style="white-space: nowrap">Successful API request</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">UNAUTHORIZED</td>
          <td style="white-space: nowrap">Authorization error with your API key or account</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">FORBIDDEN</td>
          <td style="white-space: nowrap">Forbidden error with your API key or account</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">NOT FOUND</td>
          <td style="white-space: nowrap">The requested item does not exist</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BAD REQUEST</td>
          <td style="white-space: nowrap">The query or body parameters did not pass validation</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>429</code></td>
          <td style="white-space: nowrap">TOO MANY REQUESTS</td>
          <td style="white-space: nowrap">Too many requests have been sent with an API key in a given amount of time</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>500</code></td>
          <td style="white-space: nowrap">SERVER ERROR</td>
          <td style="white-space: nowrap">An internal server error occurred, please contact support@lob.com</td>
        </tr>
      </table>

      ### Error Codes - Generic

      <table>
        <tr>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BAD_REQUEST</td>
          <td style="white-space: nowrap">An invalid request was made. See error message for details.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>409/422</code></td>
          <td style="white-space: nowrap">CONFLICT</td>
          <td style="white-space: nowrap">This operation would leave data in a conflicted state.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">FEATURE_LIMIT_REACHED</td>
          <td style="white-space: nowrap">The account has reached its resource limit and requires upgrading to add more.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>500</code></td>
          <td style="white-space: nowrap">INTERNAL_SERVER_ERROR</td>
          <td style="white-space: nowrap">An error has occured on Lob's servers. Please try request again.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID</td>
          <td style="white-space: nowrap">An invalid request was made. See error message for details.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">NOT_DELETABLE</td>
          <td style="white-space: nowrap">An attempt was made to delete a resource, but the resource cannot be deleted.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">NOT_FOUND</td>
          <td style="white-space: nowrap">The requested resource was not found.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>408</code></td>
          <td style="white-space: nowrap">REQUEST_TIMEOUT</td>
          <td style="white-space: nowrap">The request took too long. Please try again.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>503</code></td>
          <td style="white-space: nowrap">SERVICE_UNAVAILABLE</td>
          <td style="white-space: nowrap">The Lob servers are temporarily unavailable. Please try again.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">UNRECOGNIZED_ENDPOINT</td>
          <td style="white-space: nowrap">The requested endpoint doesn't exist.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">UNSUPPORTED_LOB_VERSION</td>
          <td style="white-space: nowrap">An unsupported Lob API version was requested.</td>
        </tr>
      </table>

      ### Error Codes - Authentication

      <table>
        <tr>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">EMAIL_REQUIRED</td>
          <td style="white-space: nowrap">Account must have a verified email address before creating live resources.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">UNAUTHORIZED</td>
          <td style="white-space: nowrap">The request isn't authorized.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">UNAUTHORIZED_TOKEN</td>
          <td style="white-space: nowrap">Token isn't authorized.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401/403</code></td>
          <td style="white-space: nowrap">INVALID_API_KEY</td>
          <td style="white-space: nowrap">The API key is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">PUBLISHABLE_KEY_NOT_ALLOWED</td>
          <td style="white-space: nowrap">The requested operation needs a secret key, not a publishable key. See [API Keys](#tag/API-Keys) for more information.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>429</code></td>
          <td style="white-space: nowrap">RATE_LIMIT_EXCEEDED</td>
          <td style="white-space: nowrap">Requests were sent too quickly and must be slowed down.</td>
        </tr>
      </table>

       ### Error Codes - Advanced

       <table>
        <tr>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">PAYMENT_METHOD_UNVERIFIED</td>
          <td style="white-space: nowrap">You must have a verified bank account or credit card to submit live requests.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">DELETED_BANK_ACCOUNT</td>
          <td style="white-space: nowrap">Checks cannot be created with a deleted bank account.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">ADDRESS_LENGTH_EXCEEDS_LIMIT</td>
          <td style="white-space: nowrap">The sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BANK_ACCOUNT_ALREADY_VERIFIED</td>
          <td style="white-space: nowrap">The bank account has already been verified.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BANK_ERROR</td>
          <td style="white-space: nowrap">There's an issue with the bank account.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">CUSTOM_ENVELOPE_INVENTORY_DEPLETED</td>
          <td style="white-space: nowrap">Custom envelope inventory is depleted, and more will need to be ordered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FAILED_DELIVERABILITY_STRICTNESS</td>
          <td style="white-space: nowrap">The to address doesn't meet strictness requirements. See [Account Settings](https://dashboard.lob.com/#/settings/account) to configure strictness.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FILE_PAGES_BELOW_MIN</td>
          <td style="white-space: nowrap">Not enough pages.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FILE_PAGES_EXCEED_MAX</td>
          <td style="white-space: nowrap">Too many pages.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FILE_SIZE_EXCEEDS_LIMIT</td>
          <td style="white-space: nowrap">The file size is too large. See description for details.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FOREIGN_RETURN_ADDRESS</td>
          <td style="white-space: nowrap">The 'from' address must be a US address.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INCONSISTENT_PAGE_DIMENSIONS</td>
          <td style="white-space: nowrap">All pages of the input file must have the same dimensions.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_BANK_ACCOUNT</td>
          <td style="white-space: nowrap">The provided bank routing number is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_BANK_ACCOUNT_VERIFICATION</td>
          <td style="white-space: nowrap">Verification amounts do not match.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_CHECK_INTERNATIONAL</td>
          <td style="white-space: nowrap">Checks cannot be sent internationally.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_COUNTRY_COVID</td>
          <td style="white-space: nowrap">The postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE</td>
          <td style="white-space: nowrap">The file is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE_DIMENSIONS</td>
          <td style="white-space: nowrap">File dimensions are incorrect for the selected mail type.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE_DOWNLOAD_TIME</td>
          <td style="white-space: nowrap">File download from remote server took too long.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE_URL</td>
          <td style="white-space: nowrap">The file URL when creating a resource is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_IMAGE_DPI</td>
          <td style="white-space: nowrap">DPI must be at least 300.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_INTERNATIONAL_FEATURE</td>
          <td style="white-space: nowrap">The specified product cannot be sent to the destination.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_PERFORATION_RETURN_ENVELOPE</td>
          <td style="white-space: nowrap">Both `return_envelope` and `perforation` must be used together.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_TEMPLATE_HTML</td>
          <td style="white-space: nowrap">The provided HTML is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">MERGE_VARIABLE_REQUIRED</td>
          <td style="white-space: nowrap">A required merge variable is missing.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">MERGE_VARIABLE_WHITESPACE</td>
          <td style="white-space: nowrap">Merge variable names cannot contain whitespace.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">PDF_ENCRYPTED</td>
          <td style="white-space: nowrap">An encrypted PDF was provided.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">SPECIAL_CHARACTERS_RESTRICTED</td>
          <td style="white-space: nowrap">Cannot use special characters for merge variable names.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">UNEMBEDDED_FONTS</td>
          <td style="white-space: nowrap">The provided PDF contains non-standard unembedded fonts. See description for details.</td>
        </tr>
      </table>

  - name: Events
    description: |
      When various notable things happen within the Lob architecture, Events will be created. To get these events sent to your server
      automatically when they occur, you can set up [Webhooks](#tag/Webhooks).

      <h3>Postcards</h3>

      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain <a href='https://dashboard.lob.com/#/settings/editions'>Print & Mail Editions</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
      </table>

      <h3>Self Mailers</h3>

      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain [Print & Mail Editions](https://dashboard.lob.com/#/settings/editions).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
      </table>

      <h3>Letters</h3>

      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain [Print & Mail Editions](https://dashboard.lob.com/#/settings/editions).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain [Print & Mail Editions](https://dashboard.lob.com/#/settings/editions).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.delivered</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Delivered" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.pickup_available</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Pickup Available" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.issue</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "Issue" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A return envelope is created (occurs simultaneously with letter creation).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.returned_to_senders</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
      </table>

      <h3>Checks</h3>

      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain [Print & Mail Editions](https://dashboard.lob.com/#/settings/editions).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
      </table>

      <h3>Addresses</h3>

      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>address.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">An address is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>address.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">An address is successfully deleted.</td>
        </tr>
      </table>

      <h3>Bank Accounts</h3>

      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>bank_account.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A bank account is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>bank_account.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A bank account is successfully deleted.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>bank_account.verified</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A bank account is successfully verified.</td>
        </tr>
      </table>

  - name: Getting Started
    x-traitTag: true
    description: |
      ### 1. Get Setup
      * Create an account at <a href="https://dashboard.lob.com/#/register">Lob.com</a>
      * Obtain your API keys in the Lob dashboard <a href="https://dashboard.lob.com/#/settings/keys">settings</a>
      * You'll use the format, `test_*.` for your Test API key and `live_*.` for your Live API key.

      ### 2. Explore
      * Try out in Postman:
      <div class="postman-run-button"
      data-postman-action="collection/fork"
      data-postman-var-1="16169677-975ecb9f-ea22-4d8f-a4f9-53a42f2aee03"
      data-postman-collection-url="entityId=16169677-975ecb9f-ea22-4d8f-a4f9-53a42f2aee03&entityType=collection&workspaceId=5404d3a5-5a84-4df6-b078-a1547e1a68a7"
      style="background:#0099d7;color: white;display: flex;justify-content: center;align-items: center;">
        Run in Postman
      </div>
      <script type="text/javascript">
        (function (p,o,s,t,m,a,n) {
          !p[s] && (p[s] = function () { (p[t] || (p[t] = [])).push(arguments); });
          !o.getElementById(s+t) && o.getElementsByTagName("head")[0].appendChild((
            (n = o.createElement("script")),
            (n.id = s+t), (n.async = 1), (n.src = m), n
          ));
        }(window, document, "_pm", "PostmanRunObject", "https://run.pstmn.io/button.js"));
      </script>
      * Launch your terminal and copy/paste a CURL command.
      ```bash
      curl https://api.lob.com/v1/addresses \
        -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
      ```
      * Download a [Lob SDK](#tag/SDKs-and-Tools) into your favorite IDE (integrated development environment)

      ### 3. Learn more
      Review our "Getting Started" guides for more details on use cases:
      * [Postcards](https://www.lob.com/guides#getting_started)
      * [Self-Mailers](https://www.lob.com/guides#getting_started_selfmailers)
      * [Letters](https://www.lob.com/guides#getting_started_letters)
      * [Checks](https://www.lob.com/guides#getting_started_checks)
      * [Address Verification Elements](https://www.lob.com/guides#av-elements-quickstart)

  - name: Intl Verifications
    description: |
      Address verification for non-US addresses

      ## Intl Verifications Test Env

      When verifying international addresses, you'll likely want to test against
      a wide array of addresses to ensure you're handling responses correctly.
      With your test API key, requests that use specific values for `primary_line`
      let you explore the responses to many types of addresses:

      <table>
        <tr>
          <th style="white-space: nowrap">DELIVERABILITY OF SAMPLE RESPONSE</th>
          <th style="white-space: nowrap">SET <code>primary_line</code> TO</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap">deliverable</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>deliverable_missing_info</code></td>
          <td style="white-space: nowrap">deliverable missing info</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>undeliverable</code></td>
          <td style="white-space: nowrap">undeliverable</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>no_match</code></td>
          <td style="white-space: nowrap">no match</td>
        </tr>
      </table>

      See the `test` request & response examples under [Intl Verification Examples](#operation/intl_verification) within the
      "Verify an international address section" in Intl Verifications.

      You can rely on the response from these examples generally matching the response
      you'd see in the live environment with an address of that type (excluding the `recipient` field).

      The test API key does not perform any verification, automatic correction, or standardization
      for addresses. If you wish to try these features out, use our [live demo](https://lob.com/address-verification)
      or the free plan (see [our pricing](https://lob.com/pricing/address-verification) for details).

  - name: Introduction
    x-traitTag: true
    description: |
      Lob’s Print & Mail and Address Verification APIs help companies transform outdated,
      manual print-and-mail processes; save 1,000s of hours in processing time by sending mail much more
      quickly; and increase ROI on offline communications.

      Automate direct mail by triggering on-demand postcards, letters, and checks directly from your
      CRM or customer data systems.

      Address Verification corrects, standardizes, and cleanses address data for assured delivery with
      instant verification across 240+ countries and territories.

      Lob's print delivery network eliminates the hassle of vendor management with automated
      production and postage across a global network of vetted commercial printers.

      Tracking & Analytics gives you complete visibility of production and delivery for each piece of
      mail you send to meet compliance requirements and measure campaign performance.

  - name: Letters
    description: |
      The letters endpoint allows you to easily print and mail letters. The API provides endpoints for
      creating letters, retrieving individual letters, canceling letters, and retrieving a list of letters.

  - name: Manage Mail
    x-traitTag: true
    description: |
      ## Cancellation Windows

      By default, all new accounts have a 5 minute cancellation window for postcards,
      self mailers, letters, and checks. Within that timeframe, you can cancel
      mailings from production, free of charge. Once the window has passed for a
      postcard, self mailer, letter, or check, the mailing is no longer cancelable.
      In addition, certain customers can customize their cancellation windows by
      product in their [Dashboard Settings](https://dashboard.lob.com/#). Upgrade to
      the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions)
      to automatically gain access to this ability. For more details on this feature,
      check out our [Cancellation Guide](https://lob.com/guides#cancellation_windows).

      If you schedule a postcard, self mailer, letter, or check for up to 180 days
      in the future by supplying the `send_date` parameter, that will override any
      cancellation window you may have for that product.

      ## Scheduled Mailings

      Postcards, self mailers, letters, and checks can be scheduled to be sent up
      to 180 days in advance. You can use this feature to:
      - Create automated drip campaigns (e.g. send a postcard at 15, 30, and 60
      days)
      - Schedule recurring sends
      - Plan your mailing schedule ahead of time

      Up until the time a mailing is scheduled for, it can also be canceled.
      If you use this feature in conjunction with [a cancellation window](
      index.html#section/Cancellation-Windows), the `send_date` parameter will always
      take precedence.

      For implementation details, see documentation below for each respective
      endpoint. For more help, see our [Scheduled Mailings Guide](https://lob.com/guides#scheduled_mailing).

      This feature is exclusive to certain customers. Upgrade to the appropriate
      [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to
      gain access.

      ### Example Create Request using Send Date

      ```bash
        curl https://api.lob.com/v1/postcards \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -d "description=Demo Future Postcard" \
          -d "to=adr_bae820679f3f536b" \
          -d "from=adr_210a8d4b0b76d77b" \
          -d "front=tmpl_b846a20859ae11a" \
          -d "back=tmpl_01b0d396a10c268" \
          -d "merge_variables[name]=Harry" \
          -d "send_date=2021-07-26"
      ```

  - name: National Change of Address
    x-traitTag: true
    description: |
      National Change of Address (NCOA) is a service offered by the USPS, which allows individuals
      or businesses who have recently moved to have any mail forwarded from their previous address
      to their new address.

      As a CASS-certified Address Verification Provider, Lob also offers NCOA
      functionality to our Print & Mail customers. With the Lob NCOA feature enabled, Postcards,
      Letters, Checks and Addresses can automatically be corrected to reflect an individual's or business's
      new address in the case that they have moved (only if they have registered for NCOA with the USPS).

      Due to privacy concerns and USPS constraints, for customers with NCOA enabled, our API responses
      for a limited set of endpoints differ slightly in the case when an address has been changed through NCOA.

      **NOTE**: This feature is exclusive to certain customers. Upgrade to the appropriate <a href='https://dashboard.lob.com/#/settings/editions'>Print & Mail Editions</a> to gain access.

      For more information, see our [NCOA guide](https://lob.com/guides#national_change).

      ## NCOA Live Environment
      Though there are no changes to API requests, there are significant changes to our API responses, but
      only in the event that an address has been changed through NCOA. If an address has not been changed
      through NCOA, the response would be identical to our standard responses, except the addition of a
      `recipient_moved` field, which is `false` for unchanged addresses.

      If an address has been changed through NCOA, we are required to suppress the following response
      fields for that address:
      - `address_line1`
      - `address_line2`
      - The +4 portion of the ZIP+4 (5-digit ZIP code will still be present)

      See the `ncoa_us_live` example under [Response samples](#operation/address_create) within the "Create an Address" section in Addresses

      ## NCOA Test Environment

      In addition to sending live requests, you may also want to simulate what an NCOA response might
      look like so that you can ensure your application behaves as expected. The behavior of NCOA in
      Lob's Test Environment is very similar to our [US Verifications Test Mode](#section/US-Verifications-Test-Env).

      To simulate an NCOA request, send a POST request to any of the four endpoints below with an `address_line1` field equal to `NCOA`:
      - `POST /v1/addresses`
      - `POST /v1/checks`
      - `POST /v1/letters`
      - `POST /v1/postcards`
      - `POST /v1/self_mailers`

      A static address will always be returned, as documented in the `ncoa_us_test` example under [Response samples](#operation/address_create) within the "Create an Address"
      section in Addresses (along with the corresponding request under "Request samples").

  - name: Postcards
    description: |
      The postcards endpoint allows you to easily print and mail postcards. The API provides endpoints for creating postcards,
      retrieving individual postcards, canceling postcards, and retrieving a list of postcards.

  - name: Rate Limiting
    x-traitTag: true
    description: >-
      To prevent misuse, we enforce a rate limit on an API Key and endpoint basis,
      similar to the way many other APIs enforce rate limits. By default, all accounts
      and their corresponding Test and Live API Keys have a rate limit of 150 requests
      per 5 seconds per endpoint. The `POST /v1/us_verifications` and `POST /v1/us_autocompletions`
      endpoints have a limit of 300 requests per 5 seconds for all accounts.


      When your application exceeds the rate limit for a given API endpoint, the
      Lob API will return an HTTP 429 "Too Many Requests" response code instead of
      the variety of codes you would find across the other API endpoints.


      **HTTP Headers**


      HTTP headers are returned on each request to a rate limited endpoint. Ensure
      that you inspect these headers during your requests as they provide relevant
      data on how many more requests your application is allowed to make for the
      endpoint you just utilized.


      While the headers are documented here in titlecase, HTTP headers are case
      insensitive and certain libraries may transform them to lowercase. Please
      inspect your headers carefully to see how they will be represented in your
      chosen development scenario.

      <table>
        <tbody>
          <tr>
            <td>X-Rate-Limit-Limit:</td>
            <td>the rate limit ceiling for a given request</td>
          </tr>
          <tr>
            <td>X-Rate-Limit-Remaining:</td>
            <td>the number of requests remaining in this window</td>
          </tr>
          <tr>
            <td>X-Rate-Limit-Reset:</td>
            <td>the time at which the rate limit window resets (in <a  href="https://en.wikipedia.org/wiki/Unix_time"  target="_blank">UTC epoch seconds</a>)
          </td>
          </tr>
        </tbody>
      </table>


      ### Example HTTP Headers


      ```bash
        X-Rate-Limit-Limit:150
        X-Rate-Limit-Remaining:100
        X-Rate-Limit-Reset:1528749846
      ```


      ### Example Response


      If you hit the rate limit on a given endpoint, this is the body of the HTTP
      429 message that you will see:


      ```javascript
        {
          "error": {
            "message": "Rate limit exceeded. Please wait 5 seconds and try your request again.",
            "code": "rate_limit_exceeded",
            "status_code": 429
          }
        }
      ```

  - name: Requests and Responses
    x-traitTag: true
    description: |
      ## Asset URLs

      All asset URLs returned by the Lob API (postcards, letters, thumbnails,
      etc) are signed links served over HTTPS. All links returned will expire in
      30 days to prevent mis-sharing. Each time a GET request is initiated, a
      new signed URL will be generated.

      ## Idempotent Requests

      Lob supports idempotency for safely retrying `POST` requests to create
      postcards, self mailers, letters, and checks without accidentally creating
      duplicates.

      For example, if a request to create a check fails due to a network error,
      you can safely retry the same request with the same idempotency key and
      guarantee that only one check will ultimately be created and sent. When a
      request is sent with an idempotency key for an already created resource,
      the response object for the existing resource will be returned.

      To perform an idempotent `POST` request to one of the mailpiece product
      endpoints, provide an additional `Idempotency-Key` header or an `idempotency_key`
      query parameter to the request. If multiple idempotency keys are provided,
      the request will fail. How you create unique keys is up to you, but we
      suggest using random values, such as V4 UUIDs. Idempotency keys are intended
      to prevent issues over a short periods of time, therefore keys expire after
      24 hours. Keys are unique by mode (Test vs. Live) as well as by resource
      (postcard vs. letter, etc.).

      By default, all `GET` and `DELETE` requests are idempotent by nature, so
      they do not require an additional idempotency key.

      For more help integrating idempotency keys, refer to our
      [implementation guide](https://lob.com/guides#idempotent_request).

      **Headers**
      <table>
        <tbody>
          <tr>
            <td>Idempotency-Key:</td>
            <td>
              optional
              <p style="color:#888;margin-top:0px;">
                <font size="-1">
                  A string of no longer than 256 characters
                  that uniquely identifies this resource.
                </font>
              </p>
            </td>
          </tr>
        </tbody>
      </table>

      **Query Parameters**
      <table>
        <tbody>
          <tr>
            <td>idempotency-key:</td>
            <td>
              optional
              <p style="color:#888;margin-top:0px;">
                <font size="-1">
                  A string of no longer than 256 characters
                  that uniquely identifies this resource.
                </font>
              </p>
            </td>
          </tr>
        </tbody>
      </table>


      ### Example Request

      ```bash
        curl https://api.lob.com/v1/postcards \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -H "Idempotency-Key: 026e7634-24d7-486c-a0bb-4a17fd0eebc5" \
          -d "to=adr_bae820679f3f536b" \
          -d "from=adr_210a8d4b0b76d77b" \
          --data-urlencode "front=<html style='margin: 130px; font-size: 50;'>Front HTML for {{name}}</html>" \
          --data-urlencode "back=<html style='margin: 130px; font-size: 50;'>Back HTML</html>" \
          -d "merge_variables[name]=Harry"
      ```

      ## Metadata

      When creating any Lob object, you can include a metadata object with up to 20 key-value pairs of
      custom data. You can use metadata to store information like `metadata[customer_id] = "987654"` or
      `metadata[campaign] = "NEWYORK2015"`. This is especially useful for filtering and matching to internal
      systems.

      Each metadata key must be less than 40 characters long and values must be less than 500 characters.
      Metadata does not support nested objects.

      ### Example Create Request with Metadata

      ```bash
        curl https://api.lob.com/v1/postcards \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -d "description=Demo Postcard job" \
          -d "metadata[campaign]=NEWYORK2015" \
          -d "to=adr_bae820679f3f536b" \
          -d "from=adr_210a8d4b0b76d77b" \
          --data-urlencode "front=<html style='margin: 130px; font-size: 50;'>Front HTML for {{name}}</html>" \
          --data-urlencode "back=<html style='margin: 130px; font-size: 50;'>Back HTML</html>" \
          -d "merge_variables[name]=Harry"
      ```

      ### Example List Request with Metadata Filter

      ```bash
        curl -g "https://api.lob.com/v1/postcards?metadata[campaign]=NEWYORK2015&limit=2" \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
      ```


      ## Request Body

      When manually sending a POST HTTP request directly to the Lob API, without
      the use of a library, you may represent the body as either a Form URL
      Encoded request, a JSON document, or a Multipart Form Data request.

      However, if you're using one of our [SDKs](#tag/SDKs-and-Tools),
      the generation of the request bodies is done for you automatically and you don't
      need to worry about the format.

      ### Form URL Encoded

      This request body encoding is accompanied with the
      `Content-Type: application/x-www-form-urlencoded` header. The content is an
      example of what the [Verify a US address](index.html#operation/us_verification)
      endpoint accepts. An example of a request body encoded in this format follows.


      ```javascript
        primary_line=210 King Street&city=San Francisco&state=CA&zip_code=94107
      ```

      ### JSON

      This request body encoding is accompanied with the `Content-Type: application/json` header.
      The content is an example of what the [Verify a US address endpoint](index.html#operation/us_verification)
      accepts. An example of a request body encoded in this format follows.


      ```javascript
        {
          "primary_line": "210 King Street",
          "city": "San Francisco",
          "state": "CA",
          "zip_code": "94107"
        }
      ```

      ### Multipart Form Data

      This request body encoding is accompanied with the `Content-Type: multipart/form-data`
      header. This is the only format that can be used for uploading a file to the API. The
      content is an example of what the [Create a check](index.html#operation/check_create)
      endpoint accepts. An example of a request body encoded in this format follows.


      ```javascript
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="description"

        Demo Letter
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="to"

        adr_bae820679f3f536b
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="from"

        adr_210a8d4b0b76d77b
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="file"; filename="file.pdf"
        Content-Type: application/pdf

        <FILE CONTENT>
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="color"

        true
        --------------------------7015ebe79c0a5f8c--
      ```
  - name: Reverse Geocode Lookups
    description: >
      Find a list of zip codes associated with a valid US location via latitude and longitude.

  - name: SDKs and Tools
    x-traitTag: true
    description: |
      Please visit our [Github](https://www.github.com/lob) for a list of our supported libraries.
      - [Ruby](https://github.com/lob/lob-ruby)
      - [PHP](https://github.com/lob/lob-php)
      - [Node.js](https://github.com/lob/lob-node)
      - [Python](https://github.com/lob/lob-python)
      - [Java](https://github.com/lob/lob-java)
      - [Elixir](https://github.com/lob/lob-elixir)

  - name: Self Mailers
    description: |
      The self mailer endpoint allows you to easily print and mail self mailers. The API provides endpoints
      for creating self mailers, retrieving individual self mailers, canceling self mailers, and retrieving a list of self mailers.

  - name: Template Design
    x-traitTag: true
    description: |
      ## HTML Templates
      You can save commonly used HTML as templates within Lob to more easily manage them. You can reference
      your saved templates in postcard, letter, and check requests instead of having to pass a long HTML
      string on each request. Additionally, you can make changes to your HTML templates and update them
      independently, without having to touch your API integration. Templates can be created, edited,
      and viewed on your [Dashboard](https://dashboard.lob.com/#/templates). To use a template in a postcard,
      letter, or check, see the documentation for each endpoint below. For help using templates, check out our
      [HTML Templates Guide](https://lob.com/guides#html_templates) or get started with a
      [pre-designed template from our gallery](https://lob.com/template-gallery). In Live mode, you can only have
      as many templates as allotted in your current
      [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions). There is no limit in Test mode.

      If you'd like to interact with templates programmatically, check out our Beta Program for API access
      to the [HTML Templates Endpoints](#tag/Templates).

      ### Example Create Request using HTML Templates
      ```bash
        curl https://api.lob.com/v1/postcards \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -d "description=Demo Postcard job" \
          -d "to=adr_78c304d54912c502" \
          -d "from=adr_61a0865c8c573139" \
          -d "front=tmpl_b846a20859ae11a" \
          -d "back=tmpl_01b0d396a10c268" \
          -d "merge_variables[name]=Harry"
      ```

      ## HTML Examples
      Use a pre-designed template from our [gallery](https://lob.com/resources/template-gallery) or follow these
      basic [guidelines](https://github.com/lob/examples) as starting points for creating custom Postcards,
      Self Mailers, Letters, and Checks.

      Please follow the standards used in these templates, such as:
      - For any linked assets, you must use a performant file hosting provider with no rate limits such as Amazon
      S3.
      - Use inline styles or an internal stylesheet, do not link to external stylesheets.
      - Link to images that are 300DPI and sized at the final desired size on the physical mailing. For example,
      for a photo that is desired to be 1in x 1in on the final postcard, the image asset should be sized at 1in
      x 1in at 300DPI (which equates to 300px by 300px).
      - The sum of all linked assets should not exceed 5MB in file size.
      - Use `-webkit` prefixes for CSS properties when recommended [here](http://shouldiprefix.com/).

      Because different browsers have varying user-agent styles, the HTML you see in your browser will not
      always look identical to what is produced through the API. It is **strongly** recommended that you test all
      HTML requests by reviewing the final PDF files in your Test Environment, as these are the files that will be
      printed.

      ## Image Prepping
      Currently we support the following file types for all endpoints:
      - PDF
      - PNG
      - JPEG

      **Templates**

      You can find pre-made templates that already adhere to all of these guidelines here:
      - [Postcards](#tag/Postcards)
      - [Letters](#tag/Letters)
      - [Checks](#tag/Checks)
      - [Self Mailers](#tag/Self-Mailers)

      **Prepping All Images**

      The following guidelines apply to image types:
      - Images should be 300 dpi or higher - PNG/JPEG files with less than 300 dpi will be rejected.
      - Your artwork should include a 1/8" border around the final trim size. This means your final file size will be a total of 0.25" larger than your expected printed piece (ie, a 4"x6" postcard should be submitted as 4.25"x6.25"). There is no need to include crop marks in your submitted content.
      - Include a safe zone – make sure no critical elements are within 1/8" from the edge of the final size.
      - Do not include any additional postage marks or indicia.
      - File sizes should be no larger than 5MB.

      **Prepping PDFs**

      To ensure that you are producing PDF's correctly please follow the guidelines below:
      - [Make sure all non-standard fonts are embedded.](#section/Standard-PDF-Fonts)
      - Generated PDF's need to be be PDF/A compliant.

      **Prepping PNGs/JPEGs**

      To ensure that you are producing PNG's/JPEG's correctly please follow the guidelines below:

      - Minimum 300 dpi. The dpi is calculated as (width of image in pixels) / (width of product in inches) and (length of image in pixels) / (length of product in inches). For Example: 1275px x 1875px image used to create a 4.25" x 6.25" postcard has a dpi of 300.
      - Submitted images must have the same length to width ratio as the chosen product. Images will not be cropped or stretched by the API.

      ## Standard PDF Fonts
      Ideally, all fonts in provided PDFs should be embedded. Embedding a font in a PDF ensures that the final
      printed product will look as it was designed. Fonts can vary greatly in size and shape, even within the
      same family. If the exact font that was used to design the artwork is not used to print, the look and
      placement of the text is not guaranteed to be the same.

      In general, requests that provide PDFs with un-embedded fonts will be rejected. We make an exception for
      "standard fonts", a set of fonts that we have identified as being common. PDFs that contain un-embedded
      fonts that are found in the list, and match the accepted [font type](https://en.wikipedia.org/wiki/Category:Font_formats)
      will be accepted. Otherwise, the request will be rejected.

      Font embedding is an essential part of standard PDF workflows. Fonts should be embedded automatically by
      PDF editing software that are compliant with PDF standards.

      <table>
        <tr>
          <th style="white-space: nowrap">FONT NAME</th>
          <th style="white-space: nowrap">TYPES</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial</code></td>
          <td style="white-space: nowrap">Type 1, TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial,Bold</code></td>
          <td style="white-space: nowrap">Type 1, TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial,BoldItalic</code></td>
          <td style="white-space: nowrap">Type 1, TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial,Italic</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ArialMT</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial-BoldMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial-BoldItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial-ItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ArialNarrow</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ArialNarrow-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Calibri</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Calibri-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Calibri-Italic</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Candara-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier-Oblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier-Bold</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier-BoldOblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>CourierNewPSMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>CourierNewPS-ItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>CourierNewPS-BoldMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica-Bold</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica-BoldOblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica-Oblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>LucidaConsole</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>MsSansSerif</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>MsSansSerif,Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Symbol</code></td>
          <td style="white-space: nowrap">Type 1, TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Tahoma</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Tahoma-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-Bold</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-BoldItalic</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-Italic</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-Roman</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPS-BoldItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPS-BoldMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPS-ItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPSMT</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPSMT,Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TrebuchetMS</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana,Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana,Italic</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ZapfDingbats</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
      </table>

  - name: Template Versions
    description: |
      These API endpoints allow you to create, retrieve, update and delete versions of reusable HTML templates for use with the Print & Mail API.

  - name: Templates
    description: |
      These API endpoints allow you to create, retrieve, update and delete reusable HTML templates for use with the Print & Mail API.

  - name: Test and Live Environments
    x-traitTag: true
    description: |
      To make the API as explorable as possible, accounts have test and live
      environment API keys. You're not charged any fees in the test environment,
      so we encourage you to use it to try out services, perform quality
      assurance, and run automated testing. Objects―addresses, letters, checks,
      etc―in one environment cannot be manipulated by objects in the other.

      In general, a payment method (either credit card or ACH account) must be
      added to your account to make live API requests. However, a payment method
      is not required for the first 300 live requests per month to the
      `/v1/us_verifications` endpoint. After the first 300 requests, you will
      begin receiving errors with status code `403`.

      Requests made in the test environment always validate request arguments,
      simulate live environment behavior, and enforce rate limits. _They never
      print, mail nor, for verification services, verify addresses._ The US &
      International verification services trigger behavior with specific
      argument values, and, if you plan on using those, we recommend reading
      [US Verification Test Environment](#tag/US-Verifications-Test-Environment)
      and [Intl Verification Test Environment](#tag/Intl-Verifications-Test-Environment).

      To switch between environments, use the appropriate key for that
      environment when performing a request. You can find each environment's API
      key in your dashboard under Settings; test API keys are always prefixed
      with `test_` and production API keys with `live_`.

  - name: Tracking Events
    description: |
      As mailpieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.

      <h3>Certified Tracking Event Details</h3>

      Letters sent with USPS Certified Mail are fully tracked by USPS, and
      therefore their [tracking events](#operation/tracking_event) have an
      additional `details` object with more detailed information about the
      tracking event. The following table shows the potential values for
      the fields in the `details` object mapped to the tracking event `name`.

      <table>
        <tr>
          <th style="white-space: nowrap">NAME</th>
          <th style="white-space: nowrap">EVENT</th>
          <th style="white-space: nowrap">DESCRIPTION</th>
          <th style="white-space: nowrap">ACTION REQUIRED</th>
        </tr>
        <tr>
          <td style="white-space: nowrap">Mailed</td>
          <td style="white-space: nowrap"><code>package_accepted</code></td>
          <td>Package has been accepted into the carrier network for delivery.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_arrived</code></td>
          <td>Package has arrived at an intermediate location in the carrier network.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_departed</code></td>
          <td>Package has departed from an intermediate location in the carrier network.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_processing</code></td>
          <td>Package is processing at an intermediate location in the carrier network.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_processed</code></td>
          <td>Package has been processed at an intermediate location.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Local Area</td>
          <td style="white-space: nowrap"><code>package_in_local_area</code></td>
          <td>Package is at a location near the end destination.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Processed For Delivery</td>
          <td style="white-space: nowrap"><code>delivery_scheduled</code></td>
          <td>Package is scheduled for delivery.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Processed For Delivery</td>
          <td style="white-space: nowrap"><code>out_for_delivery</code></td>
          <td>Package is out for delivery.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Pickup Available</td>
          <td style="white-space: nowrap"><code>pickup_available</code></td>
          <td>Package is available for pickup at carrier location.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Delivered</td>
          <td style="white-space: nowrap"><code>delivered</code></td>
          <td>Package has been delivered.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Re-Routed</td>
          <td style="white-space: nowrap"><code>package_forwarded</code></td>
          <td>Package has been forwarded.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Returned to Sender</td>
          <td style="white-space: nowrap"><code>returned_to_sender</code></td>
          <td>Package is to be returned to sender.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>address_issue</code></td>
          <td>Address information is incorrect. Contact carrier to ensure delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>contact_carrier</code></td>
          <td>Contact the carrier for more information.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>delayed</code></td>
          <td>Delivery of package is delayed.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>delivery_attempted</code></td>
          <td>Delivery of package has been attempted. Contact carrier to ensure delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>delivery_rescheduled</code></td>
          <td>Delivery of package has been rescheduled.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>location_inaccessible</code></td>
          <td>Delivery location inaccessible to carrier. Contact carrier to ensure delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>notice_left</code></td>
          <td>Carrier left notice during attempted delivery. Follow carrier instructions on notice.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_damaged</code></td>
          <td>Package has been damaged. Contact carrier for more details.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_disposed</code></td>
          <td>Package has been disposed.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_held</code></td>
          <td>Package held at carrier location. Contact carrier for more details.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_lost</code></td>
          <td>Package has been lost. Contact carrier for more details.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_unclaimed</code></td>
          <td>Package is unclaimed.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_undeliverable</code></td>
          <td>Package is not able to be delivered.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>reschedule_delivery</code></td>
          <td>Contact carrier to reschedule delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>other</code></td>
          <td>Unrecognized carrier status.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
      </table>

  - name: US Autocompletions
    description: >
      Given partial address information, this endpoint returns up to 10 address suggestions.

      ## Autocompletion Test Env

      Your test API key does not autocomplete US addresses and is used to simulate
      behavior. With your test API key, requests with specific values for `address_prefix`
      return predetermined values. When `address_prefix` is set to:

      - `0 suggestions` - Returns no suggestions
      - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses.
        `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request.
        Each additional letter in `suggestion` reduces the number of suggestions by one (e.g.
        `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of
        suggestions returned.

      City and state filters work as expected and filter the list of predetermined suggested addresses.

      See the `test` request & response examples under [Autocomplete Examples](#operation/autocompletion) within the "Autocomplete
      a partial address" section in US Autocompletions.

  - name: US Verification Types
    x-traitTag: true
    description: |
      These are detailed definitions for various fields in the [US verification object](#operation/us_verification).

      <h3>ZIP Code Types - <code>components[zip_code_type]</code></h3>

      <table>
        <tbody>
          <tr>
            <td style="white-space: nowrap"><code>standard</code></td>
            <td>The default ZIP code type. Used when none of the other types apply.</td>
          </tr>
          <tr>
            <td><code>po_box</code></td>
            <td>The ZIP code contains only PO Boxes.</td>
          </tr>
          <tr>
            <td><code>unique</code></td>
            <td>The ZIP code is uniquely assigned to a single organization (such as a government agency) that receives a large volume of mail.</td>
          </tr>
          <tr>
            <td><code>military</code></td>
            <td>The ZIP code contains military addresses.</td>
          </tr>
          <tr>
            <td><i>empty string</i></td>
            <td>A match could not be made with the provided inputs.</td>
          </tr>
        </tbody>
      </table>

      <h3>Record Types - <code>components[record_type]</code></h3>

      <table>
        <tbody>
          <tr>
            <td><code>street</code></td>
            <td>The default address type.</td>
          </tr>
          <tr>
            <td><code>highrise</code></td>
            <td>The address is a commercial building, apartment complex, highrise, etc.</td>
          </tr>
          <tr>
            <td><code>firm</code></td>
            <td>The address is of an organizational entity which receives a minimum number of mailpieces per day.</td>
          </tr>
          <tr>
            <td><code>po_box</code></td>
            <td>The address is a PO Box.</td>
          </tr>
          <tr>
            <td><code>rural_route</code></td>
            <td>The address exists on a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.</td>
          </tr>
          <tr>
            <td style="white-space: nowrap"><code>general_delivery</code></td>
            <td>The address is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.</td>
          </tr>
          <tr>
            <td><i>empty string</i></td>
            <td>A match could not be made with the provided inputs.</td>
          </tr>
        </tbody>
      </table>

      <h3>Carrier Route Types - <code>components[carrier_route_type]</code></h3>

      <table class="table-docs table-docs-code">
        <tbody>
          <tr>
            <td><code>city_delivery</code></td>
            <td>The default carrier route type. Used when none of the other types apply.</td>
          </tr>
          <tr>
            <td><code>rural_route</code></td>
            <td>The carrier route is a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.</td>
          </tr>
          <tr>
            <td><code>highway_contract</code></td>
            <td>The carrier route is a Highway Contract Route. This is an older system of mail delivery which is still used in some parts of the country.</td>
          </tr>
          <tr>
            <td><code>po_box</code></td>
            <td>The carrier route consists of PO Boxes.</td>
          </tr>
          <tr>
            <td style="white-space: nowrap"><code>general_delivery</code></td>
            <td>The carrier route is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.</td>
          </tr>
          <tr>
            <td><i>empty string</i></td>
            <td>A match could not be made with the provided inputs.</td>
          </tr>
        </tbody>
      </table>

      <h3>DPV Footnotes - <code>deliverability_analysis[dpv_footnotes]</code></h3>

      <table class="table-docs table-docs-code">
        <tbody>
          <tr>
            <td style="white-space: nowrap"><code>AA</code></td>
            <td>Some parts of the address (such as the street and ZIP code) are valid.</td>
          </tr>
          <tr>
            <td><code>A1</code></td>
            <td>The address is invalid based on given inputs.</td>
          </tr>
          <tr>
            <td><code>BB</code></td>
            <td>The address is deliverable.</td>
          </tr>
          <tr>
            <td><code>CC</code></td>
            <td>The address is deliverable by removing the provided secondary unit designator.</td>
          </tr>
          <tr>
            <td><code>N1</code></td>
            <td>The address is deliverable but is missing a secondary information (apartment, unit, etc).</td>
          </tr>
          <tr>
            <td><code>F1</code></td>
            <td>The address is a deliverable military address.</td>
          </tr>
          <tr>
            <td><code>G1</code></td>
            <td>The address is a deliverable General Delivery address. General Delivery is a USPS service which allows individuals without permanent addresses to receive mail.</td>
          </tr>
          <tr>
            <td><code>U1</code></td>
            <td>The address is a deliverable unique address. A unique ZIP code is assigned to a single organization (such as a government agency) that receives a large volume of mail.</td>
          </tr>
          <tr>
            <td><code>M1</code></td>
            <td>The primary number is missing.</td>
          </tr>
          <tr>
            <td><code>M3</code></td>
            <td>The primary number is invalid.</td>
          </tr>
          <tr>
            <td><code>P1</code></td>
            <td>PO Box, Rural Route, or Highway Contract box number is missing.</td>
          </tr>
          <tr>
            <td><code>P3</code></td>
            <td>PO Box, Rural Route, or Highway Contract box number is invalid.</td>
          </tr>
          <tr>
            <td><code>R1</code></td>
            <td>The address matched to a <a href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency" target="_blank">CMRA</a> and private mailbox information is not present.</td>
          </tr>
          <tr>
            <td><code>R7</code></td>
            <td>The address matched to a Phantom Carrier Route (<code>carrier_route</code> of <code>R777</code>), which corresponds to physical addresses that are not eligible for delivery.</td>
          </tr>
          <tr>
            <td><code>RR</code></td>
            <td>The address matched to a <a href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency" target="_blank">CMRA</a> and private mailbox information is present.</td>
          </tr>
        </tbody>
      </table>

  - name: US Verifications
    description: |
      Validate, automatically correct, and standardize the addresses in your
      address book based on USPS's [Coding Accuracy Support System (CASS)](https://postalpro.usps.com/certifications/cass).

      ## US Verifications Test Env

      When verifying US addresses, you'll likely want to test against a wide array of addresses to
      ensure you're handling responses correctly. With your test API key, requests that use specific
      values for `address` or `primary_line` and (if using `primary_line`) an arbitrary five digit
      number for `zip_code` (e.g. "11111") let you explore the responses to many types of addresses:

      <table>
        <tr>
          <th style="white-space: nowrap">ADDRESS TYPE FOR SAMPLE RESPONSE</th>
          <th style="white-space: nowrap">DELIVERABILITY</th>
          <th style="white-space: nowrap">SET <code>primary_line</code> OR <code>address</code> TO</th>
        </tr>
        <tr>
          <td style="white-space: nowrap">Commercial highrise</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>commercial highrise</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Residential highrise</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>residential highrise</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Residential house</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>residential house</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">PO Box</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>po box</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Rural route</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>rural route</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Puerty Rico address w/ urbanization</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>puerto rico</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Military address</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>military</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Department of state</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>department of state</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Generic deliverable</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Missing a suite number</td>
          <td style="white-space: nowrap"><code>deliverable_missing_unit</code></td>
          <td style="white-space: nowrap"><code>missing unit</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Suite number doesn't exist</td>
          <td style="white-space: nowrap"><code>deliverable_incorrect_unit</code></td>
          <td style="white-space: nowrap"><code>incorrect unit</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Residential house with unnecessary suite number</td>
          <td style="white-space: nowrap"><code>deliverable_unnecessary_unit</code></td>
          <td style="white-space: nowrap"><code>unnecessary unit</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Undeliverable and block matched</td>
          <td style="white-space: nowrap"><code>undeliverable</code></td>
          <td style="white-space: nowrap"><code>undeliverable block match</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Undeliverable and no block matched</td>
          <td style="white-space: nowrap"><code>undeliverable</code></td>
          <td style="white-space: nowrap"><code>undeliverable no match</code></td>
        </tr>
      </table>

      See the `test` request & response examples under [US Verification Examples](#operation/us_verification) within the
      "Verify a US or US territory address" section in US Verifications.

      You can rely on the response from these examples generally matching the response you'd see in the live environment with an
      address of that type (excluding the `recipient` field).

      The test API key does not perform any verification, automatic correction, or standardization for addresses. If you wish to
      try these features out, use our [live demo](https://lob.com/address-verification) or the free plan (see [our pricing](https://lob.com/pricing/address-verification) for details).

  - name: Versioning and Changelog
    x-traitTag: true
    description: |
      ### API Versioning

      When backwards-incompatible changes are made to the API, a new dated version
      is released. The latest version of the API is version **2020-02-11**. You can
      view your version and upgrade to the latest version in your
      [Dashboard Settings](https://dashboard.lob.com/#/settings/keys). You will
      only need to specify a version if you would like to test a newer version of
      the API without doing a full upgrade. The API will return an error if a
      version older than your current one is passed in. See
      [API Changelog](#tag/Versioning-and-Changelog) for a full list of breaking changes.

      ### Example Request

      ```bash
        curl https://api.lob.com/v1/addresses \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -H "Lob-Version: 2020-02-11"
      ```

      ### Specification Versioning
      You might be wondering why our API and specification use different versioning schemes.
      Lob's API predates our specification and follows the [Stripe versioning](https://stripe.com/blog/api-versioning)
      approach. This works well to manage backwards-incompatible changes to our API.

      For our API specification (used to create this documentation), we've chosen [semantic
      versioning](https://semver.org/). This versioning reflects the backward-compatible
      changes that do not require a versioning of Lob's API.

      Lob's API specification will be used to generate artifacts like documentation, client SDKs,
      and other developer tooling. Semantic versioning of our specification will inform how we
      version those artifacts like SDKs. It is helpful to know the version of a specification
      used to produce an artifact in order reference the specification release notes.


      ### Changelog

      **2020-02-11**
      - renders merge_variables into HTML with syntax that supports objects, conditionals, and loops

      **2019-06-01**
      - changed pagination model of GET endpoints for postcards, letters, checks, addresses, bank accounts, templates, and template versions to a cursor-based model
      - offset parameter on these endpoints has been removed
      - previous_url and next_url response fields have been added

      **2018-06-05**
      - remove rate-limit headers

      **2018-03-30**
      - updated letter template which includes a white box behind the address block area to ensure deliverability

      **2018-03-01**
      - US verification deliverability value no_match deprecated and merged into undeliverable
      - US verification deliverability value deliverable_extra_secondary is split into deliverable_unnecessary_unit and deliverable_incorrect_unit
      - US verification deliverability value deliverable_missing_secondary renamed to deliverable_missing_unit
      - US verifications zip_code special values deprecated in favor of more comprehensive primary_line special values

      **2018-02-08**
      - enforce 50 character limit on the sum of address_line1 and address_line2 for check recipients

      **2017-11-08**
      - split extra_secondary_information into extra_secondary_designator and extra_secondary_number for /v1/us_verifications

      **2017-10-17**
      - remove support for the /v1/states endpoint
      - remove support for the /v1/countries endpoint
      - remove support for the message field from the POST /v1/postcards endpoint

      **2017-09-08**
      - renames input parameters and restructures response object for /v1/intl_verifications

      **2017-08-14**
      - automatically standardizes and corrects US addresses created via POST /v1/addresses. non-US addresses will be standardized into uppercase only.
      - automatically standardizes and corrects inline US addresses used in POST /v1/postcards, POST /v1/letters, and POST /v1/checks. non-US addresses will be standardized into uppercase only.
      - enforce 40 character limit on name and company for all addresses
      - enforce 64 character limit on address_line1 and address_line2 for US addresses

      **2017-06-16**
      - enforce 10,000 character limit on HTML strings
      - rename data parameter for all products to merge_variables

      **2017-05-17**
      - discontinues the /v1/verify endpoint - please use /v1/us_verifications or /v1/intl_verifications instead

      **2016-06-30** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - unnest tracking object from postcard, letter, and check response objects

      **2016-05-02** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - adds address_placement parameter to letters that defaults to top_first_page, template is no longer allowed

      **2016-03-21** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - removes tracking numbers that do not provide any consumer-facing tracking information
      - removes link from tracking responses
      - requires account_type when creating a bank account

      **2016-01-19** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - renames the count parameter to limit for all list endpoints
      - removes the next_url and previous_url from list responses

      **2015-12-22** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - adds size parameter to postcards that defaults to 4x6, setting is no longer allowed

      **2015-11-23** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - remove price from letters
      - remove pages from letters
      - remove price from postcards
      - renamed file parameter to check_bottom for checks

      **2015-11-06** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - remove bank_address from bank_accounts
      - remove account_address from bank_accounts and add from to checks
      - remove price from checks

      **2015-10-21** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - use the new HTML renderer for all products

      **2015-06-25** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - remove the status field from all endpoints

      **2015-04-11** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - errors on all endpoints are now single objects instead of arrays
      - full_bleed is no longer allowed for postcards, objects, and area mails - all products are now full_bleed by default
      - template is no longer allowed for postcards - all postcards must adhere to the template
      - name is no longer allowed for area mails, bank accounts, checks, jobs, objects, and postcards - it has been replaced by description
      - setting ID's 100 and 101 are no longer supported for objects - please use the Simple Letter Service instead
      - service is no longer supported for jobs
      - all boolean parameters now return true/false instead of 1/0
      - double_sided is no longer allowed for objects - all products are default double sided if more than one page is allowed
      - template is no longer allowed for objects

      **2014-12-18** <span style="background: #ebf2fb;color: #1878e0;text-transform: none;letter-spacing: 1px;font-weight: 500;border-radius: 100px;padding: 6px 16px;font-size: 14px;">Sunsetted</span>
      - removed concept of packaging
      - signatory is now a required field when creating a bank account
      - bank_code is no longer an allowed field when creating a bank account
      - service_id parameter replaced by service parameter in /jobs
      - setting_id parameter replaced by setting parameter in /objects

  - name: Webhooks
    x-traitTag: true
    description: |
      Webhooks are an easy way to get notifications on events happening asynchronously
      within Lob's architecture. For example, when a postcard gets a "Processed For
      Delivery" tracking event, an event object of type `postcard.processed_for_delivery`
      will be created. If you are subscribed to that event type in that Environment
      (Test vs. Live), Lob will send that event to any URLs you've specified via an
      HTTP POST request. In Live mode, you can only have as many webhooks as allotted
      in your current [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions).
      There is no limit in Test mode.
      You can view and create [webhooks](https://dashboard.lob.com/#/webhooks) on the
      Lob Dashboard, as well as view your [events](https://dashboard.lob.com/#/events).
      See our [Webhooks Integration Guide](https://lob.com/guides#webhooks_block) for more
      details on how to integrate. Please see the full list of event types available for
      subscription here.

  - name: Zip Lookups
    description: >
      Find a list of cities, states and associated information about a US ZIP code.

x-tagGroups:
  - name: Overview
    tags:
      - Introduction
      - Authentication
      - Getting Started
      - SDKs and Tools

  - name: Address Book
    tags:
      - Addresses
      - National Change of Address

  - name: Print and Mail API
    tags:
      - Postcards
      - Self Mailers
      - Letters
      - Checks
      - Bank Accounts
      - Templates
      - Template Versions
      - Template Design
      - Manage Mail

  - name: Address Verification API
    tags:
      - US Verifications
      - US Verification Types
      - US Autocompletions
      - Reverse Geocode Lookups
      - Zip Lookups
      - Intl Verifications

  - name: Webhooks
    tags:
      - Webhooks
      - Events
      - Tracking Events

  - name: Special Features
    tags:
      - Billing Groups
      - Cards
      - Card Orders

  - name: Appendix
    tags:
      - Beta Program
      - Errors
      - Rate Limiting
      - Requests and Responses
      - Test and Live Environments
      - Versioning and Changelog

components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

security:
  - basicAuth: []

x-webhooks:
  events:
    post:
      summary: Events
      description: Information about an event
      operationId: event
      tags:
        - Events
      responses:
        "200":
          $ref: resources/events/responses/events.yml
  tracking_events:
    post:
      summary: Tracking Events
      description: Information about tracking events
      operationId: tracking_event
      tags:
        - Tracking Events
      responses:
        "200":
          $ref: shared/resources/tracking_events/responses/tracking_events.yml

paths:
  /addresses:
    $ref: resources/addresses/addresses.yml

  /addresses/{adr_id}:
    $ref: resources/addresses/address.yml

  /bank_accounts/{bank_id}/verify:
    $ref: resources/bank_accounts/bank_account_verify.yml

  /bank_accounts/{bank_id}:
    $ref: resources/bank_accounts/bank_account.yml

  /bank_accounts:
    $ref: resources/bank_accounts/bank_accounts.yml

  /billing_groups/{bg_id}:
    $ref: resources/billing_groups/billing_group.yml

  /billing_groups:
    $ref: resources/billing_groups/billing_groups.yml

  /bulk/us_verifications:
    $ref: resources/bulk_us_verifications/bulk_us_verifications.yml

  /bulk/intl_verifications:
    $ref: resources/bulk_intl_verifications/bulk_intl_verifications.yml

  /cards:
    $ref: resources/cards/cards.yml

  /cards/{card_id}:
    $ref: resources/cards/card.yml

  /cards/{card_id}/orders:
    $ref: resources/cards/card_orders/card_orders.yml

  /checks/{chk_id}:
    $ref: resources/checks/check.yml

  /checks:
    $ref: resources/checks/checks.yml

  /intl_verifications:
    $ref: resources/intl_verifications/intl_verifications.yml

  /letters/{ltr_id}:
    $ref: resources/letters/letter.yml

  /letters:
    $ref: resources/letters/letters.yml

  /postcards/{psc_id}:
    $ref: resources/postcards/postcard.yml

  /postcards:
    $ref: resources/postcards/postcards.yml

  /self_mailers/{sfm_id}:
    $ref: resources/self_mailers/self_mailer.yml

  /self_mailers:
    $ref: resources/self_mailers/self_mailers.yml

  /templates/{tmpl_id}/versions/{vrsn_id}:
    $ref: resources/templates/template_versions/template_version.yml

  /templates/{tmpl_id}/versions:
    $ref: resources/templates/template_versions/template_versions.yml

  /templates/{tmpl_id}:
    $ref: resources/templates/template.yml

  /templates:
    $ref: resources/templates/templates.yml

  /us_autocompletions:
    $ref: resources/us_autocompletions/us_autocompletions.yml

  /us_reverse_geocode_lookups:
    $ref: resources/reverse_geocode_lookups/reverse_geocode_lookups.yml

  /us_verifications:
    $ref: resources/us_verifications/us_verifications.yml

  /us_zip_lookups:
    $ref: resources/zip_lookups/zip_lookups.yml