View Categories

File upload api

2 min read


File upload API can be used to add files to a custom field set depending on the entity (lead,opportunity,activity). Accounts like upgrad use these to upload files in a CFS field for example in the field Aadhar card

Steps to proceed 
Certain pre requisites for using the API include access key, secret key, id, schema name, entity schema name and the entity itself.
Before proceeding with postman it would be suggested to add as it is much simpler to fill compared to the default json format multipart/form-data as content type in your header as it is much simpler to fill compared to the default json format


After this you need to fill out the rest of the parameters mentioned below
ParameterTypeDescription
uploadFilesFileThe file you want to upload
FileTypeNumber0 = Document
1 = Image
3 = Lead Attachment
7 = Custom Field Set Document
AccessKeyStringAccess Key of your LeadSquared account
SecretKeyStringSecret Key of your LeadSquared account
FileStorageTypeNumber0 = Permanent
1 = Temporary
EnableResizeBooleantrue or false

Always set to ‘false’ for Custom Field Sets

IdStringPass the Lead Id if Entity is lead.

Pass the Opportunity Event Code if Entity is opportunity.

Pass the Activity Event Code if the entity is activity.

SchemaNameStringSchema name of the file-type field within the custom field set.
EntitySchemaNameStringSchema name of the lead/activity field with which the custom field set is associated.
EntityNumber0 = Lead
1 = Activity/Opportunity. This is dependent on the Id that’s being passed. If you pass the Activity Event Code as the Id, and then pass 1 as the Entity, the corresponding activity is updated. Similarly, if you pass the Opportunity Event Code as the Id, and then pass 1 as the Entity, the corresponding opportunity is updated.
StorageVersionNumberThe storage version configured.

0 is the default LeadSquared configuration

If you have your own storage configured, pass the value associated with it. For more information, contact your account manager.




API urls depends on the region of the server of the account
What are your Feelings
Scroll to Top
RegionURL