Lob

Lob Files API

The Files API from Lob — 1 operation(s) for files.

Operations 1

POST /uploads/{upl_id}/file Upload file #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lob-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lob-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lob Files API
  version: 1.20.2
  description: Experience direct mail like never before, with unmatched personalization and scalability  all in one intuitive platform.
  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: Files
paths:
  /uploads/{upl_id}/file:
    parameters:
    - in: path
      name: upl_id
      description: ID of the upload
      required: true
      schema:
        $ref: '#/components/schemas/upl_id'
    post:
      operationId: upload_file
      summary: Upload file
      description: Upload an [audience file](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide) and associate it with an upload.
      tags:
      - Files
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upload_file'
        '422':
          $ref: '#/components/responses/upload_validation_error'
      x-codeSamples:
      - lang: Shell
        source: "curl -X POST https://api.lob.com/v1/uploads/upl_71be866e430b11e9/file \\\n  -u <YOUR API KEY>: \\\n  -F file=@<YOUR FILE NAME HERE>\n"
        label: CURL
      - lang: Python
        source: "with ApiClient(configuration) as api_client:\n  api = UploadsApi(api_client)\n\ntry:\n  res = api.upload_file(\"upl_71be866e430b11e9\", open(\"<PATH_TO_CSV>\", \"rb\"))\nexcept ApiException as e:\n  print(e)\n"
        label: PYTHON
components:
  responses:
    upload_validation_error:
      description: Validation Error
      content:
        application/json:
          schema:
            title: HTTPValidationError
            type: object
            properties:
              detail:
                title: Detail
                type: array
                items:
                  title: ValidationError
                  required:
                  - loc
                  - msg
                  - type
                  type: object
                  properties:
                    loc:
                      title: Location
                      type: array
                      items:
                        anyOf:
                        - type: string
                        - type: integer
                    msg:
                      title: Message
                      type: string
                    type:
                      title: Error Type
                      type: string
  schemas:
    upload_file:
      type: object
      required:
      - message
      - filename
      properties:
        message:
          title: Message
          enum:
          - File uploaded successfully
          type: string
          default: File uploaded successfully
        filename:
          title: Filename
          type: string
    upl_id:
      type: string
      description: Unique identifier prefixed with `upl_`.
      pattern: ^upl_[a-zA-Z0-9]+$
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
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
  - Snap Packs
  - Booklets
  - Bank Accounts
  - Templates
  - Template Versions
  - Template Design
  - Manage Mail
- name: Campaigns API (BETA)
  tags:
  - Campaigns
  - Creatives
  - Uploads
- name: Informed Delivery Campaign API
  tags:
  - Informed Delivery Campaign
- name: Address Verification API
  tags:
  - US Verifications
  - US Verification Types
  - US Autocompletions
  - Reverse Geocode Lookups
  - Zip Lookups
  - Identity Validation
  - Intl Verifications
- name: Webhooks
  tags:
  - Webhooks
  - Events
  - Tracking Events
- name: Special Features
  tags:
  - Billing Groups
  - Buckslips
  - Buckslip Orders
  - Cards
  - Card Orders
  - QR Codes
  - URL Shortener
- name: Appendix
  tags:
  - Beta Program
  - Errors
  - Rate Limiting
  - Requests and Responses
  - Test and Live Environments
  - Versioning and Changelog