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
Request Body
422: Unprocessable Entity Code Too Long 422: Unprocessable Entity Invalid Code 409: Conflict Code In Use 422: Unprocessable Entity Invalid URL 422: Unprocessable Entity Credit Too Long 200: OK Already Exists 201: Created Success 503: Service Unavailable Read Only
Copy // Max: 50
{
"success" : false ,
"error" : "Provided code is too long." ,
"code" : 1070
}
Copy // Allowed: a-z, A-Z, -, 0-9
{
"success" : false ,
"error" : "Invalid characters in code." ,
"code" : 1071
}
Copy {
"success" : false ,
"error" : "Code already in use." ,
"code" : 1072
}
Copy // 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
}
Copy // Max: 50
{
"success" : false ,
"error" : "Provided credit is too long." ,
"code" : 1074
}
Copy {
"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
}
}
Copy {
"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
}
}
Copy {
"success" : false ,
"error" : "Service is currently in read-only mode." ,
"code" : 2
}
Get A Short URL (Redirect)
GET
https://yiff.rocks/:code
302: Found Redirect 404: Not Found Not Found
Copy // Redirected to original url
Copy Unknown short url code.
Get A Short URL (Preview)
GET
https://yiff.rocks/:code+
200: OK Success 404: Not Found Not Found
Copy Unknown short url code.
Get A Short URL (JSON)
GET
https://yiff.rocks/:code.json
200: OK Success 404: Not Found Not Found
Copy {
"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}"
}
}
Copy {
"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
401: Unauthorized Management Code Required 404: Not Found Not Found 403: Forbidden No Management Code 401: Unauthorized Management Code Mismatch 204: No Content Success 503: Service Unavailable Read Only
Copy {
"success" : false ,
"error" : "You must provide an authorization code. These are created at the time the short url was created." ,
"code" : 1076
}
Copy {
"success" : false ,
"error" : "A short url with that code was not found." ,
"code" : 1075
}
Copy {
"success" : false ",
"error" : "That short url does not have a management code, so it cannot be deleted." ,
"code" : 1077
}
Copy {
"success" : false ,
"error" : "That management code does not match this short url." ,
"code" : 1078
}
Copy {
"success" : false ,
"error" : "Service is currently in read-only mode." ,
"code" : 2
}
Modify A Short URL
PATCH
https://yiff.rocks/:code
If Read Only is enabled, a 503 Service Unavailable will be returned.
Request Body
401: Unauthorized Management Code Required 404: Not Found Not Found 403: Forbidden No Management Code 401: Unauthorized Management Code Mismatch 422: Unprocessable Entity Invalid URL 409: Conflict URL In Use 422: Unprocessable Entity Credit Too Long 400: Bad Request No Changes Detected 200: OK Success 503: Service Unavailable Read Only
Copy {
"success" : false ,
"error" : "You must provide an authorization code. These are created at the time the short url was created." ,
"code" : 1076
}
Copy {
"success" : false ,
"error" : "A short url with that code was not found." ,
"code" : 1075
}
Copy {
"success" : false ",
"error" : "That short url does not have a management code, so it cannot be modified." ,
"code" : 1077
}
Copy {
"success" : false ,
"error" : "That management code does not match this short url." ,
"code" : 1078
}
Copy // 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
}
Copy {
"success" : false ,
"error" : "The provided url is already in use." ,
"code" : 1079
}
Copy // Max: 50
{
"success" : false ,
"error" : "Provided credit is too long." ,
"code" : 1074
}
Copy {
"success" : false ,
"error" : "No changes were detected." ,
"code" : 1080
}
Copy {
"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}"
}
}
Copy {
"success" : false ,
"error" : "Service is currently in read-only mode." ,
"code" : 2
}