---
title: "Crop Pdf"
method: POST
path: "/v1/pdf/crop"
tags: ["operations"]
---

# Crop Pdf

`POST /v1/pdf/crop`

## Request

- Base URL: `https://api.smartpdf.ru`
- URL: `https://api.smartpdf.ru/v1/pdf/crop`
- Auth: HTTP bearer

«Обрезать PDF» (change crop-pdf): область долями видимой страницы или белые поля автоматически.

## Headers

- `X-API-Key` string, nullable

## Request body

- CropRequest: «Обрезать PDF»: mode "box" — box [x0, y0, x1, y1] долями видимой страницы, "auto" — убрать белые поля.
  - `webhook_url` string, nullable: https-адрес для уведомления о завершении; подпись — заголовок X-SmartPDF-Signature (см. описание API)
  - `file_id` string, required
  - `mode` 'box' | 'auto'
  - `box` number[], nullable
  - `pages` union
    - integer[]
    - 'all'

## Response `202`

Successful Response

- TaskIdResponse
  - `task_id` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/smartpdf/apis/smartpdf-api.md) · [All operations](https://skmtc.dev/smartpdf/apis/smartpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smartpdf/apis/smartpdf-api/revisions/1a29161a71da?raw)
