> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fermion.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get presigned URL for ebook upload 

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



## OpenAPI

````yaml https://backend.codedamn.com/webhook/fermion-backend-openapi.yaml post /public/get-presigned-url-for-ebook-upload
openapi: 3.0.0
info:
  version: 1.0.0
  title: Fermion Backend API
  description: Documentation for interacting with the Fermion API
  contact:
    name: Fermion Support
    email: support@codedamn.com
servers:
  - url: https://backend.codedamn.com/api
    description: Fermion primary backend server
security: []
externalDocs:
  description: Fermion Docs
  url: https://docs.fermion.app
paths:
  /public/get-presigned-url-for-ebook-upload:
    post:
      tags:
        - Product
      summary: 'Get presigned URL for ebook upload '
      description: >-
        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.
      requestBody:
        description: API Request Body
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          productSlug:
                            type: string
                            minLength: 1
                            description: >-
                              Slug of the ebook product returned from
                              create-ebook-product
                        required:
                          - productSlug
                    required:
                      - data
              required:
                - data
      responses:
        '200':
          description: API Response Body
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    output:
                      anyOf:
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - ok
                            data:
                              type: object
                              properties:
                                r2KeyForOriginalEbookPdf:
                                  type: string
                                  description: >-
                                    R2/S3 key for the uploaded ebook PDF. Use
                                    this in the process-uploaded-ebook API call
                                    after uploading.
                                presignedUrl:
                                  type: string
                                  format: uri
                                  description: >-
                                    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.
                              required:
                                - r2KeyForOriginalEbookPdf
                                - presignedUrl
                          required:
                            - status
                            - data
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - error
                            errorMessage:
                              type: string
                          required:
                            - status
                            - errorMessage
                  required:
                    - output
      security:
        - FERMION-API-KEY: []
components:
  securitySchemes:
    FERMION-API-KEY:
      name: FERMION-API-KEY
      type: apiKey
      in: header

````