Skip to navigation

Upload a drawn signature

Stores a signature the applicant drew on screen, for a supporting document that asks for one. You send the strokes as JSON, the image is drawn for you, and it is stored as a supporting_document upload. The returned mediaId is referenced in a verification exactly like an uploaded file, and is discarded after 30 minutes if it is never referenced.

A hosted verification session token is also accepted in place of an API key. An optional X-Myaza-Device-Id header (at most 64 characters) records which device made the capture.

Errors carry a stable code in error and a sentence written for the applicant in message.

Error codes

errorStatusMeaning
invalid_signature400The body is not a readable signature, the pad size is outside 50 to 4000, or the signature has too many strokes or points.
signature_empty422The strokes are too short to be a signature, for example a single tap.
signature_not_saved500The signature could not be stored. Try again.
Missing or invalid Authorization header401No bearer credential was sent.
Invalid API key401The key is unknown or revoked.
environment_mismatch403The key belongs to an environment this host does not serve.
origin_not_allowed403The request origin is not on the publishable key allowlist.
ip_not_allowed403The caller address is not on the secret key allowlist.
organization_suspended403The organisation is suspended.
business_not_approved403A production key was used before the business was approved.

Accepts a publishable (pk_) or secret (sk_) key.

Authentication

AuthorizationBearer
Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required.

Request

This endpoint expects an object.
strokeslist of lists of objectsRequired
The strokes, in the order drawn. Each stroke is the list of points the pen passed through. At most 200 strokes and 20,000 points in total.
widthdoubleRequired50-4000
The width of the signing pad the points were drawn on.
heightdoubleRequired50-4000
The height of the signing pad the points were drawn on.
sessionIdstringOptional<=128 characters
The resumable session this signature belongs to, so the image is kept for the life of that session rather than the default 30 minutes.

Response

The signature was stored.
mediaIdstring

The identifier to reference in mediaIds when creating a verification.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error