Send Input JSON Schema
The send, sendBatchDocument, and addBulkDocument mutations accept their input as AWSJSON. Because the GraphQL schema types this as a raw JSON string, there is no introspection or autocomplete available in the GraphQL Explorer.
This JSON Schema defines the full expected structure so you can use it for validation, editor autocomplete, and AI-assisted code generation.
Download:
send-input.schema.json— single send and document settingssend-batch-input.schema.json— create a batchsend-batch-document-input.schema.json— add a document to a batchstart-bulk-input.schema.json— start a bulk send taskadd-bulk-document-input.schema.json— add a document to a bulk tasksend-bulk-input.schema.json— dispatch a bulk send
Usage
Editor autocomplete (VS Code)
Add to your .vscode/settings.json to get autocomplete when editing send input JSON:
{
"json.schemas": [
{
"url": "https://docs.legalesign.com/schemas/send-input.schema.json",
"fileMatch": ["**/send-input*.json"]
}
]
}
Validation in code
import Ajv from "ajv";
import addFormats from "ajv-formats";
import schema from "./send-input.schema.json";
const ajv = new Ajv();
addFormats(ajv);
const validate = ajv.compile(schema);
const input = {
groupId: "Z3JwMTIzNDU2",
templateId: "dHBsMTIzNDU2",
title: "Employment Contract",
recipients: [
{
id: "cm9sZTEyMzQ1Ng==",
firstName: "Jane",
lastName: "Smith",
email: "jane@example.com",
role: "Signer",
},
],
};
if (!validate(input)) {
console.error(validate.errors);
}
Structure overview
DocumentSendSettingsInput
├── groupId (required)
├── templateId
├── title
├── sequentialSigning
├── allowCopying
├── allowPrinting
├── suppressEmails
├── tag
├── pdfPassword
├── retainPdfPassword
├── documentCCEmail[]
├── recipients[] → RecipientInput
│ ├── id (required)
│ ├── email (required)
│ ├── role (required)
│ ├── roleId
│ ├── firstName, lastName
│ ├── phoneNumber
│ ├── order, signerIndex
│ ├── channel (EMAIL | SMS | ENCRYPTED | INAPP)
│ ├── experience
│ ├── scheduleId
│ ├── schedule[] → ScheduleItemInput
│ │ ├── daysAfter, frequency, when, timeOfDay
│ │ ├── subject, message
│ │ └── skipWeekend
│ ├── message
│ ├── attachments[]
│ ├── expiryDate
│ ├── skipped
│ ├── timeZone
│ └── cc* fields
├── senderFields[] → FieldInput
│ ├── id (required)
│ ├── value, label
│ ├── signer, elementType, roleId
└── participantFields[] → FieldInput