Skip to main content
cURL

POST /v1/pdf/convert/to/pdfa

This endpoint converts a source PDF to the PDF/A-3b archival format and validates the converted file with veraPDF, the open-source PDF/A validator. When conversion and validation complete, the final job result includes both the converted PDF and the validation report, even if the output is non-compliant. The initial response contains neither file. Rejected inputs and failed conversion or validation can leave one or both files unavailable; see Understanding the validation result and Forms, JavaScript, metadata and signatures.

Quick start

A request containing only url is enough to start a conversion.
Request body
To see the request size limits, please refer to the Request Size Limits.

Asynchronous only

This endpoint has no synchronous mode and no async parameter. Every request runs in the background, and the first response returns a jobId rather than the PDF or report URL.
An accepted job follows these stages unless input inspection, conversion or validation fails:
  1. You submit the request, and PDF.co accepts the job and returns its jobId.
  2. The source PDF is converted to PDF/A-3b.
  3. veraPDF validates the converted file and produces the report.
  4. The job is finalized, and the PDF and report links become available.
Retrieve the final result by polling the Background Job Check endpoint with the jobId, or by supplying a callback URL — see Webhooks & Callbacks.

Request body

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" } There are no query parameters.
string
required
URL of the source PDF. The endpoint processes the complete document. The URL must be reachable by PDF.co — see supported file sources. For a protected source location, provide a temporary or presigned URL.
string
Callback URL notified when the job finishes. Use it instead of polling. See Webhooks & Callbacks.
string
Output file name. If omitted, it derives the name from url when possible. The validation report is named after the output file.
integer
default:"60"
Number of minutes before the temporary output and report URLs expire. After this period, generated files are deleted from PDF.co Temporary Files Storage. The maximum retention depends on your subscription plan and is capped at seven days for PDF/A. See Link expiry and retention.
The generateReport, pdfaVersion, and compatibilityPolicy fields are accepted for backward compatibility but ignored. They cannot disable validation or change the output format. Validation always runs, and the output profile is always PDF/A-3b.

Responses

The initial response confirms that the job was accepted, returns its jobId, and assigns the planned output file names. It does not guarantee that these files will be produced. Both file links are available when conversion and validation complete.
Submission response
name and validationReportName are assigned when the job is accepted, so you can record the planned output file names before the job finishes. The matching url and validationReportUrl are not known at this point and are returned only if the corresponding files are produced.
When conversion and validation complete, Background Job Check and the callback payload return the converted PDF, the validation result, and the report, as shown below.
Final job result
Errors return error: true with a status code and message. See the response examples and Response Codes.

Understanding the validation result

A job that reaches validation has one of the three validation outcomes below. Input rejection and failures before validation are described separately. The job status and the conformance result are separate answers, so read both.

Input rejection or failure before validation

The job status is failed when input inspection rejects the PDF or processing fails before validation can run. Signed PDFs and password-protected PDFs that require a password are rejected before conversion. These rejections and other pre-validation failures return neither a converted PDF URL nor a validation report URL; read the error message to identify the cause. The separate validator-error outcome below retains the converted PDF URL, but compliance remains unknown. The initial submission can return a jobId before this failure is detected. Read the terminal job-check result or callback for the failure. The failed-job refund rules below apply.

Compliant output

status is success, isCompliant is true, and failedRules and failedChecks are 0. Conversion and validation both completed, and veraPDF confirmed the output conforms to PDF/A-3b.

Non-compliant output

status is success and isCompliant is false.
A successful job can return isCompliant: false. Conversion and validation both ran and the request is charged; the source document was defective in a way the conversion could not resolve. Do not treat status: "success" on its own as proof of conformance — check isCompliant.
The converted PDF and the report are both returned. failedRules and failedChecks give the counts, and the report at validationReportUrl names the specific rules that failed so you can correct the source document.

Validation error

