const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_id: 'doc_01h2xcejqtf2nbrexx3vqjhp41',
contact_form: {
full_name: 'Bob Vance',
email_address: 'bob@vancerefrigeration.com',
phone_number: '+1 234-567-890',
company_name: 'Vance Refrigeration Inc.',
company_role: 'CEO'
},
share_link_id: 'shl_01h2xcejqtf2nbrexx3vqjhp41',
otp: '123456'
})
};
fetch('https://api.factify.com/v1/forms/{form_id}/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "fsub_01h2xcejqtf2nbrexx3vqjhp41",
"form_id": "frm_01h2xcejqtf2nbrexx3vqjhp41",
"document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"contact_form": {
"full_name": "Bob Vance",
"email_address": "bob@vancerefrigeration.com",
"phone_number": "+1 234-567-890",
"company_name": "Vance Refrigeration Inc.",
"company_role": "CEO"
},
"created_at": "2025-01-15T10:30:00Z",
"share_link_id": "shl_01h2xcejqtf2nbrexx3vqjhp41"
}Submit a lead-capture form
Records a submission against a lead-capture form for the named document and, on success, grants the submitter access to that document under the form’s policy.
Authentication: open to anonymous callers via
Authorization: Bearer PUBLIC_TOKEN. Anonymous callers must
also send an x-factify-client-id header carrying a stable
per-visitor identifier — default-anonymous submissions with no
client id are rejected with 400. Authenticated callers may
also submit; the auth layer establishes their subject and the
client id header is not required.
OTP-verified submissions are not implemented in this slice.
Sending a non-empty otp field returns 400 until the
email-OTP flow lands as a follow-up.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_id: 'doc_01h2xcejqtf2nbrexx3vqjhp41',
contact_form: {
full_name: 'Bob Vance',
email_address: 'bob@vancerefrigeration.com',
phone_number: '+1 234-567-890',
company_name: 'Vance Refrigeration Inc.',
company_role: 'CEO'
},
share_link_id: 'shl_01h2xcejqtf2nbrexx3vqjhp41',
otp: '123456'
})
};
fetch('https://api.factify.com/v1/forms/{form_id}/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "fsub_01h2xcejqtf2nbrexx3vqjhp41",
"form_id": "frm_01h2xcejqtf2nbrexx3vqjhp41",
"document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"contact_form": {
"full_name": "Bob Vance",
"email_address": "bob@vancerefrigeration.com",
"phone_number": "+1 234-567-890",
"company_name": "Vance Refrigeration Inc.",
"company_role": "CEO"
},
"created_at": "2025-01-15T10:30:00Z",
"share_link_id": "shl_01h2xcejqtf2nbrexx3vqjhp41"
}Documentation Index
Fetch the complete documentation index at: https://developers.factify.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication using a factapi-issued API key
(ffy_<env>_<base32_uuid><base62_random>). Cookie-based
sessions are accepted automatically by user-facing endpoints
but are not surfaced as an OpenAPI auth scheme.
Headers
Stable per-visitor identifier supplied by anonymous
callers. Required when using
Authorization: Bearer PUBLIC_TOKEN; default-anonymous
submissions (no client id) are rejected with 400.
Authenticated callers may omit it.
"client-7c3b5e0a-1b2c-4f5d-8a9b-0c1d2e3f4a5b"
Path Parameters
Form definition being submitted against.
"frm_01h2xcejqtf2nbrexx3vqjhp41"
Body
Document this submission grants access to.
"doc_01h2xcejqtf2nbrexx3vqjhp41"
Lead-capture contact details supplied by the form submitter.
Show child attributes
Show child attributes
Share link the form was reached through, if any. Used for attribution; does not affect the access grant.
"shl_01h2xcejqtf2nbrexx3vqjhp41"
Reserved for the email-OTP verification flow. Not implemented in this slice — non-empty values are rejected with 400 until the flow lands as a follow-up.
"123456"
Response
Created
A recorded form submission.
Unique submission ID.
"fsub_01h2xcejqtf2nbrexx3vqjhp41"
Form definition the submission was made against.
"frm_01h2xcejqtf2nbrexx3vqjhp41"
Document this submission granted access to.
"doc_01h2xcejqtf2nbrexx3vqjhp41"
Lead-capture contact details supplied by the form submitter.
Show child attributes
Show child attributes
When the submission was recorded.
"2025-01-15T10:30:00Z"
Share link the form was reached through, if any.
"shl_01h2xcejqtf2nbrexx3vqjhp41"