---
title: "Get presigned URL for ebook upload"
method: POST
path: "/public/get-presigned-url-for-ebook-upload"
tags: ["Product"]
---

# Get presigned URL for ebook upload

`POST /public/get-presigned-url-for-ebook-upload`

## Request

- Base URL: `https://backend.codedamn.com/api`
- URL: `https://backend.codedamn.com/api/public/get-presigned-url-for-ebook-upload`
- Auth: API key in header `FERMION-API-KEY`

Generate a presigned URL to upload ebook PDF file to S3

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 returned from create-ebook-product

## Response `200`

API Response Body

- object[]
  - `output` union, required
    - object
      - `status` 'ok', required
      - `data` object, required
        - `r2KeyForOriginalEbookPdf` string, required: R2/S3 key for the uploaded ebook PDF. Use this in the process-uploaded-ebook API call after uploading.
        - `presignedUrl` string, uri, required: Presigned URL for uploading the ebook PDF file. Make a PUT request to this URL with the PDF file as the body. URL expires in 1 hour.
    - object
      - `status` 'error', required
      - `errorMessage` string, required

---

[API](https://skmtc.dev/fermion/apis/fermion-backend-api.md) - [All operations](https://skmtc.dev/fermion/apis/fermion-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fermion/apis/fermion-backend-api/revisions/93dda69c8230?raw)
