---
title: PDF Binary Resource Upload API Reference
version: 1.0.0
description: Upload a PDF file as raw binary data in the request body. Returns file metadata including the file ID, file name, size, and type. This endpoint accepts the raw file bytes directly instead of multipart form-data.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 1
operations: 1
schemas: 2
---

## Table of Contents

- [PDF Binary Resource Upload API Reference v1.0.0](#pdf-binary-resource-upload-api-reference-v100)
  - [Authentication](#authentication)
  - [PDF Upload and Download APIs](#pdf-upload-and-download-apis)
    - [uploadResourceBinary](#uploadresourcebinary)
      - [Parameters](#parameters)
      - [Responses](#responses)
  - [Schemas](#schemas)
    - [BinaryResourceUploadResponse](#binaryresourceuploadresponse)
    - [ErrorResponse](#errorresponse)



# PDF Binary Resource Upload API Reference v1.0.0

Upload a PDF file as raw binary data in the request body. Returns file metadata including the file ID, file name, size, and type. This endpoint accepts the raw file bytes directly instead of multipart form-data.

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

### uploadResourceBinary

`POST /pdf/resource/upload-binary`

*Upload a PDF in binary format*

This API uploads PDF files to the API Freaks server in binary format.

> Body parameter

```yaml
string

```

#### 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.|
|file_name|query|string|true|The desired name for the uploaded PDF file. This name will be used for storage on the server.|
|body|body|string(binary)|true|Raw PDF file bytes sent directly as the request body (not multipart).|

##### Detailed descriptions

**file_name**: The desired name for the uploaded PDF file. This name will be used for storage on the server.

 **NOTE**: Please ensure file_name has extension `.pdf`.

##### Enumerated Values

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

> Example responses

> PDF upload successfully

```json
{
  "fileName": "binarytest.pdf",
  "fileId": "b0fbf78c-8fe2-49b6-ad3d-63efb4ac8e58"
}
```

> Bad Request — Missing file_name or empty body

```json
{
  "error": "Invalid Param Exception",
  "message": "please pass correct parameters",
  "path": "/v1.0/pdf/resource/upload-binary",
  "status": 400,
  "timestamp": "2026-07-27T10:48:14.902Z"
}
```

```json
{
  "timestamp": "2026-07-27T10:48:16.046Z",
  "path": "/v1.0/pdf/upload-binary",
  "status": 400,
  "error": "Invalid Parameter",
  "message": "Invalid parameter value provided for 'dataBufferFlux'."
}
```

> Unsupported Media Type — File extension not supported

```json
{
  "timestamp": "2026-07-27T10:48:15.449Z",
  "path": "/v1.0/pdf/upload-binary",
  "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 successfully|[BinaryResourceUploadResponse](#binaryresourceuploadresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Missing file_name or empty body|[ErrorResponse](#errorresponse)|
|415|[Unsupported Media Type](https://tools.ietf.org/html/rfc7231#section-6.5.13)|Unsupported Media Type — File extension 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

### BinaryResourceUploadResponse

Binary resource upload response containing file metadata.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|fileName|string|true|none|The name of the uploaded file.|
|fileId|string|true|none|The unique identifier assigned to the uploaded file.|

### 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).|
