About this endpoint
What it does
Rotates all pages in a PDF, or only the pages you choose. Send the PDF as a public URL or Base64 in a JSON body, set the angle, and pick how the file comes back.
Request Body
| Parameter | Type | Description |
|---|---|---|
| pdf_url | String | Required if pdf_base64 is not set. Public URL of the source PDF. Must be http or https. |
| pdf_base64 | String | Required if pdf_url is not set. Base64-encoded PDF. Provide exactly one of pdf_url or pdf_base64. |
| degrees | Integer | Rotation angle. Allowed values: 0, 90, 180, 270, 360. 0 and 360 leave pages unchanged. Default: 0. |
| page_numbers | Integer Array | 1-based page numbers to rotate. Omit to rotate every page. |
| filename | String | Suggested name for the output file. |
| response_mode | String | How the rotated PDF is returned. Allowed values: binary, base64, json, url. Default: binary. |
Response
Returns the rotated PDF in the shape set by response_mode. In json mode, returns a JSON object with the file and its metadata.
| Parameter | Type | Description |
|---|---|---|
| filename | String | Name of the rotated PDF. |
| size | Integer | Size of the rotated PDF in bytes. |
| created_at | String | UTC timestamp when the file was created. |
| pdf_base64 | String | Base64-encoded rotated PDF. |
Notes
- Provide exactly one of
pdf_urlorpdf_base64. Sending neither returns a 422 error. page_numbersmust be within the document. Out-of-range values,0, and negatives return a 422 error.degreesmust be one of the allowed values. Other numbers (for example45) return a 422 error.



