Using API


Get Satarted
API Requests
API Response
API Methods
API Error Codes
Rate Limiting
I have a question or a suggestion, how do I get help?


Get Started
You do not need to use an API Key in order to access our API. But you will earn no credits for clicks on shortened links using our API without a key.
To earn credits you will need to use our API with your key.
After you have registered and confirmed your registration, you will find your API key in your account area.
(You will earn credits automatically for clicks on all links shortened while you are online using the default page or the add link memu, you do not need to use our API)

API Requests
Our Basic API call is requiring just the ul paramater which contains the URL to shorten : http://comyo.net/api.asp?ul=your_url_to_shorten
The following paramaters are optional:
key parameter is your API key, usefull to earn credits for clicks on your shortened links using this API:
http://comyo.net/key=your_api_key&ul=your_url_to_shorten
format which contains the desired output format, there are three options: json, xml or txt (normal text), If format parameter is not specified, json format is used as output. examples:
http://comyo.net/api.asp?ul=your_url_to_shorten : no format and no key are specified, so no crdits will be earned for links shortend using this API call, anf the format will be json.
http://comyo.net/key=your_api_key&ul=your_url_to_shorten : format will be josn, credits will be earned for links shortend using this API call
http://comyo.net/format=your_format&ul=your_url_to_shorten : format will your specified format (one of json, xml or txt), no credits will be earned for links shortend using this API call or
http://comyo.net/key=your_api_key&format=your_format&ul=your_url_to_shorten : format will your specified format (one of json, xml or txt), credits will be earned for links shortend using this API call.
Your URLs sent to our API using the ul parameter must be URL encoded. For more information about URL encoding, see w3schools.

API Response
All API calls will return with the following response values:
status_sode - The code of the call result: 200 will be the code on all valid responses, otherwise the errror code
status_msg - The message of the call result: OK if valid response, otherwise the error message.
data - The shortened URL when a successful request, otherwise empty.
Example Outputs:

json: { "status_code": 200, "status_msg": "OK", "data" : http://comyo.net/xxx }
json: { "status_code": ERROR CODE, "status_txt": "ERROR MESSAGE", "data" : null }

xml: <?xml version="1.0" encoding="UTF-8"?><response><status_code>200</status_code><status_msg>OK</status_msg>
<data>http://comyo.net/xxx</data></response>

xml: <?xml version="1.0" encoding="UTF-8"?><response><status_code>ERROR CODE</status_code><status_msg>ERROR MESSAGE</status_msg><data></data></response>

txt: 200, http://comyo.net/xxx
txt: ERROR CODE, ERROR MESSAGE

API Methods
For the moment, API may be used only to shorten URLs. If needed we may add other methods in the future.

API Error Codes
200 -- OK (no error)
400 -- Rate limit exceeded
500 -- Wrong request
600 -- Spam detected

Rate Limiting
We limits API users to no more than 4 connections from a single IP address. We institutes per-hour, per-user, and per-ip rate limits for our API calls. No more than 40 calls per hour are allowed. If your application will exceed these limits, please Contact Us.

I have a question or a suggestion, how do I get help?
For questions, suggestions or for bug reporting, please Contact Us