Skip to main content

Upload file

Description

Uploads a file.

Request URL

Method: POST

https://example.com/api/v1.1/file_upload

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default– json
headerstring"emails.csv"YesFile name
datastring"data:text/csv;base64,YQpi..."Yesbase64 encoded file

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"data": "data:text/csv;base64,SEVMTE8K",
"header": "US.csv"
}

Response example

{
"data": {
"file": "fd7006e5-5c42-4eba-aa6a-f6cb7f5cb6f2"
},
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
filestringUnique file ID