PDF.co Document, File & System API
The Document, File & System API from PDF.co — 17 operation(s) for document, file & system.
The Document, File & System API from PDF.co — 17 operation(s) for document, file & system.
openapi: 3.0.1
info:
title: PDF.co Barcodes Document, File & System API
description: 'PDF.co Web API — programmatic PDF and document automation: AI invoice parsing, document parsing, PDF conversion (to/from PDF, Excel, CSV, JSON, XML, HTML, images), OCR, merging, splitting, compression, barcodes, e-signature workflows, and more. Authenticated via the x-api-key header.'
version: '1.0'
contact:
name: PDF.co Support
url: https://support.pdf.co/en
email: support@pdf.co
license:
name: Proprietary
url: https://pdf.co/terms
termsOfService: https://pdf.co/terms
servers:
- url: https://api.pdf.co
security:
- ApiKeyAuth: []
tags:
- name: Document, File & System
paths:
/v2/pdf/compress:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/pdf-compress
operationId: post_v2_pdf_compress
requestBody:
content:
application/json:
schema:
type: object
properties:
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-compress/sample.pdf
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
name:
$ref: '#/components/schemas/name'
config:
type: object
additionalProperties: true
description: For more information, see the [PDF Compress Configuration options](/api-reference/pdf-compress#config).
default:
images:
color:
skip: false
downsample:
skip: false
downsample_ppi: 150
threshold_ppi: 225
compression:
skip: false
compression_format: jpeg
compression_params:
quality: 60
grayscale:
skip: false
downsample:
skip: false
downsample_ppi: 150
threshold_ppi: 225
compression:
skip: false
compression_format: jpeg
compression_params:
quality: 60
monochrome:
skip: false
downsample:
skip: false
downsample_ppi: 300
threshold_ppi: 450
compression:
skip: false
compression_format: ccitt_g4
compression_params: {}
save:
garbage: 4
additionalProperties: false
required:
- url
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
summary: PDF Compress
description: Compress PDF files to reduce their size.
/v1/pdf/optimize:
post:
tags:
- Document, File & System
deprecated: true
x-mint:
href: /api-tester/pdf-optimize
summary: PDF Optimize
operationId: post_v1_pdf_optimize
requestBody:
content:
application/json:
schema:
type: object
properties:
file:
$ref: '#/components/schemas/file'
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-optimize/sample.pdf
name:
allOf:
- $ref: '#/components/schemas/name'
default: output.pdf
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
password:
$ref: '#/components/schemas/password'
timeout:
$ref: '#/components/schemas/timeout'
expiration:
$ref: '#/components/schemas/expiration'
profiles:
allOf:
- $ref: '#/components/schemas/profiles'
default: '{ ''ImageOptimizationFormat'': ''JPEG'', ''JPEGQuality'': 25, ''ResampleImages'': true, ''ResamplingResolution'': 120, ''GrayscaleImages'': false }'
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required:
- url
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
description: Optimize a PDF file to reduce its size.
/v1/pdf/info:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/pdf-info-reader
summary: PDF Info Reader
operationId: post_v1_pdf_info
requestBody:
content:
application/json:
schema:
type: object
properties:
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/encryption/sample_encrypted_aes128.pdf
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
password:
$ref: '#/components/schemas/password'
file:
$ref: '#/components/schemas/file'
timeout:
$ref: '#/components/schemas/timeout'
expiration:
$ref: '#/components/schemas/expiration'
profiles:
allOf:
- $ref: '#/components/schemas/profiles'
default: '{ ''DataDecryptionAlgorithm'': ''AES128'', ''DataDecryptionKey'': ''HelloThisKey1234'', ''DataDecryptionIV'': ''TreloThisKey1234'' }'
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required:
- url
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
description: Get detailed information about a PDF document, it’s properties and security permissions.
/v1/job/check:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/job-check
summary: Background & Job Check
operationId: post_v1_job_check
requestBody:
content:
application/json:
schema:
required:
- jobid
type: object
properties:
jobid:
type: string
description: Id of processing that was started asynchronously
default: '12345'
timeout:
$ref: '#/components/schemas/timeout'
force:
type: boolean
additionalProperties: false
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
description: Checks the [status](/api-reference/job-check/available-status-values) of a background job that was previously created with PDF.co API. Use this API to check the status of your asynchronous API calls.
/v1/account/credit/balance:
get:
tags:
- Document, File & System
x-mint:
href: /api-tester/account-balance-info
summary: Get Account Balance Info
operationId: get_v1_account_credit_balance
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
description: ''
/v1/pdf/classifier:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/document-classifier
operationId: post_v1_pdf_classifier
requestBody:
content:
application/json:
schema:
type: object
properties:
file:
$ref: '#/components/schemas/file'
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/document-parser/sample-invoice.pdf
rulescsv:
type: string
rulescsvurl:
type: string
casesensitive:
$ref: '#/components/schemas/casesensitive'
password:
$ref: '#/components/schemas/password'
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
timeout:
$ref: '#/components/schemas/timeout'
profiles:
$ref: '#/components/schemas/profiles'
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required:
- url
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
summary: Document Classifier
description: Automatically find class of input PDF, JPG, PNG document by analyzing its content using the built-in AI or custom defined classification rules.
/v1/email/send:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/email/send
operationId: post_v1_email_send
requestBody:
content:
application/json:
schema:
required:
- from
- smtppassword
- smtpserver
- smtpusername
- subject
- to
- url
type: object
properties:
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-info/sample.pdf
from:
type: string
default: John Doe <john@example.com>
to:
type: string
default: Partner <partner@example.com>
replyto:
type: string
cc:
type: string
bcc:
type: string
subject:
type: string
default: Check attached sample pdf
bodytext:
type: string
default: Please check the attached pdf
bodyhtml:
type: string
default: Please check the attached pdf
smtpserver:
type: string
default: smtp.gmail.com
smtpport:
type: string
default: '587'
smtpusername:
type: string
default: my@gmail.com
smtppassword:
type: string
default: app specific password created as https://support.google.com/accounts/answer/185833
name:
$ref: '#/components/schemas/name'
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
timeout:
$ref: '#/components/schemas/timeout'
expiration:
$ref: '#/components/schemas/expiration'
profiles:
$ref: '#/components/schemas/profiles'
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
summary: Send Email with File
description: Send an email. An email can be with or without attachment.
/v1/email/decode:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/email/decode
summary: Extract Data from Email File
operationId: post_v1_email_decode
requestBody:
content:
application/json:
schema:
type: object
properties:
file:
$ref: '#/components/schemas/file'
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/email-extractor/sample.eml
inline:
allOf:
- $ref: '#/components/schemas/inline'
default: true
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
profiles:
$ref: '#/components/schemas/profiles'
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required:
- url
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
description: Decode an email message to extract its components.
/v1/email/extract-attachments:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/email/extract-attachments
summary: Extract Email Attachment
operationId: post_v1_email_extract-attachments
requestBody:
content:
application/json:
schema:
type: object
properties:
file:
$ref: '#/components/schemas/file'
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdfco-test-files.s3.us-west-2.amazonaws.com/email-extractor/sample.eml
inline:
allOf:
- $ref: '#/components/schemas/inline'
default: true
async:
allOf:
- $ref: '#/components/schemas/async'
default: false
profiles:
$ref: '#/components/schemas/profiles'
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required:
- url
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
description: Extract attachments from an email
/v1/file/upload:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/file-upload/upload
summary: Upload Small File
operationId: post_v1_file_upload
requestBody:
content:
application/json:
schema:
required:
- file
type: object
properties:
file:
$ref: '#/components/schemas/file'
name:
$ref: '#/components/schemas/name'
additionalProperties: false
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
$ref: '#/components/responses/ProfilesParsingError'
'445':
$ref: '#/components/responses/TimeoutError'
'446':
$ref: '#/components/responses/MissingFiles'
'447':
$ref: '#/components/responses/InvalidTemplate'
'448':
$ref: '#/components/responses/InvalidUrlOrHtml'
'449':
$ref: '#/components/responses/InvalidIndexRange'
'450':
$ref: '#/components/responses/InvalidPageRange'
'452':
$ref: '#/components/responses/InvalidUrl'
'454':
$ref: '#/components/responses/InvalidParameters'
'500':
$ref: '#/components/responses/InternalServerError'
x-codegen-request-body-name: body
description: 'Uploads a small (up to 100KB) local file as a temporary file in PDF.co storage. Note: temporary files are automatically permanently removed after 1 hour.'
/v1/file/delete:
post:
tags:
- Document, File & System
x-mint:
href: /api-tester/file-upload/delete
summary: Delete Temporary File
operationId: post_v1_file_delete
requestBody:
content:
application/json:
schema:
required:
- url
type: object
properties:
url:
allOf:
- $ref: '#/components/schemas/url'
default: https://pdf-temp-files.s3.amazonaws.com/b5c1e67d98ab438292ff1fea0c7cdc9d/sample.pdf
httpusername:
$ref: '#/components/schemas/httpusername'
httppassword:
$ref: '#/components/schemas/httppassword'
additionalProperties: false
required: false
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/NotEnoughCredits'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'408':
$ref: '#/components/responses/Timeout'
'429':
$ref: '#/components/responses/TooManyRequests'
'441':
$ref: '#/components/responses/InvalidPassword'
'442':
$ref: '#/components/responses/DamagedDocument'
'443':
$ref: '#/components/responses/PermissionsError'
'444':
# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pdf-co/refs/heads/main/openapi/pdf-co-document-file-system-api-openapi.yml