Submit a verification
submit_verificationSubmit personal or company details and identity documents to the carrier for verification. Irreversible — once sent it cannot be cancelled, so confirm authorization first.
Instructions
Send the user's personal or company details and identity documents to the carrier for verification. IRREVERSIBLE: once submitted it cannot be cancelled, and the carrier keeps the documents.
``attest_authorized``: pass true only if the person or company named
in these details and documents asked for this submission and gave you
the details and files in this conversation. Never invent, guess, infer
or reuse personal data or documents. Anything else: pass false (the
call then sends nothing).
``purpose`` is ``number`` (default) or ``sms``. ``purpose='sms'``
registers the organization to text US numbers from a US number
(country_code US, number_type local). The carrier fee is debited from
credit at filing. Pass the same ``purpose`` to
get_verification_requirements. For ``purpose='number'``, pass the
same ``quote_id`` you passed to get_verification_requirements. For
``purpose='sms'``, pass the same ``number_id`` if you passed one.
``subject_type`` is required: ``person`` (the user) or ``business``
(the user's company), the same one passed to
get_verification_requirements. Never guess it: ask the user "you or
your company?".
The verification is named after the person or company in the form
(for example the business name, or the first and last name); it
comes back as ``subject_name``. The organization may hold several
verifications of one subject type (several people or companies).
Steps: 1) call get_verification_requirements. 2) Ask the user for each
field and file. 3) Call this once. Do not submit twice: a 409 means
one with the same subject type and name already exists (see
list_verifications).
Arguments, as listed by get_verification_requirements:
``fields`` is ``{field name: value}``. ``address`` is
``{"customer_name", "street", "city", "region", "postal_code",
"country_code"}`` (all required when ``address_required``).
``documents`` is ``{slot: {"option": <option key>, "fields": {...}}}``
for each slot with ``needs_input``. ``files`` is a list of
``{"slot", "content_type", "content_base64"}``, one per slot that
needs a file; ``slot`` must be a key in ``documents``
and match letters, digits, - and _ (at most 64).
``content_type`` is ``image/jpeg``, ``image/png`` or
``application/pdf``. Limits: 10 MiB per file, 29 MiB in total, at
most 20 files and 20 fields. Compress images to JPG or PNG under about
7 MiB so the call stays small.
Returns the verification: ``id``, ``state`` and ``subject_name``.
Review takes business days and nothing notifies you: poll
get_verification. If the carrier finds a problem you get
``{"error", "problems": [{"loc", "msg"}]}`` and nothing is stored:
ask the user to fix it, then submit again. After a timeout call
list_verifications before trying again.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| fields | Yes | ||
| address | No | ||
| purpose | No | number | |
| quote_id | No | ||
| documents | Yes | ||
| number_id | No | ||
| number_type | Yes | ||
| country_code | Yes | ||
| subject_type | No | ||
| attest_authorized | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||