Leases
Signatures
Request a signature - Send an OTP via SMS
Initiates the signature process for the authenticated user by sending an OTP code via SMS.
Signature flow
- The user captures their signature image (handwritten drawing)
- The image is encoded in base64 and sent with this endpoint
- The system identifies the user via their JWT and verifies they are a signer of the lease
- A 6-digit OTP code is sent via SMS to the registered phone number
- The code expires after 5 minutes
User identification
The system automatically identifies the user as a signer via:
- The auth_user_id extracted from the JWT (claim sub)
- Matching with an owner_id or lessee_id in the database
Prerequisites
- The user must be authenticated and be a signer of the lease
- The signature process must have been initiated (POST /leases/{lease_id}/signature/initiate)
- The signer must have a valid registered phone number
Signature image
The image must be:
- Encoded in base64
- PNG or JPEG format recommended
- Reasonable size (< 500KB after encoding)
post/leases/{lease_id}/signature/request
Request
- Base URL: https://api.faireplace.com/api
- URL: https://api.faireplace.com/api/leases/{lease_id}/signature/request
- Auth: HTTP bearer
Path parameters
lease_idstring uuid required
UUID identifier of the lease
Request body
Example request
{
"document_signature_id": "550e8400-e29b-41d4-a716-446655440000",
"signature_data": {
"signature_image": "iVBORw0KGgoAAAANSUhEUgAAASwAAACoCAMAAABt9SM9AAAAWlBMVEXm5ubv7+/x8fH19fX5+fn///8AAABERER3d3eqqqrMzMzu7u4gICAwMDBQUFBgYGCAgICQkJCgoKCwsLDAwMDQ0NDg4ODw8PBBQUFRUVFhYWFxcXGBgYGRkZGhoaE="
}
}Response
OTP code sent successfully via SMS
Example response
{
"success": true,
"message": "OTP code sent by SMS",
"expires_at": "2024-01-15T10:15:00Z",
"phone_hint": "+33 6 ** ** ** 78"
}Changes
No recorded changes to this operation across all 1 revision of this API.