Sessions
Create a session for one to ten signers, find and read it, place the document, download the signed PDF, cancel, and store templates
In testing. The complete flow runs in our test environment; there is no production host yet. Access, test credentials and the base URL on request from IDCanopy.
The examples use $QES_BASE_URL for the test base URL, which is shared on request.
Create a session
POST /qes-onboarding/sessions
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | no | sign (default): you supply the document the signers sign. identification: one person, identified and confirmed with one qualified signature on IDCanopy's contract; see QES identification. |
language | string | no | ISO 639-1 language of the wizard, per session. Default en. |
contract.display | string | no | collapsed (default) or expanded. Only with mode: identification. |
signers | array | yes | 1 to 10 signers, see below. Returned in this order. One signer in mode: identification. |
signing_order | string | no | parallel (default): every signer identifies at once and signs in the order they identified. ordered: signers sign in the order given; a signer's turn comes only when the previous signer completed. Identification is never serialised. |
document_after | string | no | When the session pauses for the document. all_identified (default): once every signer identified, so the PDF can carry every verified name. first_identified: as soon as one signer identified; the rest identify while or after the document is placed. |
reference | string | no | Your own reference, up to 200 characters, echoed in the session and in webhooks, and searchable. |
template_id | string | no | Use this stored template, unchanged, as the document. Not together with document. |
document.template_id, document.data | string, object | no | Generate the document from a stored template: its form fields are filled from data (field name to value, up to 200 fields). The fields first_name and last_name, when present in the PDF, are filled from the identification and cannot be set here. Not together with template_id. |
Each signer:
| Field | Type | Required | Description |
|---|---|---|---|
person.email | string | yes | The person's email address. |
person.phone | string | yes | E.164, for example +436601234567. |
signature_fields | string array | yes in sign mode | 1 to 20 ids of the existing, empty signature fields in the PDF that this signer signs. A field belongs to one signer only. Optional in mode: identification, at most one entry; see QES identification. |
redirect_url | string | no | HTTPS URL this signer returns to when done. |
reference | string | no | Your own reference for this signer, up to 200 characters, echoed in the session and in signer events. |
Unknown fields are rejected. Two signers naming the same signature field, or with the same email or
the same phone, are a 400 invalid_request. An unknown template_id is a 400
template_not_found. With neither template_id nor document, you upload the PDF after
identification.
curl -s -X POST "$QES_BASE_URL/qes-onboarding/sessions" \
-H "Authorization: Bearer $QES_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f3c9a2e-contract-42-attempt-1" \
-d '{
"signers": [
{
"person": { "email": "erika.mustermann@example.com", "phone": "+436601234567" },
"signature_fields": ["Signature_1"],
"redirect_url": "https://app.example.com/onboarding/done?signer=1",
"reference": "ceo"
},
{
"person": { "email": "max.mustermann@example.com", "phone": "+491701234567" },
"signature_fields": ["Signature_2"],
"redirect_url": "https://app.example.com/onboarding/done?signer=2",
"reference": "cfo"
}
],
"signing_order": "ordered",
"document_after": "all_identified",
"reference": "contract-42"
}'A 201 returns the session. Send each person to their own url.
{
"session_id": "qes_5f1c2a9e0b7d4c3a8e6f1b2c",
"status": "identifying",
"signing_order": "ordered",
"document_after": "all_identified",
"expires_at": "2026-10-22T10:00:00Z",
"reference": "contract-42",
"failure_reason": null,
"signers": [
{
"signer_id": "sgn_0a1b2c3d4e5f6a7b8c9d0e1f",
"reference": "ceo",
"status": "identifying",
"url": "https://sign.example.com/s/abc123",
"failure_reason": null,
"identification": null,
"signature": null,
"history": [{ "status": "identifying", "at": "2026-10-15T10:00:01Z" }]
},
{
"signer_id": "sgn_1b2c3d4e5f6a7b8c9d0e1f2a",
"reference": "cfo",
"status": "identifying",
"url": "https://sign.example.com/s/def456",
"failure_reason": null,
"identification": null,
"signature": null,
"history": [{ "status": "identifying", "at": "2026-10-15T10:00:01Z" }]
}
],
"history": [
{ "status": "created", "at": "2026-10-15T10:00:00Z" },
{ "status": "identifying", "at": "2026-10-15T10:00:01Z" }
],
"created_at": "2026-10-15T10:00:00Z",
"updated_at": "2026-10-15T10:00:01Z"
}A signer's url is one link for the whole session, unchanged from creation, and null once the
signer is final. The person can act on it only while the signer is identifying or signing; in
between it shows a waiting page. Every session expires 7 days after creation: expires_at is when
the session and every signer url stop working.
Idempotent creation
Send Idempotency-Key (1 to 200 characters, scoped to your account) to make creation safe to
retry. A repeat with the same key and the same body within 24 hours answers 200 with the session
created the first time; the same key with a different body is a 409 idempotency_conflict. A
request that ends in 502 releases its key, so the same key can be sent again.
Find sessions by reference
GET /qes-onboarding/sessions?reference=contract-42 returns the sessions of your account whose
reference equals the query, newest first, as { "sessions": [...], "next_cursor": ... }. Page
with limit (1 to 100, default 20) and cursor (the previous page's next_cursor; null on the last
page). Meant for reconciliation after a lost response; use Idempotency-Key to avoid duplicates in
the first place.
Read a session
GET /qes-onboarding/sessions/{session_id} returns the session status, its history, and every
signer with their own status, link and history. Two blocks fill in per signer as the session moves
on:
identification, once the signer identified: the verified identity. In sign mode it is the
summary below: images of the identity document and its number are not returned. In
mode: identification it is the full data set, including the document number and the per-field
checks: see QES identification.
| Field | Description |
|---|---|
first_name, last_name | As identified. Use them to personalise the document. |
date_of_birth | Date. |
nationality | ISO 3166-1 alpha-2. |
document.type | For example ID_CARD or PASSPORT. |
document.issuing_country, document.expiry_date | |
completed_at | When identification finished. |
signature, once the signer signed: evidence of the signature, as stated by the signing
service.
| Field | Description |
|---|---|
signed_at | When the person signed. |
level | qualified when the signing service states a qualified signature, unverified when it states no level. |
certificate | The signer's qualified certificate: subject, issuer, serial_number, valid_from, valid_to. |
level is the signing service's statement, not an independent validation; a validation report is
not part of this version. A stated level below qualified ends that signer failed with
failure_reason: signature_not_qualified and the session failed with signer_failed, so a
completed session never carries a signature below qualified, but it can carry unverified. Decide
in your own process whether unverified is enough.
Upload the document
PUT /qes-onboarding/sessions/{session_id}/document, body the raw PDF (application/pdf, up to
10 MiB). Allowed only while the session is awaiting_document and was created without
template_id or document; otherwise a 409 wrong_state. The signature fields named at creation
are expected to exist in the PDF; the service does not verify them, and a missing field is left
unsigned by the signing service.
curl -s -X PUT "$QES_BASE_URL/qes-onboarding/sessions/$SESSION_ID/document" \
-H "Authorization: Bearer $QES_TOKEN" \
-H "Content-Type: application/pdf" \
--data-binary @contract-42.pdfA 200 returns the session in signing. A 502 means the signing service did not confirm the resume:
read the session. If it is back in awaiting_document, upload again; if it is still signing, the
resume is in flight and completes later, so do not upload again.
If no document is uploaded before expires_at, the session ends expired with
failure_reason: document_not_uploaded.
Download the signed PDF
GET /qes-onboarding/sessions/{session_id}/signed-document returns the one signed PDF (PAdES),
carrying every signature, once the session is completed; a 409 before that.
curl -s "$QES_BASE_URL/qes-onboarding/sessions/$SESSION_ID/signed-document" \
-H "Authorization: Bearer $QES_TOKEN" -o contract-42-signed.pdfDownload the evidence
The identification and signing evidence of a signer is fetched fresh from the signing service on
each call, streamed to you, and never stored or cached by IDCanopy. It is available once both the
session and the signer are signing or completed; before that, 409 wrong_state. For a session
with more than one signer, select the signer with ?signer_id=; it may be omitted only for a
one-signer session (400 otherwise).
GET /qes-onboarding/sessions/{session_id}/evidencelists the evidence:items[]withevidence_id,kind,mime_typeandsize_bytes(nullwhen the signing service does not state it). No storage links are returned.GET /qes-onboarding/sessions/{session_id}/evidence/{evidence_id}downloads one file, with the listedmime_type, up to 50 MiB. Evidence that is unknown or no longer available is a 404evidence_not_found.GET /qes-onboarding/sessions/{session_id}/evidence.zipdownloads all of it as one ZIP archive, up to 200 MiB. The archive is created by the signing service and may contain resources that the list does not show.
kind | Evidence |
|---|---|
selfie_best, selfie | Selfie images |
document_front, document_back | ID document images |
document_front_processed, document_back_processed | Processed ID document images |
document_photo | The photo on the ID document |
face_video, document_video | Face-check and document-capture videos |
application_form | The certificate application form |
audit_trail | The signing service's audit trail |
signature_proof, signature_proof_xml | Signature proof, as PDF and as XML |
signed_document, document_to_sign | The signed document and the document as given for signing |
mime_type is image/jpeg, video/webm, application/pdf, application/xml, or
application/octet-stream when the type is unexpected or missing. A transfer that exceeds the size
limit or a time limit, or is interrupted on the signing service's side, is terminated: retry the
download. A 502 provider_unavailable means the signing service could not deliver the evidence.
curl -s "$QES_BASE_URL/qes-onboarding/sessions/$SESSION_ID/evidence" \
-H "Authorization: Bearer $QES_TOKEN"
curl -s "$QES_BASE_URL/qes-onboarding/sessions/$SESSION_ID/evidence.zip" \
-H "Authorization: Bearer $QES_TOKEN" -o evidence.zipCancel a session
POST /qes-onboarding/sessions/{session_id}/cancel ends a session that is not finished: the session
is cancelled with failure_reason: cancelled_by_client, every open signer is cancelled, there are
no further status changes or webhooks for it, and the document is no longer served. IDCanopy also
asks the signing service to cancel each signer's request; when that fails, a link may keep working
on the signing service's side until expires_at. A session that is already final is a 409.
Templates
Store a PDF once and use it as the document of many sessions.
PUT /qes-onboarding/templates/{template_id}, body the raw PDF (up to 10 MiB), stores it under an id you choose (lowercase letters, digits,_and-, up to 64 characters), replacing an earlier template with that id. It returns the metadata:template_id,size_bytes,sha256,form_fields(the fillable form field names found in the PDF, in document order, used bydocument.data),created_at,updated_at.GET /qes-onboarding/templates/{template_id}returns the metadata; the PDF itself is not returned.DELETE /qes-onboarding/templates/{template_id}answers 204; new sessions can no longer use the id.
An unknown id is a 404 template_not_found. Replacing or deleting a template never changes a
session that already passed identification: it keeps the copy it was given. A session still
identifying uses the replacement, or ends failed with failure_reason: template_deleted if the
template is gone when it reaches the pause.
Errors
See Errors.