eConsent
With eConsent on, a trial has one or more consent forms — the participant information sheet, eligibility criteria and consent statements a person reads and agrees to — and a consent record for each person who has done so. Setting up eConsent explains the forms from the interface's point of view; these endpoints let you manage the forms and read the records.
The consent flow itself — the pages a person goes through to read, verify their contact details and sign — is driven by the join pages and is not part of the API.
Reading and editing forms needs trial.readConsentSettings / trial.admin; reading consent records needs trial.readTrialConsents. Turning eConsent on is a trial setting (eConsentEnabled); eConsentClosed stops new people consenting while keeping the records.
Endpoints
| Method | Path | Description |
|---|---|---|
GET |
/trials/<trialId>/consentDocuments |
The trial's consent forms, as {"documents": [...]}, newest first, each with its consentCount. |
POST |
/trials/<trialId>/consentDocuments |
Create a consent form. |
PATCH |
/trials/<trialId>/consentDocuments/<documentId> |
Update a form. |
DELETE |
/trials/<trialId>/consentDocuments/<documentId> |
Delete a form. Refused while consent records reference it. |
GET |
/trials/<trialId>/consents?page=1&query= |
Consent records, 30 to a page, as {"consents": [...], "total": n}. query matches on email or phone. Listing is logged. |
Consent form fields
POST /trials/<trialId>/consentDocuments and PATCH /trials/<trialId>/consentDocuments/<documentId>:
| Field | Type | Notes |
|---|---|---|
document |
string | The participant information sheet, as HTML. 5–100,000 characters. |
formKey |
string | Letters and digits only. Identifies the form in its link (https://app.trialflare.com/consent/<trialCode>/<formKey>); default if omitted. Unique within the trial. |
name |
string | Up to 200 characters. Shown to staff. |
eligibilityCriteria |
string | Criteria the person confirms they meet. |
conditions |
list | The consent statements: each {"id", "title", "description", "optional"}. |
verificationMethods |
list | Which of email, phone, whatsapp the person may verify with. At least one. |
requiredVerificationMethods |
list | Those they must verify. |
identityVerificationEnabled |
boolean | Ask for photo-ID verification. |
connectContactDetails |
boolean | Copy the verified contact details onto the participant record. |
postConsentText |
string | Shown after signing. |
postConsentStage, postConsentStageButtonLabel |
stage _id, string |
A stage (a screening questionnaire, say) to offer straight after consent. |
postSubmissionText |
string | Shown after that stage is submitted. |
notificationEmail, withdrawalEmail |
Addresses told when someone consents, or withdraws. |
Consent records
Each record in GET /trials/<trialId>/consents has who consented (fullName, and the email, phone or whatsapp they verified), createdAt, which consentDocument they signed, what they confirmed (consentGiven, trialConditionsConsentGiven, eligibilityCriteriaConfirmed, and conditionConfirmations keyed by condition id, with any initials given), the signed PDF (file, with its fileHash), and their screeningResponses where a stage followed consent. Where the form was signed through the newer session-based flow, sessionEvents is the timeline of what they did on each page. Contact details are included only for viewers with the personal-information permission.