Developer API v1
Integrate Amalgadon board building and sharing into your own tools.
Overview
The Amalgadon public API lets you look up cards, create board builds, retrieve shared boards, and manage your API key — all over a simple REST interface.
Base URL:
https://www.amalgadon.com/api/v1You can call GET /api/v1 at any time to get the current endpoint discovery index.
Authentication
All endpoints require a Bearer token in the Authorization header.
GET /api/v1/card?q=Brann HTTP/1.1
Host: www.amalgadon.com
Authorization: Bearer amgd_your_api_key_hereDon't have an API key yet?
Keys are generated instantly — no approval required.
Security guidelines
| Do | Don't |
|---|---|
| Store the key in an environment variable or secrets manager. | Hardcode the key in source code or commit it to a repository. |
| Use the key only in server-side or backend code. | Include the key in client-side JavaScript served to browsers. |
| Revoke and re-request if your key may have been exposed. | Share a single key across multiple independent applications. |
DELETE /api/v1/key.Rate Limits
All endpoints are rate-limited per IP using a fixed window counter. When a limit is exceeded the response status is 429.
| Endpoint | Limit | Window |
|---|---|---|
GET /api/v1/patch-notes | 10 requests | 60 seconds |
GET /api/v1/card | 60 requests | 60 seconds |
GET /api/v1/cards | 5 requests | 1 hour |
GET /api/v1/build/:id | 60 requests | 60 seconds |
POST /api/v1/build | 30 requests | 60 seconds |
GET /api/v1/key/me | 10 requests | 60 seconds |
DELETE /api/v1/key | 10 requests | 60 seconds |
Rate limit headers are included on every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix timestamp).
GET /api/v1/patch-notes
Returns a summary of the latest patch comparison. Requires bearer token authentication. Rate limit: 10 req / 60s per IP.
/api/v1/patch-notescurl
curl https://www.amalgadon.com/api/v1/patch-notes \
-H "Authorization: Bearer amgd_your_key"Response
{
"version": "31.2.3",
"comparison": "31.2.2-to-31.2.3",
"summary": {
"total": 12,
"minions": { "added": 2, "removed": 1, "changed": 4 },
"heroes": { "added": 0, "removed": 0, "changed": 3 },
"trinkets": { "added": 1, "removed": 0, "changed": 1 },
"spells": { "added": 0, "removed": 0, "changed": 0 }
},
"cards": {
"added": [{ "id": "BG_NEW_001", "name": "New Minion" }],
"removed": [{ "id": "BG_OLD_001", "name": "Old Minion" }],
"changed": [{ "id": "BG21_002", "name": "Murloc Tidecaller" }]
},
"detailUrl": "https://www.amalgadon.com/patch-notes/31.2.2-to-31.2.3"
}GET /api/v1/card
Resolves a card by name or ID. Useful for autocomplete, card validation, or fetching detail URLs before building a board.
/api/v1/cardQuery parameters
| Parameter | Required | Description |
|---|---|---|
q | Yes | Card name (fuzzy-matched) or exact card ID. |
type | No | Restrict to a card type: minion, hero, trinket, or spell. |
curl
curl "https://www.amalgadon.com/api/v1/card?q=Murloc+Tidecaller" \
-H "Authorization: Bearer amgd_your_key"
curl "https://www.amalgadon.com/api/v1/card?q=Brann&type=minion" \
-H "Authorization: Bearer amgd_your_key"Response — 200
{
"results": [
{
"id": "BG21_002",
"name": "Murloc Tidecaller",
"type": "minion",
"fuzzy": false,
"text": "Whenever a friendly Murloc is summoned, gain +1 Attack.",
"attack": 1,
"health": 2,
"techLevel": 1,
"races": ["MURLOC"],
"goldenCardId": "BG21_002_G",
"detailUrl": "https://www.amalgadon.com/minion/murloc-tidecaller"
}
]
}GET /api/v1/cards
Returns the full card database in four collections. Intended for bulk import — strictly rate limited at 5 requests per hour.
/api/v1/cardscurl
curl https://www.amalgadon.com/api/v1/cards \
-H "Authorization: Bearer amgd_your_key"Response — 200
Top-level shape:
{
"minions": [ /* BGMinion[] — see object examples below */ ],
"heroes": [ /* BGHero[] */ ],
"trinkets": [ /* BGTrinket[] */ ],
"spells": [ /* BGSpell[] */ ]
}Minion object
| Field | Type | Notes |
|---|---|---|
id | string | Hearthstone card ID. |
dbfId | number | Internal Hearthstone DBF ID. |
name | string | |
text | string? | Card text. May contain HTML tags from the Hearthstone data. |
attack | number | |
health | number | |
techLevel | number | Tavern tier (1–6). |
races | string[]? | e.g. "MURLOC", "BEAST". |
mechanics | string[]? | e.g. "TAUNT", "DIVINE_SHIELD". |
goldenCardId | string? | Card ID of the golden variant. |
isBuddy | boolean? | True if this minion is a hero buddy. |
Hero object
| Field | Type | Notes |
|---|---|---|
id | string | |
dbfId | number | |
name | string | |
text | string? | Flavour or hero power description. |
heroPowerText | string? | Hero power text. |
armor | number? | Starting armour. |
Trinket object
| Field | Type | Notes |
|---|---|---|
id | string | |
dbfId | number | |
name | string | |
text | string? | |
tier | \"lesser\" | \"greater\" | Trinket tier. |
races | string[]? | Tribe affinity, if any. |
Spell object
| Field | Type | Notes |
|---|---|---|
id | string | |
dbfId | number | |
name | string | |
text | string? | |
cost | number? | Gold cost. |
techLevel | number? | Tavern tier the spell becomes available. |
GET /api/v1/card — the bulk export is intended for integrations that maintain their own card index.GET /api/v1/build/:id
Returns a decoded, enriched board build and its view/vote stats.
/api/v1/build/:shareIdcurl
curl https://www.amalgadon.com/api/v1/build/abc123 \
-H "Authorization: Bearer amgd_your_key"Response — 200
{
"id": "abc123",
"code": "pABCDEFGHIJKL...",
"createdAt": "2024-04-18T12:00:00.000Z",
"stats": { "views": 42, "upvotes": 7, "downvotes": 1 },
"build": {
"title": "Murloc Tempo",
"heroes": [{ "id": "BG_HERO_01", "name": "Patches the Pirate", "type": "hero" }],
"slots": [
{ "id": "BG21_002", "name": "Murloc Tidecaller", "type": "minion", "golden": false },
{ "id": "BG20_204", "name": "Sellemental", "type": "minion", "golden": true },
null, null, null, null, null
],
"lesserTrinket": { "id": "BG30_MagicItem_901", "name": "Rock Buddy", "type": "trinket" }
},
"remixUrl": "https://www.amalgadon.com/board-builder?remix=pABCDEFGHIJKL...",
"embedUrl": "https://www.amalgadon.com/embed/abc123"
}Error responses
| Status | When |
|---|---|
| 404 | No build found with the given ID. |
| 500 | Build record exists but could not be decoded. |
POST /api/v1/build
Creates a shareable build from a human-readable board description. Card names are resolved and fuzzy-matched so your integration doesn't depend on exact Hearthstone IDs.
/api/v1/buildRequest body
| Field | Type | Required | Description |
|---|---|---|---|
hero | string | No | Hero card name or ID. |
slots | SlotInput[] | Yes | 1–7 slot entries (null for empty slots). |
lesserTrinket | string | null | No | Lesser trinket card name or ID. |
greaterTrinket | string | null | No | Greater trinket card name or ID. |
title | string | No | Build title (max 100 chars). |
description | string | No | Build notes (max 2000 chars). |
SlotInput object
| Field | Type | Required | Description |
|---|---|---|---|
name | string | name or id | Card name. Fuzzy-matched. |
id | string | name or id | Hearthstone card ID. |
golden | boolean | No | Golden minion. |
taunt | boolean | No | Has Taunt. |
reborn | boolean | No | Has Reborn. |
divineShield | boolean | No | Has Divine Shield. |
windfury | boolean | No | Has Windfury. |
curl
curl https://www.amalgadon.com/api/v1/build \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer amgd_your_key" \
-d '{
"hero": "Patches the Pirate",
"slots": [
{ "name": "Murloc Tidecaller" },
{ "name": "Sellemental", "golden": true },
null, null, null, null, null
],
"lesserTrinket": "Rock Buddy",
"title": "Murloc Tempo"
}'Response — 200
{
"code": "pABCDEFGHIJKL...",
"remixUrl": "https://www.amalgadon.com/board-builder?remix=pABCDEFGHIJKL...",
"shareUrl": "https://www.amalgadon.com/build/abc123",
"embedUrl": "https://www.amalgadon.com/embed/abc123",
"resolved": {
"hero": { "name": "Patches the Pirate", "id": "BG_HERO_01", "fuzzy": false },
"slots": [
{ "name": "Murloc Tidecaller", "id": "BG21_002", "fuzzy": false },
{ "name": "Sellemental", "id": "BG20_204", "fuzzy": false },
null, null, null, null, null
],
"lesserTrinket": { "name": "Rock Buddy", "id": "BG30_MagicItem_901", "fuzzy": false, "tier": "lesser" },
"greaterTrinket": null
}
}Error responses
| Status | When |
|---|---|
| 400 | Malformed JSON or invalid field values. |
| 422 | One or more card names/IDs could not be resolved. |
| 429 | Rate limit exceeded. |
GET /api/v1/key/me
Returns metadata about the authenticated API key without revealing the key itself.
/api/v1/key/mecurl
curl https://www.amalgadon.com/api/v1/key/me \
-H "Authorization: Bearer amgd_your_key"Response — 200
{
"appName": "My Discord Bot",
"createdAt": "2024-04-18T12:00:00.000Z",
"lastUsedAt": "2024-04-20T08:30:00.000Z"
}DELETE /api/v1/key
Immediately revokes the authenticated API key. All subsequent requests using that key will return 401.
/api/v1/keycurl
curl https://www.amalgadon.com/api/v1/key \
-X DELETE \
-H "Authorization: Bearer amgd_your_key"Response — 200
{ "revoked": true }Build code format
If you already have card IDs from GET /api/v1/cards and want to construct a deep-link without a server round-trip, you can encode a board client-side using pako (deflate, level 9) + base64url encoding. Prepend the version prefix p.
CompactState schema
{
"h": "BG_HERO_01",
"s": ["BG21_002", "BG20_204:g", "BG_CFM_312:t", null, null, null, null],
"lt": "BG30_MagicItem_901",
"t": "Murloc Tempo",
"d": "Early curve into Murlocs with Brann for value."
}Field reference
| Field | Type | Description |
|---|---|---|
h | string | null | Hero card ID. |
s | Array (7) | Slot entries — null or card ID + optional :flags. |
lt | string? | Lesser trinket card ID. |
gt | string? | Greater trinket card ID. |
t | string? | Build title (max 100 chars). |
d | string? | Build description (max 2000 chars). |
Slot flags
| Flag | Meaning | Example |
|---|---|---|
g | Golden | BG21_002:g |
t | Taunt | BG21_002:t |
r | Reborn | BG21_002:r |
d | Divine Shield | BG21_002:d |
w | Windfury | BG21_002:w |
gtrdw (combined) | All five | BG21_002:gtrdw |
Deep-link formats
| URL | Behaviour |
|---|---|
/board-builder?remix=<code> | Opens the builder with the board pre-loaded and editable. |
/build/<id> | Read-only permalink. Includes upvote/downvote and Remix button. |
/embed/<id> | Minimal iframe-embeddable view. |
/embed/<id>?hideTitle=1 | Embed view with build title hidden. |
Embedding example
<iframe
src="https://www.amalgadon.com/embed/abc123"
width="700"
height="220"
style="border: none; border-radius: 8px;"
title="Hearthstone Battlegrounds board"
></iframe>Error reference
All error responses share the same shape:
{
"error": "Human-readable message",
// Optional — present on 422 responses only:
"unresolved": [{ "field": "...", "input": "..." }]
}| Status | Meaning |
|---|---|
| 200 | Success. |
| 400 | Bad request — malformed JSON or invalid field values. |
| 401 | Missing or invalid Bearer token. |
| 404 | Resource not found. |
| 422 | Valid request but one or more cards could not be resolved. |
| 429 | Rate limit exceeded. |
| 500 | Internal error. |
| 503 | Upstream data unavailable. |
Request an API key
Fill out the form below — your key will be generated instantly, no approval required.
DELETE /api/v1/key.