This is the repository for the ThemeLibrary website including it's API.
Use our new badge in your README to show people where to find your theme!

<a href="https://themes.equicord.org/theme/1">
<img src="https://themes.equicord.org/badge.png" alt="Description" width="125" />
</a>This API is used to retrieve themes used for the Theme Library and this website.
This website is built with React.
Note
Not all endpoints are listed here, either they're internal/admin endpoints or something else. You're free to read the source code yourself! :)
Base: https://api.themes.equicord.org/ (you can also request via https://themes.equicord.org/api)
Base CDN: https://cdn.themes.equicord.org/
Wants theme as query
- Returns information about a specific theme.
fetch("https://api.themes.equicord.org/Monocord")- Content-Type:
text/css - Returns 200, 404 or 405
/**
* @name Monocord
* @author catpurrchino
* @description Discord Design based on the Monospace font
* @version 1.0.0
* @source https://github.com/faf4a/snippets
*/
@import url("https://raw.githubusercontent.com/Faf4a/snippets/main/Monocord/main.css");Wants theme as query
- Returns thumbnail from a theme.
Note
Redirects permanently to a cloudflare worker, you can directly access it via https://cdn.themes.equicord.org/theme/{name}
fetch("https://api.themes.equicord.org/thumbnail/Cyan")- Content-Type:
image/png,image/giforimage/webp - Returns 200, 404 or 405
Wants themeId as query
- Returns theme content and attempts to download, also increases download count.
fetch("https://api.themes.equicord.org/thumbnail/Cyan")- Content-Type:
text/css - Returns 200, 404 or 405
Wants themeId as query
- Returns data of a theme.
fetch("https://api.themes.equicord.org/thumbnail/Cyan")- Content-Type:
application/json - Returns 200, 404 or 405
{
"id": Number,
"name": String,
"type": "theme" | "snippet",
"description": String,
"author": {
"discord_snowflake": String | null,
"discord_name": String | null,
"github_name": String | null,
},
"tags": Array,
"thumbnail_url": String,
"release_date": Date,
"last_updated?": Date,
"guild": {
"name": String | null,
"invite_link": String | null,
"snowflake": String | null,
},
"content": String,
"source": String,
"likes": Number
}- Returns all available themes.
fetch("https://api.themes.equicord.org/themes")- Content-Type:
application/json - Cache-Control: max-age=1200
- Returns 200 or 405
Note
Content is encoded in Base64
[
{
"id": Number,
"name": String,
"type": "theme" | "snippet",
"description": String,
"author": {
"discord_snowflake": String | null,
"discord_name": String | null,
"github_name": String | null,
},
"tags": Array,
"thumbnail_url": String,
"release_date": Date,
"last_updated?": Date,
"guild": {
"name": String | null,
"invite_link": String | null,
"snowflake": String | null,
},
"content": String,
"source": String,
"likes": Number
}, {...}
]- Returns data about all liked themes.
fetch("https://api.themes.equicord.org/likes/get")- Content-Type:
application/json - Returns 200 or 405
- Wants
Authorizationinheaders
Note
hasLiked is not included if no Authorization header is provided with valid credentials!
{
"status": 200,
"likes": [
{
"themeId": Number,
"likes": Number,
"hasLiked": Boolean
},
{...}
}Wants Authorization in headers (unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and themeId in body.
- Adds likes to a given theme.
- Requires to be authorized.
fetch("https://api.themes.equicord.org/likes/add", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer API_KEY"
},
body: JSON.stringify({ themeId: 0 })
})- Content-Type:
application/json - Returns 200, 401, 405, 409, or 500.
{
"status": 200
}Wants Authorization in headers (unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and themeId in body.
- Removes likes from a given theme.
- Requires to be authorized.
fetch("https://api.themes.equicord.org/likes/remove", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer API_KEY"
},
body: JSON.stringify({ themeId: 0 })
})- Content-Type:
application/json - 200 or 405
{
"status": 200
}Wants Authorization in headers (unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and content in body.
- Removes likes from a given theme.
- Requires to be authorized.
- Content must be encoded in Base64, content must include metadata (name, author, description), can include others otherwise the request will be rejected with 405
fetch("https://api.themes.equicord.org/submit/theme", {
method: "POST",
headers: {
"Content-Type": "application/json"
"Authorization": "Bearer API_KEY"
},
body: JSON.stringify({ content: "" })
})- Content-Type:
application/json - 200, 400 or 405
{
"status": 200
}Base: https://api.themes.equicord.org/user
Wants code as query
- Authenticates a user using their access token, this should be only done once. The token returned will be the "password" to your account.
Don't call the endpoint directly, it will return 401, use discord.
https://discord.com/oauth2/authorize?client_id=1464006702125940736&response_type=code&redirect_uri=https://api.themes.equicord.org/user/auth&scope=identify
fetch("https://api.themes.equicord.org/user/auth?code=ACCESS_TOKEN")- Content-Type:
application/json - 200, 400 or 405
{
"status": 200,
"token": "UNIQUE_USER_TOKEN" // hashed token
}Wants Authorization in headers (unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN).
- Returns the user data based on the unique user token.
fetch("https://api.themes.equicord.org/user/findUserByToken", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer API_KEY"
}
})- Content-Type:
application/json - 200, 401 or 405
{
"status": 200,
"user": {
"id": User["id"]
"createdAt": Date
}
}Wants Authorization in headers (unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and userId in body.
- Deletes user data associated with the token.
fetch("https://api.themes.equicord.org/user/revoke", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer API_KEY"
},
body: JSON.stringify({ userId: "" })
})- Content-Type:
application/json - 200, 401 or 405
{
"status": 200
}