API Documentation
Introduction
Integrate OncePDF's powerful PDF processing capabilities directly into your application. Our RESTful API allows you to automate merging, splitting, and converting PDFs with ease.
# Base URL
https://api.oncepdf.com/v1
https://api.oncepdf.com/v1
Authentication
All API requests require an API key passed in the `Authorization` header.
Authorization: Bearer YOUR_API_KEY
Endpoints
POST
/merge
Merge multiple PDF files into one.
GET
/status/{id}
Check the processing status of a file.
Webhooks
Stay notified about file processing results without polling. Configure a webhook URL in your dashboard to receive real-time updates.
# Webhook Request Body
{
"event": "file.processed",
"id": "f_982k1",
"url": "https://oncepdf.com/d/abc123def"
}
{
"event": "file.processed",
"id": "f_982k1",
"url": "https://oncepdf.com/d/abc123def"
}
Error Codes
We use standard HTTP response codes to indicate the success or failure of an API request.
| Code | Description |
|---|---|
| 400 | Bad Request - Often due to missing parameters. |
| 401 | Unauthorized - Invalid or missing API key. |
| 429 | Too Many Requests - Rate limit exceeded. |
| 500 | Server Error - Something went wrong on our end. |