Shortener
An API Key is required for this service. See Shared Responses for common error responses.
Shorten A URL
POSThttps://yiff.rocks/create
Query Parameters
| Name | Type | Description |
|---|---|---|
| editable | Boolean | If the shortened url should be editable (you will get a code to edit with) |
Body Parameters
| Name | Type | Description |
|---|---|---|
| code | String | The code to use, random if not specified. |
| credit | String | The name to credit, defaults to the discord name of the user associated with the api key. |
| url * | String | The URL to shorten |
200 OK: Success
{ "success": true, "data": { "code": "ac611fcb338457fc4b3b83ad7072d632", "createdAt": "2026-01-16T13:45:04.851-06:00", "modifiedAt": "2026-01-16T13:45:04.851-06:00", "url": "https://static.femboy.fan/posts/ac/61/ac611fcb338457fc4b3b83ad7072d632.png", "pos": 37509, "credit": "YiffyAPI", "fullURL": "https://yiff.rocks/ac611fcb338457fc4b3b83ad7072d632" } }
409 Conflict: Code In Use
{ "success": false, "code": 1072, "message": "Code has already been taken", "errors": {} }
422 Unprocessable Entity: Code Too Long
{ "success": false, "code": 1070, "message": "Code is too long", "errors": {} }
422 Unprocessable Entity: Invalid Code
{ "success": false, "code": 1071, "message": "Code is invalid", "errors": {} }
422 Unprocessable Entity: Invalid URL
{ "success": false, "code": 1073, "message": "Url is invalid", "errors": {} }
422 Unprocessable Entity: URL Too Long
{ "success": false, "code": 1081, "message": "Url is too long", "errors": {} }
422 Unprocessable Entity: Credit Too Long
{ "success": false, "code": 1074, "message": "Creator name is too long", "errors": {} }
Get A Short URL (Redirect)
GEThttps://yiff.rocks/{code}
Path Parameters
| Name | Type | Description |
|---|---|---|
| code * | String | The code of the short url to get. |
302 Found: Redirect
// Redirected to url
404 Not Found: Not Found
Unknown short url code.
Get A Short URL (Preview)
GEThttps://yiff.rocks/{code}+
Path Parameters
| Name | Type | Description |
|---|---|---|
| code * | String | The code of the short url to get. |
200 OK: Success
// HTML page
404 Not Found: Not Found
Unknown short url code.
Get A Short URL (JSON)
GEThttps://yiff.rocks/{code}.json
Path Parameters
| Name | Type | Description |
|---|---|---|
| code * | String | The code of the short url to get. |
200 OK: Success
{ "success": true, "data": { "code": "ac611fcb338457fc4b3b83ad7072d632", "createdAt": "2026-01-16T13:45:04.851-06:00", "modifiedAt": "2026-01-16T13:45:04.851-06:00", "url": "https://static.femboy.fan/posts/ac/61/ac611fcb338457fc4b3b83ad7072d632.png", "pos": 37509, "credit": "YiffyAPI", "fullURL": "https://yiff.rocks/ac611fcb338457fc4b3b83ad7072d632" } }
404 Not Found: Not Found
{ "success": false, "code": 1075, "error": "A short url with that code was not found." }
Delete A Short URL
DELETEhttps://yiff.rocks/{code}.json
Request Body
| Name | Type | Description |
|---|---|---|
| managementCode * | String | The management code you received when creating the shorturl. |
::
204 No Content: Success
// No Content
401 Unauthorized: Management Code Required
{ "success": false, "code": 1076, "message": "A management code is required." }
401 Unauthorized: Management Code Mismatch
{ "success": false, "code": 1078, "message": "That management code does not match this short url." }
403 Forbidden: No Management Code
{ "success": false, "code": 1077, "message": "That short url cannot be edited by you." }
404 Not Found: Not Found
{ "success": false, "code": 1075, "message": "A short url with that code was not found." }
Modify A Short URL
PATCHhttps://yiff.rocks/{code}.json
Request Body
| Name | Type | Description |
|---|---|---|
| managementCode * | String | The management code you received when creating the shorturl. |
| credit | String | The name to credit, defaults to the discord name of the user associated with the api key. |
| url * | String | The URL to shorten |
204 No Content: Success
// No Content
400 Bad Request: No Changes
{ "success": false, "code": 1080, "message": "No changes were detected." }
401 Unauthorized: Management Code Required
{ "success": false, "code": 1076, "message": "A management code is required." }
401 Unauthorized: Management Code Mismatch
{ "success": false, "code": 1078, "message": "That management code does not match this short url." }
403 Forbidden: No Management Code
{ "success": false, "code": 1077, "message": "That short url cannot be edited by you." }
404 Not Found: Not Found
{ "success": false, "code": 1075, "message": "A short url with that code was not found." }
422 Unprocessable Entity: Invalid URL
{ "success": false, "code": 1073, "message": "Url is invalid", "errors": {} }
422 Unprocessable Entity: URL Too Long
{ "success": false, "code": 1081, "message": "Url is too long", "errors": {} }
422 Unprocessable Entity: Credit Too Long
{ "success": false, "code": 1074, "message": "Creator name is too long", "errors": {} }