The validator could not run to completion, so compliance is unknown. The job status is failed and the conversion charge is refunded once. The converted PDF is kept and its URL is still returned. No report is returned when none was produced. Check validationReportUrl before attempting to download it.

Charges and refunds

PDF/A conversion is asynchronous only. The processing charge covers only the first page, even for a multi-page PDF. The remaining pages are not charged at completion, polling or callback. The returned pageCount describes the output, not the number of billable pages. See Credits per API Function for the endpoint rate. A failed job refunds the original processing debit once, including input rejection, conversion failure and validation error. A completed validation with isCompliant: false is still charged. Job-check fees for polls that returned working are not refunded, and repeatedly checking a failed job does not refund the charge again.

Conversion warnings

Routine CMYK color-space and CropBox preservation are recorded in internal logs. They are not included in warnings. Font, layer, OCR and attachment corrections remain warnings. Ghostscript warnings, including output that cannot be fully classified, are retained.

Forms, JavaScript, metadata and signatures

Conversion rewrites the PDF and has these input-handling limits:
  • Forms: Editable fields may be flattened into page content. The formFieldsChanged detail reports a reduced field count. Review the displayed values in the output; there is no automatic visual comparison or guarantee that every field appearance is preserved.
  • JavaScript and calculated values: JavaScript actions are removed. The saved display is preserved on a best-effort basis. Conversion does not run calculation scripts, recalculate values or correct stale field appearances. If calculations matter, recalculate and update the displayed values in a PDF editor, then save before submitting.
  • Metadata: Creation and modification dates can change, and custom metadata fields can be lost. Preservation of every custom field is not guaranteed.
  • Digital signatures: Digitally signed source PDFs are rejected before conversion because rewriting cannot preserve the original signature on the converted PDF. Empty, unsigned signature fields are allowed. Keep the signed original and submit an unsigned PDF. There is no option to remove signatures during conversion or automatically attach the original.
  • Password protection: Source PDFs that require a password are rejected before conversion. This endpoint has no password parameter. Unlock the PDF before submitting it; supplying a password to this conversion request does not enable processing of a protected input.
An asynchronous submission can return a jobId before input inspection. For a signed input, the terminal job-check result or callback reports failure with a clear signature error. No converted PDF or validation report is produced for this rejection. The existing failed-job refund rules apply. These are conversion limits, not a statement that PDF/A forbids forms or signatures. A new signature may be added after conversion if the signing process keeps the output compliant with PDF/A. Converting to PDF/A rewrites the document. The warnings array reports conversion changes and problems on a best-effort basis, using these codes:
The public response uses warnings. Stored jobs from the earlier details format are also returned under warnings. Validation-report fields are separate.
Both url and validationReportUrl are temporary, signed links that expire. The expiration request field sets the retention time in minutes, subject to your subscription plan and a PDF/A maximum of seven days.
A compliance record that disappears is not a record. If you need a durable audit trail, download both the converted PDF and the validation report and store them yourself. Check outputLinkValidTill and validationReportLinkValidTill for the exact expiry times.

Behavior notes

  • This is a veraPDF validation report, not third-party certification. PDF.co runs the veraPDF engine itself, so the report records what the validator checked and found — it is not an independent certification of the file.
  • The report is a separate JSON file and is never embedded inside the output PDF. Attaching it after validation would change the file, and the report would no longer describe the exact PDF returned.
  • Conversion rewrites the document, so its appearance or interactive features can differ from the original. Reported changes are best-effort and may not cover every difference.
Inconsistent URL Encoding in cURL Output: When using cURL to make API requests, the output JSON may show URL characters encoded as Unicode escape sequences. For example, the ampersand character (&) may appear as \u0026 in the cURL output. This is normal JSON encoding behavior and does not affect the validity of the URL. The URL will function correctly when used, as JSON parsers automatically decode these escape sequences. If you’re parsing the response programmatically, your JSON parser will handle this conversion automatically.