Troubleshoot Send Validation
The send pipeline validates its input before document creation begins. If validation fails, the mutation returns the error straight back to the client and no task ID is returned.
This applies to:
Copy For Your AI
Use this when prompting an AI tool to help with Legalesign GraphQL send workflows:
Use the Legalesign GraphQL send validation rules below as the source of truth.
- Treat send input as strictly validated JSON.
- If send input is invalid, the mutation returns an error immediately and no task ID is returned.
- Only poll task after send succeeds and returns a task ID.
- For send workflows, monitor task.report.status until it reaches COMPLETED or FAILED.
- Prefer subscriptions over polling for production real-time UX.
- groupId, templateId, title, and recipients are required.
- Base64 IDs must decode to the expected prefixes:
groupId=grp, templateId=tpl, roleId=rol, scheduleId=sch, experience=exp, field id=ele, attachment id=att.
- recipients must contain fewer than 200 items.
- Each recipient must include email and order.
- The input must include an initial recipient: either order 0, or order 1 when roleId is provided.
- The recipient with the lowest order number must have a non-empty email.
- title must be 1028 characters or fewer.
- tag must be 250 characters or fewer.
- pdfPassword must be 150 characters or fewer.
- documentCCEmail must contain 10 email addresses or fewer.
- redirect must be a valid URI or null.
If the AI needs fuller guidance, point it to this page.
AI Summary
- Treat
sendinput as strict JSON with validation rules. - If
sendinput is invalid, the mutation returns an error immediately and no task ID is returned. - Only poll
taskaftersendsucceeds and returns a task ID. - For send workflows, monitor
task.report.statusuntil it reachesCOMPLETEDorFAILED. - For production real-time UX, prefer subscriptions over polling.
How to Detect a Validation Failure
Run the mutation as normal.
- If the input is invalid, the mutation returns a validation error immediately.
- If the input is valid, the mutation returns a task ID and document creation continues asynchronously.
That means validation troubleshooting happens at mutation time, not via the task query.
Only start polling task after send has succeeded and returned a task ID.
What Kind of Errors You Can Expect
The send validator checks the shape and contents of the input JSON before processing continues. Validation failures are specific to the field that failed, for example:
send input missing required field 'groupId'send input.groupId must be a base64-encoded group idsend input.recipients must include a recipient with order 0, or order 1 when roleId is providedrecipients[0].email must be a valid emailrecipients[1].attachments[0] must be a base64-encoded attachment id
Common Validation Problems
Missing required top-level fields
These fields are required:
groupIdtemplateIdtitlerecipients
Invalid encoded IDs
The validator checks that IDs are base64-encoded and have the expected decoded prefix:
groupId->grptemplateId->tplroleId->rolscheduleId->schexperience->exp- field
id->ele - attachment
id->att
Recipient ordering problems
The send input must include an initial recipient:
- either a recipient with
order: 0 - or a recipient with
order: 1whenroleIdis provided
Also, the recipient with the lowest order number must have a non-empty email.
Recipient field limits
Common recipient validation rules include:
emailmust be valid and75characters or fewerfirstNameandlastNamemust be60characters or fewerphoneNumbermust be120characters or fewermessagemust be10000characters or fewerexpiryDatemust be a valid ISO 8601 datetime ornullccEmailmust be a valid emailccIncludeLinkmust be a boolean
Top-level field limits
Common send-level validation rules include:
titlemust be1028characters or fewertagmust be250characters or fewerpdfPasswordmust be150characters or fewerdocumentCCEmailmust contain at most10email addressesredirectmust be a valid URI ornullrecipientsmust contain fewer than200itemssenderFieldsandparticipantFieldsmust contain fewer than1000items each
Invalid schedule or field payloads
If you inline recipient schedules or field values:
- each schedule item must include
daysAfter,frequency,when,timeOfDay,subject,message, andskipWeekend - schedule
whenmust be one of1,2, or3 - schedule
subjectandmessagemust be500characters or fewer - each field input must include a valid element
id
Recommended Debugging Flow
- Validate your payload locally with the Send Input JSON Schema.
- Run the mutation.
- If the mutation returns a validation error, correct the payload and retry.
- If the mutation returns a task ID, start polling
taskto monitor document creation.
When to Use Subscriptions Instead
Polling task is a good fit for getting started, testing, and prototyping.
For production workflows, use subscriptions for real-time updates and treat polled task status as a fallback or prototyping tool.
For task-specific subscription guidance, see Track Send Tasks with Subscriptions.