openapi: 3.0.3
info:
title: Lob Accounts Cards API
version: 1.22.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>
'
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
security:
- basicAuth: []
tags:
- 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.
<div class="back-to-top" ><a href="#" onclick="toTopLink()">back to top</a></div>
'
paths:
/cards:
get:
operationId: cards_list
summary: List
description: Returns a list of your cards. The cards are returned sorted by creation date, with the most recently created addresses appearing first.
tags:
- Cards
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/before_after'
- $ref: '#/components/parameters/include'
responses:
'200':
description: Returns a list of card objects
content:
$ref: '#/components/mediaTypes/all_cards'
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl -X GET \"https://api.lob.com/v1/cards?limit=2\" \\\n -u <YOUR API KEY>:\n"
label: CURL
- lang: Typescript
source: "try {\n const cards = await new CardsApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.cards.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Python
source: "with ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n cards = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: "$lob->cards()->all(array(\n 'limit' => 2\n));\n"
- lang: CSharp
source: "CardsApi api = new CardsApi(config);\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\n\ntry {\n CardList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList // include\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Ruby
source: "cardsApi = CardsApi.new(config)\n\nbegin\n cards = cardsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nCardList = apiClient.CardsApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
label: GO
post:
operationId: card_create
summary: Create
description: Creates a new card given information
tags:
- Cards
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/card_editable'
example:
description: Test card
front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf
back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf
size: 2.125x3.375
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/card_editable'
example:
description: Test card
front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf
back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf
size: 2.125x3.375
multipart/form-data:
schema:
$ref: '#/components/schemas/card_editable'
example:
description: Test card
front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf
back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf
size: 2.125x3.375
responses:
'200':
description: Card created successfully
content:
$ref: '#/components/mediaTypes/card'
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl https://api.lob.com/v1/cards \\\n -u <YOUR API KEY>: \\\n -d \"description=Test card\" \\\n -d \"front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\" \\\n -d \"back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\" \\\n -d \"size=2.125x3.375\"\n"
label: CURL
- lang: Typescript
source: "const cardsCreate = new CardEditable({\n front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n size: CardEditableSizeEnum._2125x3375,\n description: 'Test card'\n});\n\ntry {\n const myCard = await new CardsApi(config).create(cardsCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.cards.create({\n description: 'Test card',\n front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n size: '2.125x3.375'\n}, function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Python
source: "card_editable = CardEditable(\n front = \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n back = \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n size = \"2.125x3.375\",\n description = \"Test Card\",\n)\n\nwith ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n created_card = api.create(card_editable)\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: "$lob->cards()->create(array(\n 'description' => 'Test card',\n 'front' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n 'back' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n 'size' => => '2.125x3.375'\n));\n"
label: PHP
- lang: CSharp
source: "CardsApi api = new CardsApi(config);\n\nCardEditable cardEditable = new CardEditable(\n \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\", // front\n \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\", // back\n CardEditable.SizeEnum._2125x3375, // size\n \"Test Card\" // description\n);\n\ntry {\n Card result = api.create(cardEditable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Ruby
source: "cardCreate = CardEditable.new({\n front: \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n back: \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n size: \"2.125x3.375\",\n description: \"Test Card\",\n});\n\ncardApi = CardsApi.new(config)\n\nbegin\n createdCard = cardApi.create(cardCreate)\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar cardCreate = *lob.NewCardEditable()\ncardCreate.SetFront(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\")\ncardCreate.SetBack(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\")\ncardCreate.SetSize(\"2.125x3.375\")\ncardCreate.SetDescription(\"Test Card\")\n\n\n\ncreatedcard, _, err := apiClient.CardsApi.Create(context).CardEditable(cardCreate).Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
/cards/{card_id}:
parameters:
- in: path
name: card_id
description: id of the card
required: true
schema:
$ref: '#/components/schemas/card_id'
get:
operationId: card_retrieve
summary: Retrieve
description: Retrieves the details of an existing card. You need only supply the unique customer identifier that was returned upon card creation.
tags:
- Cards
responses:
'200':
description: Returns a card object
content:
$ref: '#/components/mediaTypes/card'
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \\\n -u <YOUR API KEY>:\n"
label: CURL
- lang: Typescript
source: "try {\n const card = await new CardsApi(config).get('card_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.cards.retrieve('card_7a6d73c5c8457fc', function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Python
source: "with ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n card = api.get(\"card_7a6d73c5c8457fc\")\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: '$lob->cards()->get(''card_7a6d73c5c8457fc'');
'
label: PHP
- lang: CSharp
source: "CardsApi api = new CardsApi(config);\n\ntry {\n Card response = api.get(\"card_7a6d73c5c8457fc\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Ruby
source: "cardApi = CardsApi.new(config)\n\nbegin\n retrievedCard = cardApi.get(\"card_7a6d73c5c8457fc\")\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedCard, _, err := apiClient.CardsApi.Get(context,\"card_7a6d73c5c8457fc\").Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
post:
operationId: card_update
summary: Update
description: Update the details of an existing card. You need only supply the unique identifier that was returned upon card creation.
tags:
- Cards
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/card_updatable'
example:
description: Test card
auto_reorder: true
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/card_updatable'
example:
description: Test card
auto_reorder: true
multipart/form-data:
schema:
$ref: '#/components/schemas/card_updatable'
example:
description: Test card
auto_reorder: true
responses:
'200':
description: Returns a card object
content:
$ref: '#/components/mediaTypes/card'
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl -X POST https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \\\n -u <YOUR API KEY>: \\\n -d \"description=Awesome card\" \\\n -d \"auto_reorder=true\"\n"
label: CURL
- lang: Typescript
source: "const cardUpdatable = new CardEditable ({\n description: 'Awesome card',\n auto_reorder: true\n});\n\ntry {\n await new CardsApi(config).update(cardUpdatable);\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.cards.update('card_7a6d73c5c8457fc', {\n description: 'Awesome card',\n auto_reorder: true\n}, function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: CSharp
source: "CardsApi api = new CardsApi(config);\nCardUpdatable update = new CardUpdatable(\"Awesome card\", true, 15000);\n\ntry {\n api.update(\"card_6afffd19045076c\", update);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Python
source: "card_updatable = CardUpdatable(\n description = \"Awesome card\",\n auto_reorder = True,\n reorder_quantity = 10000,\n)\n\nwith ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n updated_card = api.update(\"card_6afffd19045076c\", card_updatable)\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: Ruby
source: "cardUpdatable = CardUpdatable.new({\n description: \"Awesome card\",\n auto_reorder: \"true\",\n reorder_quantity: 10000,\n})\n\ncardApi = CardsApi.new(config)\n\nbegin\n updatedCard = cardApi.update(\"card_6afffd19045076c\", cardUpdatable)\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ncardEditable = *lob.NewCardEditable(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf()\")\ncreatedCard, _, _ := apiClient.CardsApi.Create(context).CardEditable(suite.cardEditable).Execute()\nvar updatedCard = *lob.NewCardUpdatable()\nupdatedCard.SetDescription(\"Card was updated\")\n\nresp, _, err := suite.apiClient.CardsApi.Update(context, createdCard.Id).CardUpdatable(updatedCard).Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
delete:
operationId: card_delete
summary: Delete
description: Delete an existing card. You need only supply the unique identifier that was returned upon card creation.
tags:
- Cards
responses:
'200':
$ref: '#/components/responses/card_deleted'
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \\\n -u <YOUR API KEY>:\n"
label: CURL
- lang: Typescript
source: "try {\n const deleteCard = await new CardsApi(config).delete('card_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.cards.delete('card_7a6d73c5c8457fc', function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Python
source: "with ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"card_6afffd19045076c\")\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: '$lob->cards()->delete(''card_7a6d73c5c8457fc'');
'
label: PHP
- lang: CSharp
source: "CardsApi api = new CardsApi(config);\n\ntry {\n CardDeletion response = api.delete(\"card_6afffd19045076c\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Ruby
source: "cardApi = CardsApi.new(config)\n\nbegin\n deletedCard = cardApi.delete(\"card_6afffd19045076c\")\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedCard, _, err := apiClient.CardsApi.Delete(context, \"card_6afffd19045076c\").Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
components:
schemas:
remote_file_url:
type: string
description: 'The location of a remote file. Remote URLs have a 5 MB file size limit and must be downloaded within 40 seconds.
'
pattern: ^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$
card_description:
type: string
description: Description of the card.
maxLength: 255
nullable: true
object:
type: string
description: Value is resource type.
date_created:
type: string
format: date-time
description: A timestamp in ISO 8601 format of the date the resource was created.
lob_base:
type: object
required:
- date_created
- date_modified
- object
properties:
date_created:
$ref: '#/components/schemas/date_created'
date_modified:
$ref: '#/components/schemas/date_modified'
deleted:
$ref: '#/components/schemas/deleted'
object:
$ref: '#/components/schemas/object'
list:
type: object
description: Multiple items returned in order
properties:
object:
$ref: '#/components/schemas/object'
next_url:
type: string
description: Url of next page of items in list.
nullable: true
previous_url:
type: string
description: Url of previous page of items in list.
nullable: true
count:
$ref: '#/components/schemas/count'
total_count:
type: integer
description: Indicates the total number of records. Provided when the request specifies an "include" query parameter
date_modified:
type: string
format: date-time
description: A timestamp in ISO 8601 format of the date the resource was last modified.
card_id:
type: string
description: Unique identifier prefixed with `card_`.
pattern: ^card_[a-zA-Z0-9]+$
card_deletion:
description: Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end.
properties:
id:
$ref: '#/components/schemas/card_id'
deleted:
$ref: '#/components/schemas/deleted'
card_base:
type: object
properties:
description:
$ref: '#/components/schemas/card_description'
size:
description: The size of the card
enum:
- 3.375x2.125
- 2.125x3.375
type: string
default: 2.125x3.375
card:
allOf:
- $ref: '#/components/schemas/lob_base'
- $ref: '#/components/schemas/card_base'
- required:
- description
- type: object
required:
- id
- url
- auto_reorder
- reorder_quantity
- raw_url
- front_original_url
- back_original_url
- thumbnails
- available_quantity
- pending_quantity
- status
- orientation
- threshold_amount
- object
properties:
id:
$ref: '#/components/schemas/card_id'
url:
description: The signed link for the card.
maxLength: 2083
minLength: 1
type: string
format: uri
auto_reorder:
description: True if the cards should be auto-reordered.
type: boolean
default: false
reorder_quantity:
description: The number of cards to be reordered.
type: integer
nullable: true
raw_url:
description: The raw URL of the card.
maxLength: 2083
minLength: 1
type: string
format: uri
front_original_url:
description: The original URL of the front template.
maxLength: 2083
minLength: 1
type: string
format: uri
back_original_url:
description: The original URL of the back template.
maxLength: 2083
minLength: 1
type: string
format: uri
thumbnails:
type: array
items:
$ref: '#/components/schemas/thumbnail'
available_quantity:
description: The available quantity of cards.
type: integer
default: 0
pending_quantity:
description: The pending quantity of cards.
type: integer
default: 0
status:
title: The status of the card.
enum:
- processed
- rendered
type: string
orientation:
description: The orientation of the card.
enum:
- horizontal
- vertical
type: string
default: horizontal
threshold_amount:
description: The threshold amount of the card
type: integer
default: 0
object:
description: object
enum:
- card
type: string
default: card
thumbnail:
type: object
properties:
small:
$ref: '#/components/schemas/signed_link'
medium:
$ref: '#/components/schemas/signed_link'
large:
$ref: '#/components/schemas/signed_link'
deleted:
type: boolean
description: Only returned if the resource has been successfully deleted.
card_updatable:
type: object
properties:
description:
$ref: '#/components/schemas/card_description'
auto_reorder:
description: Allows for auto reordering
type: boolean
reorder_quantity:
description: The quantity of items to be reordered (only required when auto_reorder is true).
type: number
minimum: 10000
maximum: 10000000
signed_link:
type: string
description: A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated.
pattern: ^https://lob-assets.com/(letters|postcards|bank-accounts|checks|self-mailers|cards|order-creatives)/([a-z]{3,4}_[a-z0-9]{15,16}|[a-z]{3}_[a-z0-9]{26}_[a-z]{4}_[a-z0-9]{26})('|_signature)(.pdf|_thumb_[a-z]+_[0-9]+.png|.png)?(version=[a-z0-9]*&)expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+
card_editable:
allOf:
- $ref: '#/components/schemas/card_base'
- type: object
required:
- front
properties:
front:
description: A PDF template for the front of the card
oneOf:
- $ref: '#/components/schemas/remote_file_url'
- $ref: '#/components/schemas/local_file_path'
back:
description: A PDF template for the back of the card
oneOf:
- $ref: '#/components/schemas/remote_file_url'
- $ref: '#/components/schemas/local_file_path'
default: https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf
local_file_path:
type: string
description: The path to a local file.
pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$
count:
type: integer
description: number of resources in a set
error:
type: object
description: Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end.
required:
- error
properties:
error:
type: object
required:
- message
- status_code
- code
properties:
message:
type: string
description: A human-readable message with more details about the error
example: Rate limit exceeded. Please wait 5 seconds and try your request again.
status_code:
$ref: '#/components/schemas/failure_status_code'
code:
type: string
enum:
- bad_request
- conflict
- feature_limit_reached
- internal_server_error
- invalid
- not_deletable
- not_found
- request_timeout
- service_unavailable
- unrecognized_endpoint
- unsupported_lob_version
- address_length_exceeds_limit
- bank_account_already_verified
- bank_error
- billing_address_required
- custom_envelope_inventory_depleted
- deleted_bank_account
- failed_deliverability_strictness
- file_pages_below_min
- file_pages_exceed_max
- file_size_exceeds_limit
- foreign_return_address
- inconsistent_page_dimensions
- invalid_bank_account
- invalid_bank_account_verification
- invalid_check_international
- invalid_country_covid
- invalid_file
- invalid_file_dimensions
- invalid_file_download_time
- invalid_file_url
- invalid_image_dpi
- invalid_international_feature
- invalid_perforation_return_envelope
- invalid_template_html
- mail_use_type_can_not_be_null
- merge_variable_required
- merge_variable_whitespace
- payment_method_unverified
- pdf_encrypted
- special_characters_restricted
- unembedded_fonts
- email_required
- invalid_api_key
- publishable_key_not_allowed
- rate_limit_exceeded
- unauthorized
- unauthorized_token
description: 'A pre-defined string identifying an error. Error codes fall into three categories:
**GENERIC**
* `bad_request` - 422: an invalid request was made. See error message for details.
* `conflict` - 409/422: this operation would leave data in a conflicted state.
* `feature_limit_reached` - 403: the account has reached its resource limit and requires upgrading to add more.
* `internal_server_error` - 500: an error has occured on Lob''s servers. Please try request again.
* `invalid` - 422: an invalid request was made. See error message for details.
* `not_deletable` - 422: an attempt was made to delete a resource, but the resource cannot be deleted.
* `not_found` - 404: the requested resource was not found.
* `request_timeout` - 408: the request took too long. Please try again.
* `service_unavailable` - 503: the Lob servers are temporarily unavailable. Please try agian.
* `unrecognized_endpoint` - 404: the requested endpoint doesn''t exist.
* `unsupported_lob_version` - 422: an unsupported Lob API version was requested.
**ADVANCED**
* `address_length_exceeds_limit` - 422: the sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.
* `bank_account_already_verified` - 422: the bank account has already been verified.
* `bank_error` - 422: there''s an issue with the bank account.
* `billing_address_required` - 403: in order to create a live mail piece, your account needs to set up a billing address.
* `custom_envelope_inventory_depleted` - 422: custom envelope inventory is depleted, and more will need to be ordered.
* `deleted_bank_account` - 404: checks cannot be created with a deleted bank account.
* `failed_deliverability_strictness` - 422: the `to` address doesn''t meet strictness requirements. See <a href="https://dashboard.lob.com/#/settings/account" target="_blank">Account Settings</a> to configure strictness.
* `file_pages_below_min` - 422: not enough pages.
* `file_pages_exceed_max` - 422: too many pages.
* `file_size_exceeds_limit` - 422: the file size is too large. See description for details.
* `foreign_return_address` - 422: the `from` address must be a US address.
* `inconsistent_page_dimensions` - 422: all pages of the input file must have the same dimensions.
* `invalid_bank_account` - 422: the provided bank routing number is invalid.
* `invalid_bank_account_verification` - 422: verification amounts do not match.
* `invalid_check_international` - 422: checks cannot be sent internationally.
* `invalid_country_covid` - 422: the postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.
* `invalid_file` - 422: the file is invalid.
* `invalid_file_dimensions` - 422: file dimensions are incorrect for the selected mail type.
* `invalid_file_download_time` - 422: file download from remote server took too long.
* `invalid_file_url` - 422: the file URL when creating a resource is invalid.
* `invalid_image_dpi` - 422: DPI must be at least 300.
* `invalid_international_feature` - 422: the specified product cannot be sent to the destination.
* `invalid_perforation_return_envelope` - 422: both `return_envelope` and `perforation` must be used together.
* `invalid_template_html` - 422: the provided HTML is invalid.
* `mail_use_type_can_not_be_null` - 422: use_type must be one of "marketing" or "operational". Alternatively, an admin can set the account default use type in Account Settings.
* `merge_variable_required` - 422: a required merge variable is missing.
* `merge_variable_whitespace` - 422: merge variable names cannot contain whitespace.
* `payment_method_unverified` - 401: you must have a verified bank account or credit card to submit live requests.
* `pdf_encrypted` - 422: an encrypted PDF was provided.
* `special_characters_restricted` - 422: cannot use special characters for merge variable names.
* `unembedded_fonts` - 422: the provided PDF contains non-standard unembedded fonts. See description for details.
**AUTHENTICATION**
* `email_required` - 401: account must have a verified email address before creating live resources.
* `invalid_api_key` - 401/403: the API key is invalid.
* `publishable_key_not_allowed` - 403: the requested operation needs a secret key, not a publishable key. See [API Keys](#section/API-Keys) for more information.
* `rate_limit_exceeded` - 429: requests were sent too quickly and must be slowed down.
* `unauthorized` - 401: the request isn''t authorized.
* `unauthorized_token` - 401: token isn''t authorized.
'
failure_status_code:
type: integer
enum:
- 401
- 403
- 404
- 413
- 422
- 429
- 500
description: "A conventional HTTP status code:\n * `401` - Authorization error with your API key or account\n * `403` - Forbidden error with your API key or account\n * `404` - The requested item does not exist\n * `413` - Payload too large\n * `
# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lobcom/refs/heads/main/openapi/lobcom-cards-api-openapi.yml