sendspace API (1.2)

> Upload New File

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 (1.2) assumes a UTF-8 encoding.

< Return to Method List

Method: anonymous.filesSendMail

Description

Sends the file link (URL) to the recipient(s), by email.

Arguments
Name Mandatory Description
api_key Yes Received from sendspace
api_version Yes 1.0
app_version No Application specific, formatting / style is up to you
file_id Yes file_id or list of files' id's (a1a1a1,s2s2s2,d3d3d3)
sender_email Yes Sender email
emails Yes List of emails to send
message No Additional message to send the recipients
Returns

id of the file if operation was successful

Response

<!-- successful response -->             
<result method="anonymous.filesSendMail" status="ok">
    <status>ok</status>
    <id>$file_id</id>
</result>    
 
<!-- failed response -->
<result method="anonymous.filesSendMail" status="fail">
        <error code="24" text="Email(s) are invalid"/>
        <id>6wnhxi</id>
</result>
                
Usage Example
                                           
http://api.sendspace.com/rest/?method=anonymous.filessendmail&sender_email=webmasteratsendspacedotcom&file_id=abcdef&emails=webmasteratsendspacedotcom&message=check+this+file
                    
                
Possible Errors
Code Name Description
6 API_ERROR_SESSION_BAD Session expired or not found
9 API_ERROR_FILE_NOT_FOUND File not found
24 API_ERROR_INVALID_EMAIL Email(s) are invalid

Title

Alert