sendspace Developer | Documentation

Home
API Howto
Full API Guide
API Keys
Downloads
API Support

sendspace API (beta) Developer Guide

The sendspace Application Programming Interface (API) allows you to embed sendspace services in your applications, programs, or scripts, regardless of platform and programming language.

All communication with the sendspace API (beta) assumes a UTF-8 encoding.

 


< Return to Method List

Method: files.delete

Description
Deletes a single file or more. This action cannot be reversed.
Arguments
Name Mandatory Description
session_key Yes Received from auth.login
file_id Yes file_id or list of files' id's (a1a1a1,s2s2s2,d3d3d3)
Returns
ID of the file if operation was successful
Response
 
<!-- successful response -->
<result method="files.delete" status="ok">
    <id>$file_id</id>
</result>         
 
<!-- failed response -->
<result method="files.delete" status="fail">
        <error code="9" text="File not found"/>
        <id>u5txwy</id>
</result>


Usage Example
requesting deletion of 1 file:
 
http://api.sendspace.com/rest/?method=files.delete&session_key=9i96woykgory1crglmykgycjwa5k2cq2&file_id=2u0v02


requesting deletion of more than 1 file:
 
http://api.sendspace.com/rest/?method=files.delete&session_key=9i96woykgory1crglmykgycjwa5k2cq2&file_id=yqnz48%2Cfbl8my


Possible Errors
Code Name Description
6 API_ERROR_SESSION_BAD Session expired or not found
9 API_ERROR_FILE_NOT_FOUND File not found