---
title: "Process uploaded ebook"
method: POST
path: "/public/process-uploaded-ebook"
tags: ["Product"]
---

# Process uploaded ebook

`POST /public/process-uploaded-ebook`

Process and encrypt an uploaded ebook PDF file. Call this after uploading the file to the presigned URL.

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 60 requests in a window of 1m.

## Request body

- object
  - `data` object[], required
    - `data` object, required
      - `productSlug` string, required — Slug of the ebook product
      - `r2KeyForOriginalEbookPdf` string, required — R2/S3 key returned from get-presigned-url-for-ebook-upload. This identifies which uploaded file to process.

## Response `200`

API Response Body

- object[]
  - `output` union, required
    - object
      - `status` 'ok', required
      - `data` object, required
        - `ebookVersionIndex` number, required — Index of the processed ebook version in the uploadedVersionsInOrder array. Use this as activeVersionIndex when updating metadata.
    - object
      - `status` 'error', required
      - `errorMessage` string, required

---

[API](https://skmtc.net/fermion/apis/fermion-backend-api.md) · [All operations](https://skmtc.net/fermion/apis/fermion-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fermion/fermion-backend-api/versions/7ce364c8820b/schema)
