REPLACE_ME
with your API key.location
value in payload with url location of your file.callback
value in payload to your webhook url. We recommend using webhook.site as a callback url during test.FILE_LOCATION
with local absolute file pathAsync File Upload
curl --location 'https://api.filescanapi.com/v1/file/async' \
--header 'x-api-key: REPLACE_ME' \
--form 'file=@"FILE_LOCATION"' \
--form 'metadata[filename]="demo.png"' \
--form 'callback="https://webhook.site"'
Async File Location
curl --location 'https://api.filescanapi.com/v1/file/async' \
--header 'x-api-key: REPLACE_ME' \
--header 'Content-Type: application/json' \
--data '{
"location": "https://filescanapi.com/icon.png",
"metadata": {
"filename": "demo.png"
},
"callback": "https://webhook.site"
}'
Sync File Upload
curl --location 'https://api.filescanapi.com/v1/file/sync' \
--header 'x-api-key: REPLACE_ME' \
--form 'file=@"FILE_LOCATION"' \
--form 'metadata[filename]="demo.png"'
Async File Location
curl --location 'https://api.filescanapi.com/v1/file/sync' \
--header 'x-api-key: REPLACE_ME' \
--header 'Content-Type: application/json' \
--data '{
"location": "https://filescanapi.com/icon.png",
"metadata": {
"filename": "demo.png"
}
}'