- Docs
- Developer API
- Achievements from your server
Achievements from your server
Create, change and list your game's achievements from a script or your own server with an application's client ID and secret, plus a prompt that has an AI assistant set it all up.
The dashboard's Achievements tab is the usual way to set up achievements. If your game has many, or you keep them in your code and want them to stay in step, a script can create and change them for you through this API.
This is not part of the SDK. It needs your application's client
secret, and the secret must never be in your game's code or anywhere a
player's browser can read it. Call it from your own server, a build or deploy
script, or your computer. The game still unlocks achievements with
ArcadeSDK.unlock() as before.
Credentials
- Open Settings > Applications and register an application (or use the one you made for sign-in). Any redirect address will do if you only use it here.
- Copy its client ID and client secret. The secret is shown once; you can rotate it on the same page.
- Find your game's id: it is the number in your dashboard's address,
/dashboard/games/<id>.
An application can manage the achievements of every game of the account that registered it, and of no other. It can change them only while that account could in the dashboard: its email address confirmed, not muted, not banned, and the game not removed by the staff.
Each request authenticates with HTTP Basic:
Authorization: Basic base64(<client ID>:<client secret>)
Endpoints
All addresses are on https://synthcade.net. Send bodies as JSON
(Content-Type: application/json). One application can make 120 requests a
minute.
GET /api/games/<id>/achievements |
Every achievement of the game in its order, retired ones too |
POST /api/games/<id>/achievements |
Add one. 201 with the achievement; a key the game already has is 422 |
PUT /api/games/<id>/achievements/<key> |
Add the achievement with this key (201), or change it (200). Safe to repeat |
The fields of a body:
| Field | |
|---|---|
key |
POST only (for PUT it is in the address): 1 to 40 lowercase letters, digits, - and _, starting with a letter or a digit. A key never changes |
name |
Up to 60 characters. Required when adding one |
description |
How to earn it, up to 200 characters. Optional |
icon |
One of the icon names below. trophy when left out |
color |
gold (when left out), orange, red, pink, purple, blue, teal, green or grey |
secret |
true hides the name and description until a player earns it |
retired |
true stops it being earned (players who have it keep it); false brings it back |
With PUT on an achievement that exists, a field you leave out keeps its
value, so you can change one thing without restating the rest. Nothing
changes (and nothing is logged) when everything you send is already so.
Icons: trophy, medal, award, badge-check, crown, star,
sparkles, sparkle, gift, party, gamepad, joystick, dices,
puzzle, target, swords, shield, shield-check, ghost, bug, zap,
flame, rocket, trending-up, gauge, heart, heart-pulse, compass,
map-pin, globe, flag, door-open, key, unlock, eye, search,
radar, brain, lightbulb, book-open, scroll, graduation-cap,
hammer, wrench, wand, palette, blocks, package, store, bot,
clock, hourglass, timer, alarm, sun, moon, users, handshake,
smile, thumbs-up.
A game can have up to 100 achievements, retired ones included. New ones go to the end of the list; change the order on the dashboard tab. Deleting is only on the dashboard tab too: an API can retire one but not delete it.
Example
curl -X PUT "https://synthcade.net/api/games/123/achievements/first-win" \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"name": "First win", "description": "Win your first match.", "icon": "trophy", "color": "gold"}'
The answer:
{
"ok": true,
"achievement": {
"key": "first-win",
"name": "First win",
"description": "Win your first match.",
"icon": "trophy",
"color": "gold",
"secret": false,
"retired": false,
"position": 1,
"earned_by": 0,
"created_at": "2026-11-30T14:05:00Z"
}
}
The list (GET) answers {"ok": true, "game": {"id", "title"}, "achievements": [...], "limit": 100}, each achievement shaped as above.
Errors
A refusal answers {"ok": false, "error": {"code", "message"}}; a 422 adds
fields, the problem with each field ({"key": "This game already has an achievement with that key."}).
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_client |
No Basic credentials, or a wrong client ID or secret |
| 403 | client_suspended |
The staff suspended the application |
| 403 | account_banned, account_muted, unverified |
The account that registered the application cannot make changes now |
| 403 | game_locked |
The staff removed the game |
| 404 | not_found |
The account has no game with that id |
| 422 | validation |
A field is wrong: see fields |
| 429 | rate_limited |
More than 120 requests in a minute; wait for Retry-After seconds |
Every change is recorded in your game's history like one made on the dashboard, with the application that made it.
Let an AI assistant set it up
Paste this into your AI coding assistant, fill in the parts in <…>, and it
can write a script that keeps your achievements on Synthcade in step with
a list in your project:
Set up automatic syncing of my game's achievements to Synthcade, and change
nothing else in my game. First read https://synthcade.net/docs/dev/achievements-api and
follow it exactly; it is the whole API. For how the game itself unlocks them,
read https://synthcade.net/docs/dev/achievements.
- Keep the list of achievements in one file in my project, <for example
achievements.json>, with for each one: key, name, description, icon, color,
secret and retired. Use only the icon names and colours the page lists. If
my game already unlocks achievements, take the keys from the code that calls
ArcadeSDK.unlock(), and ask me for names and descriptions you cannot tell.
- Write a script in <my language, for example Node or Python> that sends each
achievement with PUT /api/games/<game id>/achievements/<key>, so running it
again is always safe, then reads GET /api/games/<game id>/achievements and
reports any achievement on the site that is missing from the file (do not
retire or change those unless I say so).
- Read the client ID and secret from the environment variables
ACHIEVEMENTS_CLIENT_ID and ACHIEVEMENTS_CLIENT_SECRET. Never write the secret into
any file, never commit it, and never put it in the game's code or anything a
browser loads. Add the variables to .env.example without values.
- Never change a key once it is published: to replace an achievement, add a new
key and set "retired": true on the old one.
- Stop with a clear message on a 401, 403 or 404, and show the "fields" of a
422. On a 429, wait for Retry-After seconds and go on.
- <Optional: run the script in my deploy step, <where>, after the game is
uploaded.>
- Do not add or change any ArcadeSDK.unlock() calls unless I ask.
My game's id on Synthcade is <game id>.