For AI agents: visit https://docs.flexfactor.io/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI.
Attach a document to an application
| Parameter | Description |
|---|
{id} | The unique application identifier returned during application creation or listing endpoints. |
bearer token | The auth token returned by /oauth2/token |
| Field Name | Type | Required | Description |
|---|
document | File | Yes | The file to be uploaded. Must conform to accepted formats and size limits. |
documentType | String | Yes | Specifies the type of document being uploaded (e.g., "ID", "ProofOfAddress", "BusinessLicense"). |
description | String | Optional | An optional description or note about the document. |
- Maximum size per file: 10MB
| Field Name | Type | Description |
|---|
status | String | Status of the upload request (SUCCESS, FAILED). |
success | Boolean | Indicates if the document upload was successful. |
result | String | A confirmation message for the document upload (e.g., "Document uploaded successfully."). |
errors | Array of Strings | Any errors encountered during the upload process. |
uploadedDocumentId | String | The unique identifier assigned to the uploaded document. |
❕
- Maintain secure storage of sensitive documents, adhering to compliance requirements.
- Use the
DocumentId for further actions related to the document, such as retrieval or deletion.
curl --request POST \
--url https://api-sandbox.flexfactor.io/v1/onboarding/application/{application_id}/documents \
--header 'Authorization: Bearer {the token returned by /oauth2}' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--form 'document=@"/path/to/document.pdf"' \
--form 'documentType="ID"' \
--form 'description="Uploaded government-issued ID"'
{
"status": "SUCCESS",
"success": true,
"result": "Document uploaded successfully.",
"uploadedDocumentId": "document_789012",
"errors": []
}
{
"status": "FAILED",
"success": false,
"result": null,
"uploadedDocumentId": null,
"errors": [
"Unsupported file format.",
"Document size exceeds the maximum limit."
]
}
- If the file format is not supported or the file size exceeds the limit, the API will return an appropriate error message.
- If the bearer token is invalid or missing, the API will respond with an Unauthorized error.
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"errors": [
"Unsupported file format."
]
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"errors": [
"Authentication failed. Invalid bearer token."
]
}
Updated about 20 hours ago