curl -X POST https://api.vouchmark.com/v1/widget/embed/sessions/wses_.../uploads \
-F "file=@/path/to/certificate.pdf" \
-F "token=elt_..." \
-F "moduleId=document_upload" \
-F "fieldName=certificateOfIncorporation"
{
"success": true,
"data": {
"sessionId": "wses_...",
"widgetId": "wgt_aBcD...",
"status": "in_progress",
"currentModuleId": "document_upload",
"answers": {},
"attachments": {
"document_upload": {
"certificateOfIncorporation": {
"url": "https://res.cloudinary.com/.../certificate.pdf",
"publicId": "kyb-widget-sessions/abc123",
"format": "pdf",
"size": 482113,
"originalName": "certificate.pdf"
}
}
},
"referenceId": null
}
}
Widget Embed (Runtime)
Upload session attachment
Upload a file attachment for a module field in a session.
POST
/
v1
/
widget
/
embed
/
sessions
/
{sessionId}
/
uploads
curl -X POST https://api.vouchmark.com/v1/widget/embed/sessions/wses_.../uploads \
-F "file=@/path/to/certificate.pdf" \
-F "token=elt_..." \
-F "moduleId=document_upload" \
-F "fieldName=certificateOfIncorporation"
{
"success": true,
"data": {
"sessionId": "wses_...",
"widgetId": "wgt_aBcD...",
"status": "in_progress",
"currentModuleId": "document_upload",
"answers": {},
"attachments": {
"document_upload": {
"certificateOfIncorporation": {
"url": "https://res.cloudinary.com/.../certificate.pdf",
"publicId": "kyb-widget-sessions/abc123",
"format": "pdf",
"size": 482113,
"originalName": "certificate.pdf"
}
}
},
"referenceId": null
}
}
This is an embed runtime endpoint. It is called by the embedded Vouchmark widget in the applicant’s browser, not by your backend. It uses the widget’s
token and does not take a Bearer token.multipart/form-data. The session must be in_progress and the module must be enabled on the widget. Returns the updated session view, including the new attachment.
Accepted file types: PDF, JPEG, PNG. Maximum size 10 MB.
Path parameters
Form fields
curl -X POST https://api.vouchmark.com/v1/widget/embed/sessions/wses_.../uploads \
-F "file=@/path/to/certificate.pdf" \
-F "token=elt_..." \
-F "moduleId=document_upload" \
-F "fieldName=certificateOfIncorporation"
{
"success": true,
"data": {
"sessionId": "wses_...",
"widgetId": "wgt_aBcD...",
"status": "in_progress",
"currentModuleId": "document_upload",
"answers": {},
"attachments": {
"document_upload": {
"certificateOfIncorporation": {
"url": "https://res.cloudinary.com/.../certificate.pdf",
"publicId": "kyb-widget-sessions/abc123",
"format": "pdf",
"size": 482113,
"originalName": "certificate.pdf"
}
}
},
"referenceId": null
}
}
201. Rate limited to 40 uploads per hour.