API submissions

API submissions let you submit things from an automated process without using cookies to store your login session. Try to use SSL where possible, anyone with your API secret string can submit stuff as you.

First, you will need to generate an API key for your account. Visit your Profile Page to view or generate a new one.

A standard HTTP URL encoded POST request to /new.php with your API key in the URL query string with the key value pair, apikey=<your API key>

An example program you can use is ​cURL, whose command line is like: curl --data-urlencode "type=5" --data-urlencode "url=http://example.com/test.torrent" --data-urlencode "comment=API test" --data-urlencode "website=https://tokyotosho.info/" --data-urlencode "apikey=123456-asdfasdfasdfasdfasdfasdf" --data-urlencode "send=true" https://www.tokyotosho.info/new.php

This has the following POST data:

type (required, 5 = Other, see other values on the form source code at ​https://www.tokyotosho.info/new.php)
url (required, URL of your torrent)
comment (optional, comment for your submission)
website (optional, website URL)
apikey (this is your API key shown on your profile page)
send (required, dummy value for form) 

If successful, the website will return the following: OK,idnumber

idnumber is the ID number where it will be located at details.php?id=1234 for example

API deletions

Similar to above, you'll need an API key generated.

A standard HTTP URL encoded POST request to /delete_torrent.php with your API key in the URL query string with the key value pair, apikey=<your API key>

An example program you can use is ​cURL, whose command line is like: curl --data-urlencode "torrent_id=123456" --data-urlencode "action=delete" --data-urlencode "apikey=123456-asdfasdfasdfasdfasdfasdf" https://www.tokyotosho.info/delete_torrent.php

This has the following POST data:

torrent_id (The ID number you wish to delete, this is the same value of the URL on the details.php page)
action (delete or hide)
apikey (this is your API key shown on your profile page) 

If successful, the website will return the following: OK,deleted,torrent_id or OK,hidden,torrent_id