Lob.com Campaigns API

The campaigns endpoint allows you to create and view campaigns that can be used to send multiple letters or postcards. The API provides endpoints for creating campaigns, updating campaigns, retrieving individual campaigns, listing campaigns, and deleting campaigns.

OpenAPI Specification

lobcom-campaigns-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lob Campaigns 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: Campaigns
  description: 'The campaigns endpoint allows you to create and view campaigns that can be used to send multiple letters or postcards.

    The API provides endpoints for creating campaigns, updating campaigns, retrieving individual campaigns, listing campaigns, and deleting

    campaigns.

    '
paths:
  /campaigns:
    get:
      operationId: campaigns_list
      summary: List
      description: Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first.
      tags:
      - Campaigns
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/include'
      - $ref: '#/components/parameters/before_after'
      responses:
        '200':
          $ref: '#/components/responses/all_campaigns'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/campaigns \\\n  -u <YOUR API KEY>:\n"
        label: CURL
      - lang: Ruby
        source: "campaignsApi = CampaignsApi.new(config)\n\nbegin\n  campaigns = campaignsApi.list({ limit: 2 })\nrescue => err\n  p err.message\nend\n"
        label: RUBY
    post:
      operationId: campaign_create
      summary: Create
      description: Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/launch-your-first-campaign).
      tags:
      - Campaigns
      parameters:
      - $ref: '#/components/parameters/lang_spec'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaign_writable'
            example:
              name: My Demo Campaign
              description: My Campaign's description
              schedule_type: immediate
              print_speed: core
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/campaign_writable'
            encoding:
              example-prop:
                style: deepObject
                explode: true
            example:
              name: My Demo Campaign
              description: My Campaign's description
              schedule_type: immediate
              print_speed: core
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/campaign_writable'
            example:
              name: My Demo Campaign
              description: My Campaign's description
              schedule_type: immediate
              print_speed: core
      responses:
        '200':
          description: Campaign created successfully
          content:
            $ref: '#/components/mediaTypes/campaign'
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/campaigns \\\n  -u <YOUR API KEY>: \\\n  -d \"name=My First Campaign\" \\\n  -d \"schedule_type=immediate\" \\\n  -d \"print_speed=core\"\n"
        label: CURL
      - lang: Ruby
        source: "campaignCreate = CampaignWritable.new({\n  name: \"My First Campaign\",\n  schedule_type: \"immediate\",\n  print_speed: \"core\",\n});\n\ncampaignApi = CampaignsApi.new(config)\n\nbegin\n  createdCampaign = campaignApi.create(campaignCreate)\nrescue => err\n  p err.message\nend\n"
        label: RUBY
  /campaigns/{cmp_id}:
    parameters:
    - in: path
      name: cmp_id
      description: id of the campaign
      required: true
      schema:
        $ref: '#/components/schemas/cmp_id'
    get:
      operationId: campaign_retrieve
      summary: Retrieve
      description: Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.
      tags:
      - Campaigns
      responses:
        '200':
          description: Returns a campaign object
          content:
            $ref: '#/components/mediaTypes/campaign'
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \\\n  -u <YOUR API KEY>:\n"
        label: CURL
      - lang: Ruby
        source: "campaignApi = CampaignsApi.new(config)\n\nbegin\n  retrievedCampaign = campaignApi.get(\"cmp_e05ee61ff80764b\")\nrescue => err\n  p err.message\nend\n"
        label: RUBY
    patch:
      operationId: campaign_update
      summary: Update
      description: Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation.
      tags:
      - Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaign_updatable'
            example:
              description: Test campaign
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/campaign_updatable'
            example:
              description: Test campaign
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/campaign_updatable'
            example:
              description: Test campaign
      responses:
        '200':
          description: Returns a campaign object
          content:
            $ref: '#/components/mediaTypes/campaign'
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
      - lang: Shell
        source: "curl -X PATCH https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \\\n  -u <YOUR API KEY>: \\\n  -d \"description=Awesome campaign\"\n"
        label: CURL
      - lang: Python
        source: "campaign_updatable = CampaignUpdatable(\n  description = \"Awesome campaign\",\n)\n\nwith ApiClient(configuration) as api_client:\n  api = CampaignsApi(api_client)\n\ntry:\n  updated_campaign = api.update(\"cmp_e05ee61ff80764b\", campaign_updatable)\nexcept ApiException as e:\n  print(e)\n"
        label: PYTHON
      - lang: Ruby
        source: "campaignUpdatable = CampaignUpdatable.new({\n  description: \"Awesome campaign\",\n})\n\ncampaignApi = CampaignsApi.new(config)\n\nbegin\n  updatedCampaign = campaignApi.update(\"cmp_e05ee61ff80764b\", campaignUpdatable)\nrescue => err\n  p err.message\nend\n"
        label: RUBY
    delete:
      operationId: campaign_delete
      summary: Delete
      description: Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign's `send_date` matches its associated mail pieces' `send_date`s.
      tags:
      - Campaigns
      responses:
        '200':
          $ref: '#/components/responses/campaign_deleted'
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
      - lang: Shell
        source: "curl -X DELETE https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \\\n  -u <YOUR API KEY>:\n"
        label: CURL
      - lang: Ruby
        source: "campaignApi = CampaignsApi.new(config)\n\nbegin\n  deletedCampaign = campaignApi.delete(\"cmp_e05ee61ff80764b\")\nrescue => err\n  p err.message\nend\n"
        label: RUBY
  /campaigns/{cmp_id}/send:
    parameters:
    - in: path
      name: cmp_id
      description: id of the campaign
      required: true
      schema:
        $ref: '#/components/schemas/cmp_id'
    post:
      operationId: campaign_send
      summary: Send Campaign
      description: Sends a campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.
      tags:
      - Campaigns
      responses:
        '200':
          description: Returns a campaign object
          content:
            $ref: '#/components/mediaTypes/campaign'
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b/send \\\n  -u <YOUR API KEY>:\n"
        label: CURL
