API - URL Create

Endpoint

POST /api/url/create

Description

Shorten a long URL. Creates a Tiny URL to share.

Optionally accepts a hash parameter allowing you to chose your own Tiny URL hash.

Parameters

Name Required Description
url Yes URL must be sent as part of the POST. This a string of the long URL you wish to shorten.
hash Optional The hash you wish to use for your shortened URL. If not supplied, a random has will be generated.

Request Type

POST

What are request types?

Example Response

{
    data: {
        hash: "1234",
        url: "http://www.example.com/some-long-url-i-want-shortened",
        created: "2014/09/10 23:32:19 +00:00"
    }
}

Error Codes Returned

The following error codes may be returned by this api endpoint.

Error Required Description
ITEM_ALREADY_EXISTS1001Item you tried to create already exists
MISSING_PARAMETER1100 One or more parameters were missing
INVALID_PARAMETER1101 Supplied parameter was invalid

For a complete list of error codes, view the error handling documentation.