Add a game
const url = 'https://api.thebgdb.org/v1/publisher/games';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Die Abenteuer des Robin Hood","nameLanguage":"de","names":[{"name":"The Adventures of Robin Hood","language":"en"}],"yearPublished":2021,"minPlayers":2,"maxPlayers":4,"minPlaytime":60,"maxPlaytime":90,"minAge":10,"designers":["Michael Menzel"],"publishers":["Kosmos"],"description":"Robin Hood and his companions roam Sherwood Forest in a cooperative adventure for two to four players. The board is a living book: as the story unfolds, its pages change the forest, and every choice opens new paths, characters and endings to discover together.","descriptionOwnWords":true,"officialUrl":"https://www.kosmos.de/robin-hood","coverUrl":"https://www.kosmos.de/images/robin-hood-box.jpg"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.thebgdb.org/v1/publisher/games \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Die Abenteuer des Robin Hood", "nameLanguage": "de", "names": [ { "name": "The Adventures of Robin Hood", "language": "en" } ], "yearPublished": 2021, "minPlayers": 2, "maxPlayers": 4, "minPlaytime": 60, "maxPlaytime": 90, "minAge": 10, "designers": [ "Michael Menzel" ], "publishers": [ "Kosmos" ], "description": "Robin Hood and his companions roam Sherwood Forest in a cooperative adventure for two to four players. The board is a living book: as the story unfolds, its pages change the forest, and every choice opens new paths, characters and endings to discover together.", "descriptionOwnWords": true, "officialUrl": "https://www.kosmos.de/robin-hood", "coverUrl": "https://www.kosmos.de/images/robin-hood-box.jpg" }'Send the facts as multipart/form-data, as JSON in the data field with the image file in cover (preferred), or as JSON with the cover’s address in coverUrl, which we download once and keep our own copy of: the catalog never links to your file. Every requirement of the “Publisher API” section applies.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The game’s name, as printed on its box. Required.
The language of name: “en”, “de”, “pt-BR”. Required.
The game’s name in other languages, each with its language.
object
A language code: “en”, “fr”, “pt-BR”.
game when not said.
Required unless releaseDate is given.
“2026”, “2026-10” or “2026-10-23”, as precise as you know it.
Minutes. Required.
Minutes. minPlaytime when not said.
The age printed on the box. Required.
Required: at least one, by name.
Optional.
Required: must include your publisher as written; co-publishers may follow.
Optional.
Optional.
What the game is and how it plays, in your own words. Plain text: paragraphs separated by a blank line, and lists whose lines start with “- “; no links, HTML or other marks. Required.
States that the description is your own text, not a review’s or a shop’s. Required with description.
One line.
The game’s page on your site (https). Your description is credited to it.
The box’s barcode: EAN-13, or a 12-digit UPC.
The game’s BoardGameGeek number, when it has one.
The cover’s address (https), only to download it from: we copy the image to our storage and never link to it. Sending the file with a form is preferred.
Example
{ "name": "Die Abenteuer des Robin Hood", "nameLanguage": "de", "names": [ { "name": "The Adventures of Robin Hood", "language": "en" } ], "yearPublished": 2021, "minPlayers": 2, "maxPlayers": 4, "minPlaytime": 60, "maxPlaytime": 90, "minAge": 10, "designers": [ "Michael Menzel" ], "publishers": [ "Kosmos" ], "description": "Robin Hood and his companions roam Sherwood Forest in a cooperative adventure for two to four players. The board is a living book: as the story unfolds, its pages change the forest, and every choice opens new paths, characters and endings to discover together.", "descriptionOwnWords": true, "officialUrl": "https://www.kosmos.de/robin-hood", "coverUrl": "https://www.kosmos.de/images/robin-hood-box.jpg"}object
The facts, as the JSON body takes them.
Responses
Section titled “Responses”Taken. status is published when the game is on its way to the catalog (it appears within seconds under id), in_review when a moderator must first say which game it is, unchanged when it said nothing new.
object
object
Example
{ "data": { "submissionId": "0b5d1c7e-8d1b-4c6a-9a4e-3f1d2c3b4a59", "id": "5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77", "status": "published", "cover": { "key": "covers/3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f.jpg", "width": 960, "height": 1280 } }}A requirement is not met: the code says which (game_name_required, game_year_required, game_cover_required…); invalid_game_field names the field in params.field.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}No API token was sent (not_logged_in), or it does not carry the games:write scope (publisher_token_required).
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The token’s member has no access to the Publisher API, or it was withdrawn (publisher_access_required); or the game is not credited to their publisher (not_your_game, game_publisher_not_yours).
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}We already have this game (duplicate_game): game is the one we have, params.id its id.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
object
Never changes. When two entries turn out to be the same game, one is merged into the other: its id then leads to the game it was merged into.
Used in URLs. The name, then the name and year when the name is taken, then a number after it (catan, catan-1995, catan-1995-2). It may change once, by that rule or by a merge; the slug it had keeps leading to the game.
The game’s main name, or its name in the language asked for with lang when it has one.
The game’s main name when name is the one of the language asked for with lang. Null otherwise.
Fewest and most players.
object
The game’s cover: always a path on this API (starts with /v1/media/): a member’s photo or our own copy of the cover. Null when the game has none we hold yet: the API never sends another site’s address for a file. It is the main cover, the original edition’s, unless lang asks for a language the game has a cover of its own in: then it is that one (on a game, every cover is in covers). Texts from Wikipedia and images from Wikimedia Commons are credited, as their licences ask, at https://thebgdb.org/credits and listed by GET /v1/credits.
A middle-sized version of image, for cards and small screens: a path on this API to our copy 500 pixels wide. The same path as image when the cover is no wider than that, when no narrower copy could be made, and for members’ uploads. Null when the game has no cover we hold.
A small version of image, for lists: a path on this API to our copy 250 pixels wide. There is no resizing for members’ uploads, so for those it is the same path as image. Null when the game has no cover we hold.
What the entry is: game a stand-alone game; expansion when it needs another game to be played (see relations.expansionOf on the game); accessory when it is not played at all (sleeves, an insert, a playmat). Everything is a game until a source states otherwise.
What the cover shows: as a vision model judged it, box_front for a cover a moderator chose, or what the member said for a member’s photo shown as the cover. Null when it has not been looked at or when the game has no cover. box_front the whole front of the box; box_back its back; box_partial the box at an angle, cropped, or an overall shot of it; board_traditional the board of a traditional game that never had a box (chess, go); setup the game laid out ready to play; in_play a game in progress, nobody visible; components the pieces, boards and tokens; cards cards; people people playing, or any person, face or hand in the picture; rulebook a page of the rules; logo a title or logo alone; other anything else. New words may be added; treat an unknown one as other.
Whether the cover is a good one: the whole front of the box (or the board of a traditional game), with no person in it, of quality 3 or more (imageQuality), at least 300 pixels on its short side. False means a better cover is wanted. A moderator’s decision overrules what the cover was found to show. Null when nothing has looked at the cover or when the game has none. A member’s approved photo is shown as the cover unless it was found not good while the source’s cover is good.
How good a picture the cover is, as a vision model judged it: 5 a clean, sharp, straight scan or packshot; 3 an honest photo with small faults (some glare, some angle); 1 and 2 blurred, tiny, dark, glaring, skewed, watermarked or cluttered. Below 3 the cover is not a good one (imageAcceptable false). Null when it has not been judged for quality or when the game has no cover.
Width of the cover in pixels, to lay it out before it loads. Null when not measured.
Height of the cover in pixels. Null when not measured.
The language of the edition the cover shows, as a language code (de for a German box). Null unless a source states it reliably, which is rare: most covers say nothing about it.
Members’ ratings. Null when nobody has rated it.
object
Mean of members’ ratings, from 1 to 10.
How many members rated the game.
The average pulled towards the mean of all ratings in the catalog, as if the game had also received 30 ratings at that mean: (30 × catalog mean + sum of the game’s ratings) ÷ (30 + count). It keeps a game with a handful of high ratings from outranking a widely rated one. Ranks and order=rating use it. Brought up to date every hour.
Example
{ "error": "Game not found", "code": "game_not_found", "game": { "id": "5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77", "slug": "catan", "name": "Catan", "originalName": null, "kind": "game", "yearPublished": 1995, "players": { "min": 3, "max": 4 }, "image": "/v1/media/covers/4f1c2b9e.jpg", "medium": "/v1/media/covers/4f1c2b9e-w500.jpg", "thumbnail": "/v1/media/covers/4f1c2b9e-w250.jpg", "rating": { "average": 7.42, "count": 318, "weighted": 7.31 }, "complexity": { "average": 2.29, "votes": 121 } }}The cover is larger than 15 MB.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The cover is not a JPEG, PNG or WebP image.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The cover is too small (cover_too_small, with its size in params), not a box front (cover_not_box_front, with what it shows in params.kind), could not be loaded from its address (image_not_fetched, image_host_refused), or the game could not be published (game_refused).
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}More than 10 writes a minute (posting_too_fast, retry-after: 60), or more than 100 new games or 500 writes in a UTC day (daily_publisher_limit, retry-after in seconds until midnight UTC). Reading is limited as for any token.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The cover could not be checked or copied just now (cover_not_judged, cover_not_stored), or the service that takes games is unavailable (engine_unavailable). Try again in a minute.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}