components:
  schemas:
    creative:
      allOf:
      - $ref: '#/components/schemas/lob_base'
      - $ref: '#/components/schemas/returned_resource'
      - type: object
        required:
        - id
        - description
        - from
        - resource_type
        - details
        - metadata
        - template_preview_urls
        - template_previews
        - campaigns
        - date_created
        - date_modified
        - object
        - deleted
        properties:
          deleted:
            type: boolean
            description: Whether the resource has been deleted.
          id:
            $ref: '#/components/schemas/crv_id'
          template_preview_urls:
            title: Template Preview URLs
            type: object
            description: Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. An empty object will be returned if no `template_preview`s have been generated.
          template_previews:
            title: Template Previews
            type: array
            items:
              type: object
            description: A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). An empty array will be returned if no `template_preview`s have been generated for the creative.
          campaigns:
            $ref: '#/components/schemas/campaign_list'
          object:
            type: string
            description: Value is resource type.
            enum:
            - creative
            default: creative
    cmp_id:
      type: string
      title: Campaign id
      description: Unique identifier prefixed with `cmp_`.
      pattern: ^cmp_[a-zA-Z0-9]+$
    campaign:
      allOf:
      - $ref: '#/components/schemas/lob_base'
      - $ref: '#/components/schemas/campaign_writable'
      - type: object
        required:
        - id
        - name
        - description
        - schedule_type
        - use_type
        - is_draft
        - creatives
        - uploads
        - auto_cancel_if_ncoa
        - date_created
        - date_modified
        - object
        properties:
          id:
            $ref: '#/components/schemas/cmp_id'
          is_draft:
            description: Whether or not the campaign is still a draft.
            type: boolean
            default: true
          creatives:
            description: An array of creatives that have been associated with this campaign.
            type: array
            items:
              $ref: '#/components/schemas/creative'
            minItems: 0
          uploads:
            description: A single-element array containing the upload object that is assocated with this campaign.
            type: array
            items:
              $ref: '#/components/schemas/upload'
            minItems: 0
            maxItems: 1
          object:
            type: string
            description: Value is resource type.
            enum:
            - campaign
            default: campaign
          use_type:
            $ref: '#/components/schemas/cmp_use_type'
    upload_writable:
      type: object
      required:
      - campaignId
      properties:
        campaignId:
          allOf:
          - $ref: '#/components/schemas/cmp_id'
          - description: Associated Campaign ID
            type: string
            example: cmp_1933ad629bae1408
        requiredAddressColumnMapping:
          $ref: '#/components/schemas/required_address_column_mapping'
        optionalAddressColumnMapping:
          $ref: '#/components/schemas/optional_address_column_mapping'
        metadata:
          $ref: '#/components/schemas/uploads_metadata'
        mergeVariableColumnMapping:
          $ref: '#/components/schemas/merge_variable_column_mapping'
          description: test
    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  * `422` - The query or body parameters did not pass validation\n  * `429` - Too many requests have been sent with an API key in a given amount of time\n  * `500` - An internal server error occurred, please contact support@lob.com\n"
    merge_variable_column_mapping:
      title: Merge Variable Mapping
      type:
      - object
      - 'null'
      default: null
      example:
        name: recipient_name
        gift_code: code
        qr_code_redirect_url: redirect_url
      description: The mapping of column headers in your file to the merge variables present in your creative. See our <a href="https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#step-3-map-merge-variable-data-if-applicable-7" target="_blank">Campaign Audience Guide</a> for additional details. <br />If a merge variable has the same "name" as a "key" in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects, then they **CANNOT** have a different value in this object. If a different value is provided, then when the campaign is processing it will get overwritten with the mapped value present in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects. The redirect URLs for QR codes can also be customized using this mapping. If the URL has a variable and the variable mapping existsing here, then data from the respective column in the audience file will be merged into the URL template.
    address_fields_us:
      type: object
      required:
      - address_line1
      - address_city
      - address_state
      - address_zip
      properties:
        address_line1:
          type: string
          description: The primary number, street name, and directional information.
          maxLength: 64
        address_line2:
          type:
          - string
          - 'null'
          description: An optional field containing any information which can't fit into line 1.
          maxLength: 64
        address_city:
          type: string
          maxLength: 200
        address_state:
          type: string
          description: 2 letter state short-name code
          pattern: ^[a-zA-Z]{2}$
        address_zip:
          type: string
          description: 'Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.

            '
          pattern: ^\d{5}(-\d{4})?$
    returned_resource:
      oneOf:
      - allOf:
        - title: Postcard Creative
          required:
          - resource_type
          - details
          properties:
            resource_type:
              type: string
              description: Mailpiece type for the creative
              enum:
              - postcard
            details:
              $ref: '#/components/schemas/returned'
        - $ref: '#/components/schemas/creative_base'
      - allOf:
        - title: Letter Creative
          required:
          - from
          - resource_type
          - details
          properties:
            resource_type:
              type: string
              description: Mailpiece type for the creative
              enum:
              - letter
            details:
              $ref: '#/components/schemas/returned-3'
        - $ref: '#/components/schemas/creative_base'
      - allOf:
        - title: Self Mailer Creative
          required:
          - resource_type
          - details
          properties:
            resource_type:
              type: string
              description: Mailpiece type for the creative
              enum:
              - self_mailer
            details:
              $ref: '#/components/schemas/returned-4'
        - $ref: '#/components/schemas/creative_base'
    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'
    mail_type:
      type: string
      enum:
      - usps_first_class
      - usps_standard
      description: 'A string designating the mail postage type:

        * `usps_first_class` - (default)

        * `usps_standard` - a <a href="https://lob.com/pricing/print-mail#compare" target="_blank">cheaper option</a> which is

        less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6`

        postcards or for any postcards sent outside of the United States.

        '
      default: usps_first_class
    date_modified:
      type: string
      format: date-time
      description: A timestamp in ISO 8601 format of the date the resource was last modified.
    required_address_column_mapping:
      title: Required Address Columns
      type: object
      required:
      - name
      - address_line1
      - address_city
      - address_state
      - address_zip
      properties:
        name:
          type:
          - string
          - 'null'
          default: null
          description: The column header from the csv file that should be mapped to the required field `name`
        address_line1:
          type:
          - string
          - 'null'
          default: null
          description: The column header from the csv file that should be mapped to the required field `address_line1`
        address_city:
          type:
          - string
          - 'null'
          default: null
          description: The column header from the csv file that should be mapped to the required field `address_city`
        address_state:
          type:
          - string
          - 'null'
          default: null
          description: The column header from the csv file that should be mapped to the required field `address_state`
        address_zip:
          type:
          - string
          - 'null'
          default: null
          description: The column header from the csv file that should be mapped to the required field `address_zip`
      example:
        name: recipient_name
        address_line1: primary_line
        address_city: city
        address_state: state
        address_zip: zip_code
      description: The mapping of column headers in your file to Lob-required fields for the resource created. See our <a href="https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#required-columns-2" target="_blank">Campaign Audience Guide</a> for additional details.
    campaign_item:
      allOf:
      - $ref: '#/components/schemas/campaign_writable'
      - type: object
        required:
        - id
        - name
        - description
        - schedule_type
        - use_type
        - is_draft
        - creatives
        - uploads
        - auto_cancel_if_ncoa
        - date_created
        - date_modified
        - object
        properties:
          id:
            $ref: '#/components/schemas/cmp_id'
          is_draft:
            description: Whether or not the campaign is still a draft.
            type: boolean
            default: true
          creatives:
            description: An array of creatives that have been associated with this campaign.
            type: array
          uploads:
            description: A single-element array containing the upload object that is assocated with this campaign.
            type: array
            minItems: 0
            maxItems: 1
          object:
            type: string
            description: Value is resource type.
            enum:
            - campaign
            default: campaign
          date_created:
            $ref: '#/components/schemas/date_created'
          date_modified:
            $ref: '#/components/schemas/date_modified'
          deleted:
            $ref: '#/components/schemas/deleted'
    campaign_list:
      type: array
      description: Array of campaigns associated with the creative ID
      items:
        $ref: '#/components/schemas/campaign_item'
      example:
      - id: cmp_ed76e33e7ac4d0bd
        name: My postman Campaign 2
        description: Created via postman again
        schedule_type: immediate
        send_date: null
        target_delivery_date: null
        cancel_window_campaign_minutes: null
        metadata: {}
        use_type: null
        is_draft: true
        deleted: false
        creatives: []
        uploads: []
        auto_cancel_if_ncoa: false
        date_created: '2022-07-26T20:20:25.016Z'
        date_modified: '2022-07-26T20:20:25.016Z'
        object: campaign
    metadata:
      type: object
      additionalProperties:
        type: string
      description: 'Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `"` and `\`. i.e. ''{"customer_id" : "NEWYORK2015"}'' Nested objects are not supported.  See [Metadata](#section/Metadata) for more information.'
      maxLength: 500
      pattern: '[^"\\]{0,500}'
    from_attribute:
      title: From
      description: Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification.
      oneOf:
      - $ref: '#/components/schemas/adr_id'
      - $ref: '#/components/schemas/inline_address_us'
    inline_address_us:
      allOf:
      - $ref: '#/components/schemas/address_editable_us'
      - type: object
        required:
        - address_line1
        - address_city
        - address_state
        - address_zip
    company:
      type:
      - string
      - 'null'
      description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. This field can be used for any secondary recipient information which is not part of the actual mailing address (Company Name, Department, Attention Line, etc).

        '
      maxLength: 40
    card_id:
      type: string
      description: Unique identifier prefixed with `card_`.
      pattern: ^card_[a-zA-Z0-9]+$
    campaign_writable:
      type: object
      required:
      - name
      - schedule_type
      - use_type
      properties:
        billing_group_id:
          type:
          - string
          - 'null'
          description: Unique identifier prefixed with `bg_`.
          pattern: ^bg_[a-zA-Z0-9]+$
        name:
          description: Name of the campaign.
          type: string
        description:
          $ref: '#/components/schemas/resource_description'
        schedule_type:
          $ref: '#/components/schemas/cmp_schedule_type'
        target_delivery_date:
          description: If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign.
          type:
          - string
          - 'null'
          format: date-time
        send_date:
          description: If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign.
          type:
          - string
          - 'null'
          format: date-time
        cancel_window_campaign_minutes:
          description: A window, in minutes, within which the campaign can be canceled.
          type:
          - integer
          - 'null'
        metadata:
          $ref: '#/components/schemas/metadata'
        use_type:
          $ref: '#/components/schemas/cmp_use_type'
        auto_cancel_if_ncoa:
          description: Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA.
          type: boolean
        print_speed:
          $ref: '#/components/schemas/print_speed'
    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.

                * `r

# --- truncated at 32 KB (55 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lobcom/refs/heads/main/openapi/lobcom-campaigns-api-openapi.yml