API Introduction
shortText exposes its functionality of creating URLs via an Application Programming Interface (API).
This help page provides reference of that API and how to use it.
HTTP Method
shortText's API is based on the simple HTTP request and response method.
To create a URL for any text, send the text to:
http://shortText.com/api.aspx via the HTTP POST method.
Use the parameter
shorttext for the text being sent.
If everything goes well, you will get a HTTP status code 200 and the generated URL as plain text.
HTTP Status Codes
The shortText API attempts to return appropriate
HTTP status codes for every request. Here's a list of common status codes:
- 200 OK: Everything went well. You should get the URL or a message
- 400 Bad Request: Request sent was invalid, and we'll return an error message that tells you why
- 404 Not Found: The URI requested does not exist
- 500 Internal Server Error: Our bad. Something is wrong at our end
- 502 Bad Gateway: Returned if our service is down or being upgraded
- 503 Service Unavailable: Too many requests coming our way. Please try again later
Text limit
shortText only takes the first 30,000 characters of the text sent via the API. This is to prevent abuse.
This is a beta feature. Please feel free to write to us at
support@shortText.com for comments or suggestions.