Want to upload straight to your account using our API? Please login for account API keys and more information on how to upload files to your account using our API.
Send files with POST and receive a JSON response with the file URL.
curl -F "[email protected]" "https://api.anonfiles.ch/upload?key={YOUR_API_KEY}"
curl -F "[email protected]" "https://api.anonfiles.ch/upload?key={YOUR_API_KEY}&pretty"
{
"status": true,
"data": {
"file": {
"url": {
"full": "https://anonfiles.ch/nCzLKH5hQQL/test_txt",
"short": "https://anonfiles.ch/s/nCzLKH5hQQL"
},
"metadata": {
"id": "nCzLKH5hQQL",
"name": "test.txt",
"s_name": "test_txt",
"size": {
"bytes": 9,
"readable": "9 B"
},
"type": "text/plain",
"extension": ".txt",
"created": "2025-04-07 10:13:07",
"timestamp": 1744020787
}
}
}
}
Get file information using the file ID.
https://api.anonfiles.ch/v3/file/{FILE_ID}/info
https://api.anonfiles.ch/v3/file/nCzLKH5hQQL/info
{
"status": true,
"data": {
"file": {
"url": {
"full": "https://anonfiles.ch/nCzLKH5hQQL/test_txt",
"short": "https://anonfiles.ch/s/nCzLKH5hQQL"
},
"metadata": {
"id": "nCzLKH5hQQL",
"name": "test.txt",
"s_name": "test_txt",
"size": {
"bytes": 9,
"readable": "9 B"
},
"type": "text/plain",
"extension": ".txt",
"created": "2025-04-07 10:13:07",
"timestamp": 1744020787
}
}
}
}
{
"status": false,
"data": {
"file": {
"message": "The file you are looking for does not exist",
"type": "ERROR_FILE_NOT_FOUND",
"code": 33
},
"relay": {
"tlbId": "875655a3-1f56-47fe-9b9d-3945552db99e",
"timestamp": 1722966957189
}
}
}