---
title: PDF Resource Upload API Reference
version: 1.0.0
description: Upload one or more PDF files to the server using multipart form-data. Returns an array of file metadata objects, one per uploaded file, each containing a `fileName` and a `fileId` for use in subsequent PDF processing operations (merge, split, compress, status checks, download, delete). Repeat the `file` form field to upload multiple files in a single request. Unsupported file types return a `415` error instead of a partial upload.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 1
operations: 1
schemas: 3
---

## Table of Contents

- [PDF Resource Upload API Reference v1.0.0](#pdf-resource-upload-api-reference-v100)
  - [Authentication](#authentication)
  - [PDF Upload and Download APIs](#pdf-upload-and-download-apis)
    - [uploadResource](#uploadresource)
      - [Parameters](#parameters)
      - [Responses](#responses)
  - [Schemas](#schemas)
    - [ResourceUploadResponse](#resourceuploadresponse)
    - [ResourceUploadRequest](#resourceuploadrequest)
    - [ErrorResponse](#errorresponse)



# PDF Resource Upload API Reference v1.0.0

Upload one or more PDF files to the server using multipart form-data. Returns an array of file metadata objects, one per uploaded file, each containing a `fileName` and a `fileId` for use in subsequent PDF processing operations (merge, split, compress, status checks, download, delete). Repeat the `file` form field to upload multiple files in a single request. Unsupported file types return a `415` error instead of a partial upload.

Base URLs:

* [https://api.apifreaks.com/v1.0](https://api.apifreaks.com/v1.0)

## Authentication

* API Key (ApiKeyAuthHeader)
    - Parameter Name: **X-apiKey**, in: header. Pass your API key via the X-apiKey request header.

* API Key (ApiKeyAuthQuery)
    - Parameter Name: **apiKey**, in: query. Pass your API key via the apiKey query parameter.

## PDF Upload and Download APIs

### uploadResource

`POST /pdf/resource/upload`

*Upload multiple PDFs and get file IDs*

This API uploads multiple PDF files to the API Freaks server and generates their unique file IDs.

> Body parameter

```yaml
file: <binary PDF file content>

```

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.|
|body|body|[ResourceUploadRequest](#resourceuploadrequest)|true|Multipart form-data body carrying the PDF file(s) to upload. Repeat the file field to upload multiple files in one request.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|

> Example responses

> PDF upload successful

```json
{
  "files": [
    {
      "fileName": "test.pdf",
      "fileId": "b61a80d1-9b2d-4748-b3d1-04d747dedc8c"
    }
  ]
}
```

```json
{
  "files": [
    {
      "fileName": "test.pdf",
      "fileId": "9922d104-25a0-432c-8c26-2be2ba14798a"
    },
    {
      "fileName": "test.pdf",
      "fileId": "8a6b3332-6fe0-42b0-a808-df7a36926a79"
    }
  ]
}
```

> Bad Request — Missing or invalid parameters

```json
{
  "timestamp": "2026-07-27T10:42:36.770Z",
  "path": "/v1.0/pdf/upload",
  "status": 400,
  "error": "Missing or Invalid Parameters",
  "message": "One or more required parameters are missing or incorrect."
}
```

> Unsupported Media Type — File type not supported

```json
{
  "timestamp": "2026-07-27T10:47:37.481Z",
  "path": "/v1.0/pdf/upload",
  "status": 415,
  "error": "Unsupported File Type",
  "message": "The provided file type is not supported. Refer to the documentation for valid file types."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|PDF upload successful|[ResourceUploadResponse](#resourceuploadresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing or invalid parameters|[ErrorResponse](#errorresponse)|
|415|[Unsupported Media Type](https://tools.ietf.org/html/rfc7231#section-6.5.13)|Unsupported Media Type — File type not supported|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|415|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

## Schemas

### ResourceUploadResponse

Resource upload response containing file metadata.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|files|[object]|true|none|Array of uploaded file metadata objects.|
|» fileName|string|true|none|Name of the uploaded file.|
|» fileId|string|true|none|Unique ID of the uploaded file, used to reference it in processing operations.|

### ResourceUploadRequest

Multipart form-data request body containing the file to upload.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|file|string(binary)|false|none|Raw PDF file bytes sent as a multipart/form-data field named 'file'. Repeat this field to upload multiple files in one request.|

### ErrorResponse

Standard error envelope returned by the API on failed requests.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|error|string|false|none|Short error category or exception type.|
|message|string|true|none|Human-readable error message describing the failure.|
|path|string|false|none|API endpoint path that produced the error.|
|status|integer|false|none|HTTP status code returned with the error.|
|timestamp|string(date-time)|false|none|Timestamp when the error occurred (ISO 8601).|
