Skip to main content
POST
/
edit_async
Edit Async
import requests

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

payload = {
    "document_url": "<string>",
    "edit_instructions": "<string>",
    "edit_options": {
        "color": "#FF0000",
        "enable_overflow_pages": False,
        "flatten": False
    },
    "form_schema": [
        {
            "bbox": {
                "left": 123,
                "top": 123,
                "width": 123,
                "height": 123,
                "page": 123,
                "original_page": 123
            },
            "description": "<string>",
            "fill": True,
            "value": "<string>",
            "font_size": 36.5
        }
    ],
    "priority": False,
    "webhook": {
        "mode": "disabled",
        "channels": []
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_url: '<string>',
edit_instructions: '<string>',
edit_options: {color: '#FF0000', enable_overflow_pages: false, flatten: false},
form_schema: [
{
bbox: {left: 123, top: 123, width: 123, height: 123, page: 123, original_page: 123},
description: '<string>',
fill: true,
value: '<string>',
font_size: 36.5
}
],
priority: false,
webhook: {mode: 'disabled', channels: []}
})
};

fetch('https://platform.reducto.ai/edit_async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

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

payload := strings.NewReader("{\n \"document_url\": \"<string>\",\n \"edit_instructions\": \"<string>\",\n \"edit_options\": {\n \"color\": \"#FF0000\",\n \"enable_overflow_pages\": false,\n \"flatten\": false\n },\n \"form_schema\": [\n {\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123,\n \"page\": 123,\n \"original_page\": 123\n },\n \"description\": \"<string>\",\n \"fill\": true,\n \"value\": \"<string>\",\n \"font_size\": 36.5\n }\n ],\n \"priority\": false,\n \"webhook\": {\n \"mode\": \"disabled\",\n \"channels\": []\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "job_id": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

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
EditOptions · 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:false

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.

webhook
WebhookConfigNew · object

Response

Successful Response

job_id
string
required