POST
/
edit
Edit
import requests

url = "https://platform.reducto.ai/edit"

payload = {
    "document_url": "<string>",
    "edit_instructions": "<string>",
    "edit_options": { "color": "#FF0000" },
    "form_schema": [
        {
            "bbox": {
                "left": 123,
                "top": 123,
                "width": 123,
                "height": 123,
                "page": 123,
                "original_page": 123
            },
            "description": "<string>",
            "type": "text",
            "fill": True,
            "value": "<string>"
        }
    ],
    "priority": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "document_url": "<string>",
  "form_schema": [
    {
      "bbox": {
        "left": 123,
        "top": 123,
        "width": 123,
        "height": 123,
        "page": 123,
        "original_page": 123
      },
      "description": "<string>",
      "type": "text",
      "fill": true,
      "value": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
document_url
required

The URL of the document to be processed. You can provide one of the following:

  1. A publicly available URL
  2. A presigned S3 URL
  3. A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document
edit_instructions
string
required

The instructions for the edit.

edit_options
object
form_schema
EditWidget · object[] | null

Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes. Only works for PDFs.

priority
boolean
default:true

If True, attempts to process the job with priority if the user has priority processing budget available; by default, sync jobs are prioritized above async jobs.

Response

Successful Response

document_url
string
required

Presigned URL to download the edited document.

form_schema
EditWidget · object[] | null

Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes.