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 (1.2) assumes a UTF-8 encoding.
< Return to Method List
Method: folders.delete
- Description
Deletes a folder including all sub-folders and files inside.
- Arguments
Name | Mandatory | Description |
session_key | Yes | Received from auth.login |
folder_id | Yes | folder_id or list of folders' id's (a1a1a1,s2s2s2,d3d3d3) |
- Returns
Minimal folder tag(s) and comma-separated list of IDs suceeded to delete in an "id" tag. One or several error messages, optionally containing specific reason and IDs of those folders failed in an "id" property.
- Response
<!-- successful response -->
<result method="folders.delete" status="ok">
<id>abcdef,abcdeg</id>
<folder id="abcdef" />
<folder id="abcdeg" />
</result>
<!-- failed response -->
<result method="folders.delete" status="fail">
<error code="..." text="Permission denied"/>
</result>
<!-- mixed response -->
<result method="folders.delete" status="ok">
<id>abcdef,abcdeg<id>
<folder id="abcdef" />
<folder id="abcdeg" />
<error code="..." text="..." id="abcdeh,abcdek" />
<error code="..." text="..." id="abcdei,abcdej" />
</result>
- Usage Example
http://api.sendspace.com/rest/?method=folders.delete&session_key=9i96woykgory1crglmykgycjwa5k2cq2&folder_id=id1y0r
- Possible Errors
Code | Name | Description |
6 | API_ERROR_SESSION_BAD | Session expired or not found |
10 | API_ERROR_FOLDER_NOT_FOUND | Folder not found |
11 | API_ERROR_PERMISSION_DENIED | Permission denied |
14 | API_ERROR_FOLDER_NOT_EMPTY | Folder is not empty |