POST - Upload Files
Upload files to a lead
Upload files to a LEAD
Note: Lead ID from the create lead response is required to upload files to Bizmate.
Method: POST 
Endpoint: /attachments/new
Maximum Length: 255
Headers:
Authorization
Bearer <API TOKEN>
Body:
entityType
LEAD
text
LEAD
Identify the entity type
entityId
LEAD_ID
text
7e8a17fd-3577-48f4-a0e4-6cb83ea204ba
Identifier for a LEAD
attachments[0][type]
text, Enum: [ Bank Statements, Proof of Identity or ID, Image ]
Bank Statements
Use the exact values as mentioned in the type
attachments[0][fileName]
text
Some Text
Name of the company.
attachments[0][file]
text
Some Text
File to be attached(only one attachment)
Request Body Example:
To upload multiple files, use the format illustrated in the Multiple Files Upload table, ensuring each file entry follows the structure shown, incrementing the index for each attachment.
Type : form-data
Single File Upload:
entityType
text
LEAD
entityId
text
2e22bca2-b98e-467c-b9d
attachments[0][type]
text
Bank Statements
attachments[0][fileName]
text
attachments[0][file]
file
transaction.pdf
Multiple Files Upload:
entityType
text
LEAD
entityId
text
2e22bca2-b98e-467c-b9d
attachments[0][type]
text
Bank Statements
attachments[0][fileName]
text
attachments[0][file]
file
transaction.pdf
attachments[1][type]
text
Proof of Identity or ID
attachments[1][fileName]
text
Drivers_License_Front
attachments[1][file]
file
license.jpg
Response
{
        "id": "2794fe94bf",
        "createdAt": "2024-12-03T02:31:33.939Z",
        "updatedAt": "2024-12-03T02:31:33.939Z",
        "updatedBy": "2e6-b3c078a66521",
        "createdBy": "2f078a66521",
        "fields": {
            "fileName": "transaction.pdf",
            "type": "Bank Statements",
            "entityType": "LEAD",
            "entityId": "2e22bca2-b98e-9"
        }
  }[
{
        "id": "878570914182",
        "createdAt": "2024-12-03T02:34:59.614Z",
        "updatedAt": "2024-12-03T02:34:59.614Z",
        "updatedBy": "2f7af066521",
        "createdBy": "2f7afce6-b3a66521",
        "fields": {
            "fileName": "transaction.pdf",
            "type": "Bank Statements",
            "entityType": "LEAD",
            "entityId": "2e22561ed4579"
        }
    },
    {
        "id": "4ce8412c7ff06",
        "createdAt": "2024-12-03T02:34:59.615Z",
        "updatedAt": "2024-12-03T02:34:59.615Z",
        "updatedBy": "2f7af0521",
        "createdBy": "2f7a8a66521",
        "fields": {
            "fileName": "Drivers_License_Front.jpg",
            "type": "Proof of Identity or ID",
            "entityType": "LEAD",
            "entityId": "2e22bca2-bd4579"
        }
    }
]Last updated
