You can create short ragv.im URLs on the go in your web application or any script using this api. You just need to create API key(s) for your application(s) and request our REST API on following URL that returns response in JSON format.
API Endpoint: https://ragv.im/api
Request Parameters:
- key = Your application key
- url = The long URL to create short URL
- token = Specify your own short URL (min. 5 chars), throws error if specified token already exists (ie. https://ragv.im/token) (Not available in Free plan)
- expires = No. of seconds for which the short URL should be active
- destruct = Pass 1 to destroy the short URL once it's opened, default is 0
- dir = Structure your short URL (ie. https://ragv.im/dir/SHORT_CODE) (Available only in Professional & Enterprise plans)
Response:
- code = Response code (200 for success)
- message = The error message if the response code is not 200
- shortUrl = Short url generated
- hits = No. of hits of the short URL, if it already existed