Discord Template API
A guild template as JSON, including the serialized server layout behind it.
GET /v1/discord/templates/{code}1 credit Failed requests are free
About this endpoint
GET /v1/discord/templates/{code} returns data.template for a public guild template. The record has code, name, description, usageCount, creatorId, createdAt, updatedAt, sourceServerId, and serializedSourceServer with the source server's name, description, region, verification level, notification and content-filter settings, roles and channels.
Each role carries its id, name, permissions, color, hoist, mentionable, icon and unicode emoji. Each channel carries its id, type, name, position, topic, nsfw and parentId. Codes are case-insensitive, and an unknown code returns lookupStatus: not_found.
Discord Template API FAQ
Where do I find the template code?
It is the last part of a template URL, for example hgM48av5Q69A. Codes are case-insensitive. Pass the code as the path parameter.
What can I do with the serialized layout?
serializedSourceServer.roles and channels describe the template's structure, including permissions, colours and channel parents. Use them to compare templates or rebuild a server layout.
Is the creator's user object returned?
No. Only creatorId is returned. The template record and its serialized layout are public, but the creator's user profile is not part of this route.
How many credits does a template lookup cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
Other Discord endpoints
- InviteGET /v1/discord/invites/{code}
- ServerGET /v1/discord/servers/{serverId}
- ServersGET /v1/discord/servers
- Server searchGET /v1/discord/servers/search
- Server widgetGET /v1/discord/servers/{serverId}/widget
- Server indexGET /v1/discord/servers/index
- Game indexGET /v1/discord/games/index
- Trending gamesGET /v1/discord/games/trending