Shortener
An API Key is required for this service. See Shared Responses for common error responses.
Shorten A URL
POST https://yiff.rocks/create
If Read Only is enabled, a 503 Service Unavailable will be returned.
Query Parameters
editable
Boolean
If the shortened url should be editable (you will get a code to edit with)
Request Body
code
String
The code to use, random if not specified.
credit
String
The name to credit, Unknown if not specified.
url*
String
The URL to shorten.
// Max: 50
{
"success": false,
"error": "Provided code is too long.",
"code": 1070
}// Allowed: a-z, A-Z, -, 0-9
{
"success": false,
"error": "Invalid characters in code.",
"code": 1071
}{
"success": false,
"error": "Code already in use.",
"code": 1072
}// RegEx: /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i
{
"success": false,
"error": "Invalid url provided.",
"code": 1073
}// Max: 50
{
"success": false,
"error": "Provided credit is too long.",
"code": 1074
}{
"success": true,
"data": {
"code": "",
"createdAt": "0000-00-00T00:00:00.000Z",
"modifiedAt": "0000-00-00T00:00:00.000Z", // nullable
"url": "",
"pos": 0,
"credit": "",
"fullURL": "https://yiff.rocks/{code}",
"managementCode": null
}
}{
"success": true,
"data": {
"code": "",
"createdAt": "0000-00-00T00:00:00.000Z",
"modifiedAt": "0000-00-00T00:00:00.000Z", // nullable
"url": "",
"pos": 0,
"credit": "",
"fullURL": "https://yiff.rocks/{code}",
"managementCode": "" // nullable, save if you plan on editing later
}
}Get A Short URL (Redirect)
GET https://yiff.rocks/:code
// Redirected to original urlUnknown short url code.Get A Short URL (Preview)
GET https://yiff.rocks/:code+
// HTML PageUnknown short url code.Get A Short URL (JSON)
GET https://yiff.rocks/:code.json
{
"success": true,
"data": {
"code": "",
"createdAt": "0000-00-00T00:00:00.000Z",
"modifiedAt": "0000-00-00T00:00:00.000Z", // nullable
"url": "",
"pos": 0,
"credit": "",
"fullURL": "https://yiff.rocks/{code}"
}
}{
"success": false,
"error": "A short url with that code was not found.",
"code": 1075
}Delete A Short URL
DELETE https://yiff.rocks/:code
If Read Only is enabled, a 503 Service Unavailable will be returned.
Request Body
managementCode*
String
The management code you received when creating the shorturl.
{
"success": false,
"error": "A short url with that code was not found.",
"code": 1075
}{
"success": false",
"error": "That short url does not have a management code, so it cannot be deleted.",
"code": 1077
}// No ContentModify A Short URL
PATCH https://yiff.rocks/:code
If Read Only is enabled, a 503 Service Unavailable will be returned.
Request Body
managementCode*
String
The management code you received when creating the shorturl.
credit
String
The new credit name for the url.
url
String
The new url for the shorturl.
{
"success": false,
"error": "A short url with that code was not found.",
"code": 1075
}{
"success": false",
"error": "That short url does not have a management code, so it cannot be modified.",
"code": 1077
}// RegEx: /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i
{
"success": false,
"error": "Invalid url provided.",
"code": 1073
}{
"success": false,
"error": "The provided url is already in use.",
"code": 1079
}// Max: 50
{
"success": false,
"error": "Provided credit is too long.",
"code": 1074
}{
"success": false,
"error": "No changes were detected.",
"code": 1080
}{
"success": true,
"data": {
"code": "",
"createdAt": "0000-00-00T00:00:00.000Z",
"modifiedAt": "0000-00-00T00:00:00.000Z", // nullable
"url": "",
"pos": 0,
"credit": "",
"fullURL": "https://yiff.rocks/{code}"
}
}Last updated
Was this helpful?