---
title: "Rotate pages by a multiple of 90 degrees"
method: POST
path: "/pdf/rotate"
tags: ["PDF"]
---

# Rotate pages by a multiple of 90 degrees

`POST /pdf/rotate`

## Request

- Base URL: `https://abundanceapis.com`
- URL: `https://abundanceapis.com/pdf/rotate`
- Auth: none declared

Rotates selected pages (e.g. '1-3,5'), or all pages if 'pages' is omitted.

## Request body

- object
  - `file` object, required
    - `base64` string: Base64-encoded PDF (data URIs ok)
    - `url` string: Public URL of a PDF (fetched server-side)
  - `degrees` number, required: 90, 180, or 270
  - `pages` string: e.g. '1-3,5'; omit for all

## Response `200`

Default Response

- object
  - `pdfBase64` string
  - `pageCount` number

## Other responses

- `400`: Bad input
- `413`: Too large
- `502`: Upstream fetch failed
- `504`: Upstream timed out

---

[API](https://skmtc.dev/abundanceapis/apis/web-toolbox.md) · [All operations](https://skmtc.dev/abundanceapis/apis/web-toolbox/llms.txt) · [OpenAPI document](https://skmtc.dev/abundanceapis/apis/web-toolbox/revisions/ada2893fef43?raw)
