Skip to main content
A document request collects supporting documents from one applicant (for example a declined or borderline client) while you keep your own KYC provider. You create a request, Sahl returns a link, the applicant opens it, accepts the privacy notice, uploads the documents you asked for and submits. Sahl reads them and tells you by webhook. You read the outcome on the case in the console. All calls go to https://app.sahlfinancial.com/api with Authorization: Bearer <key>. The default environment is sandbox. Send X-Sahl-Environment: production for a live request (or ?environment=production on the query). Production needs your workspace to be approved for Production API calls (see Go live). These routes also accept a console session: reviewers and admins write, every role reads.
The applicant never calls these routes. They use the link, which is their only credential.

Create a request

The 201 answer:
The url is returned only by create (201) and by resend. Sahl stores a SHA-256 of the link’s token, never the token, so keep the URL or call resend. Applicant contact details come back masked.

Idempotency

A request is unique per workspace, environment and reference while it is open (pending, opened or submitted). Creating again for the same reference returns the open request with HTTP 200, "url": null, "existing": true and "email_sent": false. Send "force_new": true to supersede it: the old link is revoked and a new request is created.

Errors on create

Statuses

A document inside a request has its own status: missing (nothing uploaded), received (uploaded, being read), readable or unreadable. No extracted value is returned by these routes and none is shown to the applicant. You read the result on the case in the console, under the reference.

Read, list, revoke, resend

  • List takes reference, status (one of the six above, else 422 invalid_status), environment, limit (1 to 200, default 50) and offset. It answers {"items": [...], "total", "limit", "offset"}.
  • Get answers the same object as create, without url. Once the request is completed it adds result with risk_level and score_band (a range such as 600-699) of the case.
  • Revoke is idempotent on a revoked request. A completed or expired request answers 409 not_revocable.
  • Resend mints a new link, so the old one stops working, and emails it unless you send {"send_email": false}. Only for pending and opened requests (409 not_resendable otherwise). At most 3 resends per request (429 resend_limit) and one a minute (429 rate_limited with Retry-After). send_email: true needs an applicant email (422 email_required).
  • A request the list or a get finds past its date is marked expired and the request.expired event is sent.
  • An unknown id, or another workspace’s, answers 404 not_found.
url is https://app.sahlfinancial.com/r/<token>. The page shows your workspace name and logo, the documents asked for, your reason, the expiry date and the privacy notice that names your workspace as the data controller. The applicant:
  1. Opens the link. The request becomes opened.
  2. Accepts the privacy notice (consent). In Production the page may ask the applicant to complete a short verification challenge first. No file is taken before consent: an upload without it answers 403 consent_required.
  3. Uploads each document. PDF, JPEG, PNG, TIFF or WebP, up to 30 MB per file, up to 5 files per document type and 30 files per request. A file that was not asked for answers 422 document_type_not_requested.
  4. Submits. A submit with nothing uploaded answers 409 no_documents. The request becomes submitted, and completed when every document is read.
An unknown, malformed, expired or revoked link all answer the same 404 not_found (“This link is not valid.”), so nothing can be learned by trying links. In Sandbox, the applicant can upload specimen documents only, as everywhere else.

Embed the page in an iframe

Create the request with "channel": "embed" and show the returned url:
The page may only be framed by sites on your allow-list, set in the console (admin only) or with a session on PATCH /v1/tenants/current/request-settings:
  • widget_frame_origins: up to 20 https origins, with no path, no wildcard and no credentials. The server sends Content-Security-Policy: frame-ancestors 'self' <your origins> on the page’s routes. An empty list lets any https site frame it.
  • request_reply_to: an email address, or null, used as the reply-to of the request email.
When the page runs in a frame it tells the parent what happened with window.postMessage. The message carries no personal data, only the event type, the request status and the type and status of each document:
type is one of sahl.request.opened, sahl.request.document_uploaded, sahl.request.submitted and sahl.request.error. The page cannot know your origin, so always check event.origin and event.data.source:
Treat these messages as a hint for your interface. The webhook, or a GET, is the source of truth.

Webhooks

Subscribe an endpoint to request.opened, request.submitted, request.completed and request.expired (see Webhook endpoints). Deliveries are signed like every other Sahl event. Payloads carry ids, your reference and statuses, never a name, an email, a phone number, a file name or a document value.
request.opened, request.submitted and request.expired have the same shape without risk_level and score_band. missing lists the types never uploaded. request.opened is sent on the first open only. request.completed is sent once, when the request is submitted and every requested document is read or has failed.

Email

With send_email: true Sahl emails the link from <your workspace name> via Sahl <no-reply@sahlfinancial.com>, with your request_reply_to as the reply-to. The email is in the request’s locale and carries the link, the expiry date, your reason, the data controller and a privacy line. It carries no document content. Sahl does not send from your own domain today. The answer’s email_sent says whether the email left; email_sent_at records when.

Document type keys

Use these keys in documents. They are stable. The applicant sees each label in the request’s language. Any other key is a 422 that lists the known ones.