Getting Started


API Access Key & Authentication

After signing up, every user is assigned a personal API Access Key—a unique "password" used to make requests to the pdflayer API.

To authenticate with the PDFlayer API, simply attach your access_key to the base endpoint URL:

Get free API Access Key

HTTP GET & POST

The PDFlayer API and its functionality are primarily configured for use via HTTP POST. For customers looking to make API requests via HTTP GET the PDFlayer API is also capable of handling GET API requests using its straightforward URL structure.

However, some API functionalities are not supported using HTTP GET. Throughout this documentation you will occasionally come across HTTP POST only tags, indicating that the respective API feature or parameter is only supported via HTTP POST.

256-bit HTTPS Encryption

All Customers may establish a secure connection (industry-standard SSL) to the PDFlayer API, simply by attaching an s to the HTTP Protocol.

Important: Please be advised that when processing sensitive data through third party services it is highly recommended to always connect securely via https.

Rate Limits

Requests to the API are rate-limited based on your current subscription plan:

Subscription PlanRate Limit
Free2 Requests / Minute
Basic30 Requests / Minute
Professional45 Requests / Minute
Enterprise45 Requests / Minute

Important: In order to ensure maximum API performance, we recommend Basic, Professional and Enterprise Plan users to limit their usage to a maximum of 1 API request per 2 seconds.

If your rate limit for a given minute has been exceeded, the API will return an error carrying the type rate_limit_reached. This error is listed in the API Error Codes section below.

API Error Codes

If your query fails, the PDFlayer API will return "success": false, along with a 3-digit error-code, an internal error type and a plain text "info" object containing suggestions for the user.

Find below an example error - triggered when no URL was specified:

Common API errors:

TypeMessageDescription
404"404_not_found"User requested a resource which does not exist.
101"missing_access_key"User did not supply an Access Key.
101"invalid_access_key"User entered an invalid Access Key.
103"invalid_api_function"User requested a non-existent API endpoint or function.
311"invalid_document_url"User did not provide a syntactically valid document URL.
104"usage_limit_reached"User has reached or exceeded his Subscription Plan's monthly API Request Allowance.
106"rate_limit_reached"User has exceeded the maximum allowed rate limitation and is referred to the "Rate Limits" section of the API Documentation.
102"inactive_user"The user's account is not active. User will be prompted to get in touch with Customer Support.
312"document_url_not_found"The specified document URL could not be found [Status: 404].
313"missing_document_source"User did not specify a document source. User will be prompted to specify either document_url or document_html

Important: This list of errors is not conclusive. If you come across an error message you are not sure about, please contact support at [email protected]

Sandbox Mode

For document testing and debugging, the PDFlayer API provides a Sandbox (testing) mode that allows users to make API requests that do not count toward their monthly API request volume. To enter Sandbox mode, simply append the API's test parameter and set it to 1.

Example API Request:

Please Note: Sandbox API requests always come with a red "Sample" watermark image.

Secret Key

For users who intend to expose API request URLs on their website, it is highly recommended to use the PDFlayer API's URL encryption method, which generates a unique Secret Key for each API request and lets you append it to the respective API request URL.

To prevent your publicly displayed API request URL from being abused, please follow the steps below:

Step 1: Define your document URL

First of all, define the URL of the website you want to generate a PDF from.

In our example, we will use the following URL:

Step 2: Define your Secret Keyword

A Secret Keyword can be any secret word or phrase of your choice. As the next step, please ensure it is defined in your account dashboard. If not, you can simply add a secret keyword here.

In our example, we will use the following Secret Keyword:

Step 3: Combine

Now you will need to combine these two parts (URL & secret keyword) into one, resulting in:

Step 4: Generate your md5 Secret Key

Finally, create an md5 hash of the combined parts. (this will be your secret_key)

Now that you have your Secret Key, you can simply append to your API request URL using the API's secret_key parameter and rest assured that your API access is - as long as you'll keep your Secret Keyword secret - safe from abuse.

Sample API Request:

Important: Please note that as long a Secret Keyword is specified in your Account Dashboard it the use of the document_html parameter is not possible.

 

Questions? Contact Sales .
Need help? Contact Support .
© 2025 APILayer. All rights reserved.