---
title: "Upload a PDF document"
method: POST
path: "/v2/add/pdf-upload"
tags: ["Add Library"]
---

# Upload a PDF document

`POST /v2/add/pdf-upload`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/add/pdf-upload`
- Auth: HTTP bearer

Upload a PDF file for documentation processing. Requires a teamspace. File size limit is 50MB.

## Request body `multipart/form-data`

- object
  - `pdfFile` string, binary, required: A PDF document
  - `projectTitle` string: Custom title for the library
  - `description` string: Description of the library
  - `force` 'true': Set to 'true' to force reprocessing

## Response `200`

Library submitted successfully for processing

- AddLibraryResponse: Response after successfully submitting a library
  - `libraryName` string, required: The library identifier assigned — the URL path of the library on context7.com. `/owner/repo` for GitHub repositories, or `/<source>/<id>` for other sources (e.g., `/vercel/next.js`, `/websites/uploadcare_com`). See [Library ID format](/api-guide#library-id-format).
  - `version` string: Only for websites: the version the URL was added as, when it is a version of an existing library. Request it as `<libraryName>/<version>`.
  - `message` string, required: Human-readable success message

## Other responses

- `400`: Bad Request - Invalid input parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - Insufficient permissions or plan restrictions
- `409`: Conflict - Resource already exists
- `500`: Internal Server Error
- `504`: Gateway Timeout - Processing timed out waiting for logs

## Changes

- **2026-10-26** `86c04930b016`: 1 info
  - added the optional property `version` to the response with the `200` status
- **2026-09-15** `912d4713d58c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/add/pdf-upload/post.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
