Skip to main content
Two calls for Moroccan companies. Both are open to every plan, use a key from your workspace and take the environment from X-Sahl-Environment (sandbox by default). Production calls need your workspace to be approved for Production API calls: until then they answer 403 production_api_not_approved. See Go live. Each key is limited to 60 calls a minute on these routes (429 rate_limit_exceeded with Retry-After).

Onboard a company

POST /v1/kyb/ma/onboard takes multipart/form-data. The documents are read in parallel and the answer is synchronous. Plan for a few seconds and a 60-second client timeout. Files: PDF (native or scanned), JPEG, PNG, TIFF or WebP, up to 30 MB each, up to 12 pages for a PDF. The content is checked against the declared type.
The files above are the Sandbox specimens: the Sandbox reads specimen documents only.

The answer

Abridged, with specimen data:
The check keys are: documents_read, ice_format, ice_checksum, ice_cross_document (the ICE on the Modèle J equals the ICE on the attestation), ice_registry, company_name_agreement, rc_format, modele_j_recency, if_format, cin_mrz, cin_format, cin_expiry, gerant_match and screening. ice_registry is always skipped: Morocco has no public ICE or RC registry API, so Sahl does not query one and does not invent registry data.

How the decision is made

auto_ok only when every required check passed and nothing failed: the documents were read, the ICE, IF and RC are well formed, the ICE on the Modèle J equals the ICE on the attestation, both name the same company, the CIN is not expired, the CIN holder is one of the gérants and the sanctions and PEP screening ran clear. Otherwise manual_review, with reasons. A check can carry a code saying why a person must look. A warn with a code blocks auto_ok. Plain warnings without a code, such as a Modèle J older than three months or a CIN expiring within 30 days, are reported and do not block it. Codes you may see on a check or a reason: A masculine and a feminine name (Karim and Karima) are never treated as one name. Arabic and Latin spellings of a name are matched.

Evidence

A value is valid only with proof: a check digit (MRZ), the ICE’s key, or two documents that agree. A value that only has the right shape (a CIN, IF, CNSS or RC format) is needs_review, with a confidence of at most 0.85. A value only the reader saw is needs_review, at most 0.70.

Errors

The quota is checked before anything is read, so a refused call costs nothing.

Check an ICE

POST /v1/kyb/ma/ice-check takes JSON:
known is filled from onboard calls only: Sahl keeps, per workspace and environment, the ICE, company name and address of a file that was auto_ok with a valid ICE key read alike on both documents. A later file naming another company never overwrites the stored name: the call answers company_record: "conflict" and Sahl reviews it. Nothing about the manager (name, CIN, birth date) is kept by the onboard call. In the Sandbox the ICE check reads no document, so it checks the format of any ICE. The specimen ICE is 001234567000062.

Webhooks

Both calls send an event, if you have an endpoint subscribed (see Webhook endpoints). Payloads carry ids, your reference, the decision and the keys of checks that did not pass. They never carry a company name, an ICE, a CIN or a person’s name.