Request biometric signatures for documents, terms, and legal agreements.
https://sign.api.uip.id/v1
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"webhook_url": "https://yourapp.com/webhooks/uip/sign",
"document_title": "Terms of Service v2.1",
"document_content": "By using our service, you agree to...",
"metadata": {
"version": "2.1",
"user_ip": "192.168.1.1"
}
}
Parameter | Type | Required | Description |
---|---|---|---|
webhook_url | string | Yes | URL to receive signing results |
document_title | string | Yes | Title/name of what the user is signing |
document_content | string | Yes | Full text content that the user will sign |
metadata | object | No | Additional data to associate with the signature |
{
"session_id": "sign_sess_1234567890abcdef",
"qr_data": "uip://sign/sign_sess_1234567890abcdef",
"mobile": false,
"qr_image_url": "https://qr.uip.id/sign_sess_1234567890abcdef.png",
"expires_in": 300,
"document_hash": "sha256:a1b2c3d4e5f6..."
}
// JavaScript
async function requestSignature(title, content, metadata = {}) {
const response = await fetch('https://sign.api.uip.id/v1', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + YOUR_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
webhook_url: 'https://yourapp.com/webhooks/uip/sign',
document_title: title,
document_content: content,
metadata: metadata
})
});
const data = await response.json();
if (data.mobile) {
window.location.href = data.qr_data;
} else {
document.getElementById('qr-container').innerHTML =
'
';
}
return data.session_id;
}
// Usage
requestSignature(
'Terms of Service v2.1',
'By using our service, you agree to...',
{ version: '2.1', user_ip: getUserIP() }
);
{
"event": "signature_completed",
"session_id": "sign_sess_1234567890abcdef",
"status": "success",
"signature_data": {
"uip_id": "uip_user_9876543210",
"document_title": "Terms of Service v2.1",
"document_hash": "sha256:a1b2c3d4e5f6...",
"signature": "uip_sig_abc123def456...",
"task_hash": "task_a1b2c3d4e5f6789012345678901234567890abcdef",
"signed_at": "2024-01-15T10:35:00Z",
"signer_info": {
"full_name": "Alice Johnson",
"verification_level": "government_id"
}
},
"metadata": {
"version": "2.1",
"user_ip": "192.168.1.1"
},
"timestamp": "2024-01-15T10:35:00Z"
}