Amalgadon

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/v1

You 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_here

Don't have an API key yet?

Keys are generated instantly — no approval required.

Request a key ↓

Security guidelines

DoDon'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.
Keys are stored as a one-way SHA-256 hash — the plaintext value is never persisted. You can revoke your key at any time via 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.

EndpointLimitWindow
GET /api/v1/patch-notes10 requests60 seconds
GET /api/v1/card60 requests60 seconds
GET /api/v1/cards5 requests1 hour
GET /api/v1/build/:id60 requests60 seconds
POST /api/v1/build30 requests60 seconds
GET /api/v1/key/me10 requests60 seconds
DELETE /api/v1/key10 requests60 seconds

Rate limit headers are included on every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix timestamp).

Cache data-heavy endpoints locally. All of our endpoints retrieve data that changes infrequently — typically only when a new Hearthstone patch drops. You should store responses in your own database or cache layer and refresh on a suitable schedule rather than fetching on demand.

GET /api/v1/patch-notes

Returns a summary of the latest patch comparison. Requires bearer token authentication. Rate limit: 10 req / 60s per IP.

GET/api/v1/patch-notes

curl

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.

GET/api/v1/card

Query parameters

ParameterRequiredDescription
qYesCard name (fuzzy-matched) or exact card ID.
typeNoRestrict 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.

GET/api/v1/cards

curl

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

FieldTypeNotes
idstringHearthstone card ID.
dbfIdnumberInternal Hearthstone DBF ID.
namestring
textstring?Card text. May contain HTML tags from the Hearthstone data.
attacknumber
healthnumber
techLevelnumberTavern tier (1–6).
racesstring[]?e.g. "MURLOC", "BEAST".
mechanicsstring[]?e.g. "TAUNT", "DIVINE_SHIELD".
goldenCardIdstring?Card ID of the golden variant.
isBuddyboolean?True if this minion is a hero buddy.

Hero object

FieldTypeNotes
idstring
dbfIdnumber
namestring
textstring?Flavour or hero power description.
heroPowerTextstring?Hero power text.
armornumber?Starting armour.

Trinket object

FieldTypeNotes
idstring
dbfIdnumber
namestring
textstring?
tier\"lesser\" | \"greater\"Trinket tier.
racesstring[]?Tribe affinity, if any.

Spell object

FieldTypeNotes
idstring
dbfIdnumber
namestring
textstring?
costnumber?Gold cost.
techLevelnumber?Tavern tier the spell becomes available.
For single-card lookups prefer 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.

GET/api/v1/build/:shareId

curl

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

StatusWhen
404No build found with the given ID.
500Build 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.

POST/api/v1/build

Request body

FieldTypeRequiredDescription
herostringNoHero card name or ID.
slotsSlotInput[]Yes1–7 slot entries (null for empty slots).
lesserTrinketstring | nullNoLesser trinket card name or ID.
greaterTrinketstring | nullNoGreater trinket card name or ID.
titlestringNoBuild title (max 100 chars).
descriptionstringNoBuild notes (max 2000 chars).

SlotInput object

FieldTypeRequiredDescription
namestringname or idCard name. Fuzzy-matched.
idstringname or idHearthstone card ID.
goldenbooleanNoGolden minion.
tauntbooleanNoHas Taunt.
rebornbooleanNoHas Reborn.
divineShieldbooleanNoHas Divine Shield.
windfurybooleanNoHas 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

StatusWhen
400Malformed JSON or invalid field values.
422One or more card names/IDs could not be resolved.
429Rate limit exceeded.

GET /api/v1/key/me

Returns metadata about the authenticated API key without revealing the key itself.

GET/api/v1/key/me

curl

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.

DELETE/api/v1/key

curl

curl https://www.amalgadon.com/api/v1/key \
  -X DELETE \
  -H "Authorization: Bearer amgd_your_key"

Response — 200

{ "revoked": true }
Once revoked, a key cannot be restored. Request a new one via the form below.

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

FieldTypeDescription
hstring | nullHero card ID.
sArray (7)Slot entries — null or card ID + optional :flags.
ltstring?Lesser trinket card ID.
gtstring?Greater trinket card ID.
tstring?Build title (max 100 chars).
dstring?Build description (max 2000 chars).

Slot flags

FlagMeaningExample
gGoldenBG21_002:g
tTauntBG21_002:t
rRebornBG21_002:r
dDivine ShieldBG21_002:d
wWindfuryBG21_002:w
gtrdw (combined)All fiveBG21_002:gtrdw

Error reference

All error responses share the same shape:

{
  "error": "Human-readable message",
  // Optional — present on 422 responses only:
  "unresolved": [{ "field": "...", "input": "..." }]
}
StatusMeaning
200Success.
400Bad request — malformed JSON or invalid field values.
401Missing or invalid Bearer token.
404Resource not found.
422Valid request but one or more cards could not be resolved.
429Rate limit exceeded.
500Internal error.
503Upstream data unavailable.

Request an API key

Fill out the form below — your key will be generated instantly, no approval required.

Keys are shown once. Store yours somewhere safe. If you lose it, request a new one and revoke the old one via DELETE /api/v1/key.