Skip to main content

Input and Output Schema

The Input Schema and Output Schema sections of the Integration tab provide information on the input and output data for your document’s API. This includes the data types and descriptions of each field. You can use this information to understand how to structure your requests and responses when calling your document’s API. Input and output schemas will be a JSON object. The exact structure depends on your document, but an example can be found below: document-schemas

Input Schema Example

{
  "content": {
    "type": "string",
    "description": "The text content from which PII should be redacted."
  }
}
This schema indicates that the input to the document’s API should be a JSON object with a single field, content, which is a string containing the text to be processed. You can find an example call to the API in the Integration tab as well.

Output Schema Example

{
  "redactedText": {
    "type": "string",
    "description": "The text with all detected PII replaced by appropriate placeholders (e.g., {{ name }}, {{ email }})."
  },
  "redactedEntities": {
    "type": "array",
    "description": "A list of entities that were redacted from the original content.",
    "items": {
      "type": "string",
      "description": "A single entity that was redacted from the content."
    }
  }
}
This schema indicates that the output from the document’s API will be a JSON object with two fields: redactedText, which is a string containing the text with PII redacted, and redactedEntities, which is an array of strings listing the entities that were redacted. You can find an example response from the API in the Integration tab as well.
The input and output schemas will differ depending on your document.

Get started with the API

Now that you understand the input and output schema, you can start using the API for your document.
Learn how to get started with the API in the Using the API section.
I