Cosyupload.com API documentation

  1. Choose upload server

    [GET] https://cosyupload.com/api/get_upload_server
  2. Choose upload mirrors

    [GET] https://cosyupload.com/api/get_mirror_servers
  3. Get authentication token (optional)

    [GET] https://cosyupload.com/api/get_auth_token

    Mandatory:

    Parameter Example Description
    email email=user_email@example.com User authentication email
    password password=mypasswrodABCD123 User authentication password

  4. Upload a file

    These values must be sent to the previously mentioned upload address for every POST:

    Mandatory:

    Parameter Example Description
    upload upload=/my/path/to_file.txt Path to upload a file.
    upload[servers] upload[servers]=rapidshare;netload_in Upload mirrors separated by a semicolon

    Optional:

    Parameter Example Description
    auth_token auth_token=ABCDEFGH1234 Authentication token for user authentication

  5. Curl example

    curl -F upload=@doc/README_FOR_APP  -F upload[servers]=rapidshare;netload_in http://nl1.cosyupload.com/fast_upload
  6. PHP example

    <?php
    
     $url = 'http://fr1.cosyupload.com/fast_upload';
     $my_file = '@doc/README_FOR_APP';
    
     // File you want to upload/post
     $post_data = array(
      'upload'          => $my_file,
      'upload[servers]' => 'netload_in;uploaded_net'
     );
    
     // Initialize cURL
     $ch = curl_init();
    
     // Set URL on which you want to post the Form and/or data
     curl_setopt($ch, CURLOPT_URL, $url);
    
     // Data+Files to be posted
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data );
    
     // receive server response ...
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
     // Execute the request
     $server_output = curl_exec ($ch);
    
     curl_close ($ch);
    
     echo $server_output;
    
    ?>
  1. Address

    [GET] https://cosyupload.com/api/get_upload_info
  2. Get information about a file

    These values must be sent via GET to this address:

    Mandatory:

    Parameter Example Description
    id id=4f50b93661f658125e00005d Upload file ID

  3. Example

    [GET] https://cosyupload.com/api/get_upload_info?id=4f50b93661f658125e00005d
  1. Address

    [POST] https://cosyupload.com/api/move_upload
  2. Move upload to folder or from folder

    These values must be sent via POST to this address:

    Mandatory:

    Parameter Example Description
    id id=4f50b93661f658125e00005d Upload file ID
    auth_token auth_token=ABCDEFGH1234 Authentication token for user authentication

    Optional:

    Parameter Example Description
    folder_id folder_id=4f8fecf8eaedac7d28000007 Destination folder ID. If destination folder ID is not specified, the upload is pulled out of the folder.

  3. Example

    curl -F id=4f50b93661f658125e00005d -F auth_token=ABCDEFGH1234 folder_id=4f8fecf8eaedac7d28000007 https://cosyupload.com/api/move_upload
  1. Address

    [GET] https://cosyupload.com/api/get_folder_info
  2. Get information about a folder

    These values must be sent via GET to this address:

    Mandatory:

    Parameter Example Description
    id id=4f8fecf8eaedac7d28000007 Folder ID

  3. Example

    [GET] https://cosyupload.com/api/get_folder_info?id=4f8fecf8eaedac7d28000007
  1. Address

    [POST] https://cosyupload.com/api/create_folder
  2. Create a new folder

    These values must be sent via POST to this address:

    Mandatory:

    Parameter Example Description
    title title=folder_name Folder name
    auth_token auth_token=ABCDEFGH1234 Authentication token for user authentication

  3. Example

    curl -F title=folder_name -F auth_token=ABCDEFGH1234 https://cosyupload.com/api/create_folder
  1. Address

    [POST] https://cosyupload.com/api/update_folder
  2. Update existing folder

    These values must be sent via POST to this address:

    Mandatory:

    Parameter Example Description
    id id=4f8fecf8eaedac7d28000007 Folder ID
    title title=folder_name Folder name
    auth_token auth_token=ABCDEFGH1234 Authentication token for user authentication

  3. Example

    curl -F title=folder_name -F auth_token=ABCDEFGH1234 id=4f8fecf8eaedac7d28000007 https://cosyupload.com/api/update_folder
  1. Address

    [POST] https://cosyupload.com/api/delete_folder
  2. Delete existing folder

    These values must be sent via POST to this address:

    Mandatory:

    Parameter Example Description
    id id=4f8fecf8eaedac7d28000007 Folder ID
    auth_token auth_token=ABCDEFGH1234 Authentication token for user authentication

    Optional:

    Parameter Example Description
    force force=1 If force is set to 1, delete folder and all its files. Otherwise delete folder and keep all its files.

  3. Example

    curl -F id=4f8fecf8eaedac7d28000007 -F auth_token=ABCDEFGH1234 -F force=1 https://cosyupload.com/api/delete_folder