---
title: "Barcodes Generator"
method: POST
path: "/v1/barcode/generate"
tags: ["Barcodes"]
---

# Barcodes Generator

`POST /v1/barcode/generate`

Generate high quality barcode images. Supports QR Code, Datamatrix, Code 39, Code 128, PDF417 and many other barcode types.

## Request body

- object
  - `value` string — Barcode value.
  - `type` 'AustralianPostCode' | 'Aztec' | 'Codabar' | 'CodablockF' | 'Code128' | 'Code16K' | 'Code39' | 'Code39Extended' | 'Code39Mod43' | 'Code39Mod43Extended' | 'Code93' | 'DataMatrix' | 'DPMDataMatrix' | 'EAN13' | 'EAN2' | 'EAN5' | 'EAN8' | 'GS1DataBarExpanded' | 'GS1DataBarExpandedStacked' | 'GS1DataBarLimited' | 'GS1DataBarOmnidirectional' | 'GS1DataBarStacked' | 'GTIN12' | 'GTIN13' | 'GTIN14' | 'GTIN8' | 'IntelligentMail' | 'Interleaved2of5' | 'ITF14' | 'MaxiCode' | 'MICR' | 'MicroPDF' | 'MSI' | 'PatchCode' | 'PDF417' | 'Pharmacode' | 'PostNet' | 'PZN' | 'QRCode' | 'RoyalMail' | 'RoyalMailKIX' | 'Trioptic' | 'UPCA' | 'UPCE' | 'UPU' — Set the barcode type to be used. See available barcode types in the [Supported Barcode Types](/api/barcode/overview#supported-barcode-types)
  - `decorationimage` string
  - `name` string — File name for generated output.
  - `async` boolean — Set `async` to `true` for long processes to run in the background, API will then return a `jobId` which you can use with the [Background Job Check endpoint](/api/job-check). Also see [Webhooks & Callbacks](/api/webhooks)
  - `timeout` number — Timeout for output links in seconds
  - `expiration` number — Sets the expiration time for the output link, in minutes. After this period, generated output file(s) are automatically deleted from [PDF.co Temporary Files Storage](/api/file-upload/overview). The maximum allowed duration depends on your subscription plan. For permanent storage of input files (e.g., reusable images, PDF templates, documents), use `PDF.co Built‑In Files Storage`.
  - `inline` boolean — Set to true to return results inside the response. Otherwise, the endpoint will return a URL to the output file generated.
  - `profiles` string — Profiles are used configure extra options for specific API endpoints and may be unique to an API. For more information, see [Profiles](/api/profiles) and the documentation of each endpoint for profiles specific to it.

## Response `200`

Success.

- object
  - `status` string — Status of the API response.
  - `message` string — Descriptive message for the response status.
  - `url` string, uri — URL to the output file.
  - `jobId` string — Unique identifier for the job.
  - `credits` integer — Credits used for this operation.
  - `remainingCredits` integer — Credits remaining after this operation.
  - `duration` integer — Time taken to complete the request, in milliseconds.

## Other responses

- `400` — Bad request. Typically due to bad input parameters or unreachable input URLs (e.g., access restrictions like login or password).
- `401` — Unauthorized. Authentication is required and has failed or has not yet been provided.
- `402` — Not enough credits.
- `403` — Access forbidden for input URL.
- `404` — The requested resource could not be found.
- `408` — The server timed out waiting for the request.
- `429` — Too many requests in a given time period.
- `441` — Invalid Password. Password protected document.
- `442` — Input document is damaged or of incorrect type.
- `443` — Permissions. The operation is prohibited by document security settings. You can turn off this check by setting the `profiles` param to `{CheckPermissions: false}`. Important: only use this if you are the owner or have legal permission.
- `444` — Profiles parsing error. Please ensure that the configuration is supported. See `/profiles` samples.
- `445` — Timeout error. For large documents, use asynchronous mode (`async=true`) and check status via `/job/check`. For many-page files, use the `pages` parameter.
- `446` — Some files required for conversion are missing.
- `447` — Invalid template.
- `448` — Invalid URL or HTML. Ensure the provided URL is valid and accessible.
- `449` — Invalid index range. Page index is out of range. Use `/pdf/info` to get page count. First page is `0`.
- `450` — Invalid page range specified.
- `452` — Invalid URL.
- `454` — Invalid parameters.
- `500` — Something went wrong. Please try again or contact support.

---

[API](https://skmtc.dev/pdf/apis/pdf-co-api.md) · [All operations](https://skmtc.dev/pdf/apis/pdf-co-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pdf/pdf-co-api/revisions/725c46c75153/schema)
