{
  "openapi": "3.1.1",
  "info": {
    "title": "PDF Form & Signature Studio API",
    "version": "1.0.0",
    "summary": "List and fill PDF form fields, and place a visible signature image or typed name on a page.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://pdfformsignaturestudio.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "List and fill PDF form fields, and place a visible signature image or typed name on a page.",
        "description": "Shows every field of a fillable PDF (name, type, value, options), fills text fields, checkboxes, radio buttons and drop-downs, and optionally flattens the form. It can also stamp a visible signature, from an uploaded PNG/JPG or a typed name in a script font, at an exact position on any page. This is a picture of a signature, not a cryptographic digital signature.\n\nMethodology:\n- Fields are read with qpdf's JSON view of the AcroForm (/AcroForm /Fields): full name, type (text, checkbox, radio, drop-down, list, signature), current value, options and page. XFA-only forms (dynamic Adobe forms) are not supported.\n- Values are written into the field objects (/V, and /AS for checkbox/radio widgets). /NeedAppearances is set to true so viewers redraw the fields, and qpdf --generate-appearances draws text and choice fields so they show up everywhere, including when flattened.\n- Checkboxes accept yes/no (or the on-state name), radio buttons and drop-downs one of their options. Read-only fields, unknown names and invalid options are skipped and listed, never guessed.\n- Visible signature: the image (or the typed name rendered in a handwriting-style font with ImageMagick) is placed on a transparent overlay page of exactly the target page size at 200 DPI, converted with img2pdf and laid over the page with qpdf --overlay. Positions are in points from the top-left corner.\n- This is NOT a cryptographic (digital) signature: it proves nothing about who signed or whether the document was changed. Use a qualified e-signature service when a legally binding electronic signature is required.\n\nA visible signature image is not a digital signature. Existing digital signatures in the PDF become invalid when you fill or stamp it.",
        "tags": [
          "documents"
        ],
        "x-mcp-tool": "pdf_form_signature_studio",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PdfFormSignatureStudioInput"
              },
              "examples": {
                "example1": {
                  "summary": "List the fields of a registration form",
                  "value": {
                    "action": "list",
                    "file": {
                      "filename": "registration.pdf",
                      "contentType": "application/pdf",
                      "contentBase64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgL0Fjcm9Gb3JtIDw8IC9GaWVsZHMgWzUgMCBSIDYgMCBSIDcgMCBSXSAvREEgKC9IZWx2IDAgVGYgMCBnKSAvRFIgPDwgL0ZvbnQgPDwgL0hlbHYgOCAwIFIgL1phRGIgOSAwIFIgPj4gPj4gPj4gPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA1OTUgODQyXSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA4IDAgUiA+PiA+PiAvQ29udGVudHMgNCAwIFIgL0Fubm90cyBbNSAwIFIgNiAwIFIgNyAwIFJdID4+CmVuZG9iago0IDAgb2JqCjw8IC9MZW5ndGggMTcwID4+CnN0cmVhbQpCVCAvRjEgMTggVGYgNzIgNzYwIFRkIChSZWdpc3RyYXRpb24gZm9ybSkgVGogRVQKQlQgL0YxIDEyIFRmIDcyIDcxMiBUZCAoRnVsbCBuYW1lOikgVGogRVQKQlQgL0YxIDEyIFRmIDcyIDY3MiBUZCAoSSBhZ3JlZTopIFRqIEVUCkJUIC9GMSAxMiBUZiA3MiA2MzIgVGQgKENvdW50cnk6KSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCjUgMCBvYmoKPDwgL1R5cGUgL0Fubm90IC9TdWJ0eXBlIC9XaWRnZXQgL0ZUIC9UeCAvVCAoZnVsbF9uYW1lKSAvVFUgKEZ1bGwgbmFtZSkgL1JlY3QgWzE2MCA3MDUgNDIwIDcyNV0gL0YgNCAvUCAzIDAgUiAvREEgKC9IZWx2IDE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kICg0KSBUaiBFVCBRCmVuZHN0cmVhbQplbmRvYmoKMTEgMCBvYmoKPDwgL1R5cGUgL1hPYmplY3QgL1N1YnR5cGUgL0Zvcm0gL0JCb3ggWzAgMCAxNiAxNl0gL0xlbmd0aCAwID4+CnN0cmVhbQoKZW5kc3RyZWFtCmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDAxNzUgMDAwMDAgbiAKMDAwMDAwMDIzMiAwMDAwMCBuIAowMDAwMDAwMzg2IDAwMDAwIG4gCjAwMDAwMDA2MDcgMDAwMDAgbiAKMDAwMDAwMDc3OSAwMDAwMCBuIAowMDAwMDAwOTk5IDAwMDAwIG4gCjAwMDAwMDEyMTEgMDAwMDAgbiAKMDAwMDAwMTMwOCAwMDAwMCBuIAowMDAwMDAxMzgxIDAwMDAwIG4gCjAwMDAwMDE1NjAgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKMTY1OAolJUVPRgo="
                    }
                  }
                },
                "example2": {
                  "summary": "Fill the form and flatten it",
                  "value": {
                    "action": "fill",
                    "flatten": true,
                    "values": [
                      {
                        "field": "full_name",
                        "value": "Jane Doe"
                      },
                      {
                        "field": "agree",
                        "value": "yes"
                      },
                      {
                        "field": "country",
                        "value": "France"
                      }
                    ],
                    "file": {
                      "filename": "registration.pdf",
                      "contentType": "application/pdf",
                      "contentBase64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgL0Fjcm9Gb3JtIDw8IC9GaWVsZHMgWzUgMCBSIDYgMCBSIDcgMCBSXSAvREEgKC9IZWx2IDAgVGYgMCBnKSAvRFIgPDwgL0ZvbnQgPDwgL0hlbHYgOCAwIFIgL1phRGIgOSAwIFIgPj4gPj4gPj4gPj4KZW5kb2JqCjIgMCBvYm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wMDAwIG4gCjAwMDAwMDA2MDcgMDAwMDAgbiAKMDAwMDAwMDc3OSAwMDAwMCBuIAowMDAwMDAwOTk5IDAwMDAwIG4gCjAwMDAwMDEyMTEgMDAwMDAgbiAKMDAwMDAwMTMwOCAwMDAwMCBuIAowMDAwMDAxMzgxIDAwMDAwIG4gCjAwMDAwMDE1NjAgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKMTY1OAolJUVPRgo="
                    }
                  }
                },
                "example3": {
                  "summary": "Typed signature at the bottom of a letter",
                  "value": {
                    "action": "sign",
                    "signatureText": "Jane Doe",
                    "x": 72,
                    "y": 160,
                    "width": 160,
                    "file": {
                      "filename": "letter.pdf",
                      "contentType": "application/pdf",
                      "contentBase64": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA1OTUgODQyXSAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA1IDAgUiA+PiA+PiAvQ29udGVudHMgNCAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAxNjcgPj4Kc3RyZWFtCkJUIC9GMSAyNCBUZiA3MiA3NDIgVGQgKERlYXIgU2lyIG9yIE1hZGFtLCkgVGogRVQKQlQgL0YxIDE0IFRmIDcyIDcxMiBUZCAocGxlYXNlIGZpbmQgdGhlIHNpZ25lZCBhZ3JlZW1lbnQgYXR0YWNoZWQuKSBUaiBFVApCVCAvRjEgMTQgVGYgNzIgNjgyIFRkIChLaW5kIHJlZ2FyZHMpIFRqIEVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwMDY0IDAwMDAwIG4gCjAwMDAwMDAxMjEgMDAwMDAgbiAKMDAwMDAwMDI0NyAwMDAwMCBuIAowMDAwMDAwNDY1IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNTYyCiUlRU9GCg=="
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PdfFormSignatureStudioResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PdfFormSignatureStudioInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "file": {
            "title": "PDF",
            "description": "Max 100 MB. Processed on our server and deleted; the result can be downloaded for about 2 hours. Upload as {filename, contentType?, contentBase64}. Max 102400 KiB. Accepts .pdf,application/pdf.",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "action": {
            "title": "What to do",
            "type": "string",
            "enum": [
              "list",
              "fill",
              "sign",
              "fill-sign"
            ],
            "default": "list"
          },
          "values": {
            "title": "Field values",
            "description": "Field name exactly as listed. Checkboxes: yes/no. Radio buttons and drop-downs: one of the listed options. Multi-select lists: options separated by \";\".",
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "field": {
                  "title": "Field name",
                  "type": "string",
                  "maxLength": 300
                },
                "value": {
                  "title": "Value",
                  "type": "string",
                  "maxLength": 2000
                }
              },
              "required": [
                "field"
              ]
            }
          },
          "valuesText": {
            "title": "More values as text",
            "description": "Optional: one \"field name = value\" per line (useful for long forms).",
            "type": "string",
            "maxLength": 50000
          },
          "flatten": {
            "title": "Flatten the form (values become part of the page and can no longer be edited)",
            "type": "boolean",
            "default": false
          },
          "signatureImage": {
            "title": "Signature image",
            "description": "PNG with a transparent background works best. A white JPG background is made transparent. Max 5 MB. Upload as {filename, contentType?, contentBase64}. Max 5120 KiB. Accepts .png,.jpg,.jpeg,image/png,image/jpeg.",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "signatureText": {
            "title": "Or type your name",
            "description": "Rendered in a handwriting-style font when no image is uploaded.",
            "type": "string",
            "maxLength": 60
          },
          "signatureColor": {
            "title": "Ink colour (typed name)",
            "type": "string",
            "enum": [
              "blue",
              "black"
            ],
            "default": "blue"
          },
          "page": {
            "title": "Signature page",
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "default": 1
          },
          "x": {
            "title": "Distance from the left edge",
            "description": "72 pt = 1 inch = 25.4 mm. An A4 page is 595 × 842 pt, US Letter 612 × 792 pt.",
            "type": "number",
            "minimum": 0,
            "maximum": 20000,
            "default": 72,
            "x-unit": "pt"
          },
          "y": {
            "title": "Distance from the top edge",
            "type": "number",
            "minimum": 0,
            "maximum": 20000,
            "default": 700,
            "x-unit": "pt"
          },
          "width": {
            "title": "Signature width",
            "description": "The height follows from the image proportions.",
            "type": "number",
            "minimum": 20,
            "maximum": 2000,
            "default": 180,
            "x-unit": "pt"
          },
          "password": {
            "title": "PDF password (only if the file is protected)",
            "description": "Used only to open the file for this conversion; it is written to a private temporary file, never to a command line, and deleted with the job.",
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "file"
        ]
      },
      "PdfFormSignatureStudioResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "action",
              "pages",
              "hasForm",
              "fieldCount",
              "fields",
              "filled",
              "skipped",
              "flattened",
              "isDigitalSignature"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "list",
                  "fill",
                  "sign",
                  "fill-sign"
                ]
              },
              "pages": {
                "type": "integer"
              },
              "hasForm": {
                "type": "boolean"
              },
              "xfa": {
                "type": "boolean"
              },
              "fieldCount": {
                "type": "integer"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "type",
                    "value",
                    "options",
                    "page",
                    "readOnly",
                    "required"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "page": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "readOnly": {
                      "type": "boolean"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "tooltip": {
                      "type": "string"
                    }
                  }
                }
              },
              "filled": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "type",
                    "value"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              },
              "skipped": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "reason"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              },
              "flattened": {
                "type": "boolean"
              },
              "signature": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "page",
                  "x",
                  "y",
                  "width",
                  "height",
                  "source"
                ],
                "properties": {
                  "page": {
                    "type": "integer"
                  },
                  "x": {
                    "type": "number"
                  },
                  "y": {
                    "type": "number"
                  },
                  "width": {
                    "type": "number"
                  },
                  "height": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "image",
                      "typed"
                    ]
                  },
                  "font": {
                    "type": "string"
                  }
                }
              },
              "isDigitalSignature": {
                "type": "boolean",
                "const": false,
                "description": "Always false: the stamp is a visible image, not a cryptographic signature."
              },
              "artifact": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "preview": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}