{ api/v1 }
API for developers
Register your applications and keep their cards on kodefabrik.dk up to date automatically – from CI, a deploy script or the application itself.
Two kinds of keys
User key kf_u_…
Get it from your account page. Creates applications and manages everything you own.
Get a user keyApp key kf_a_…
Comes with each application you create. Can only read and update that one application – use it in CI or in the application.
Getting started
1.Create an application with your user key. The response contains the application and its app key – store the key, it is only shown once.
curl -X POST https://www.kodefabrik.dk/api/v1/apps \ -H "Authorization: Bearer $KODEFABRIK_USER_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": { "da": "Vagtplan", "en": "Shift Planner" }, "summary": { "da": "Vagtplaner til små teams", "en": "Shift plans for small teams" }, "url": "https://vagtplan.example.dk", "category": "productivity", "visibility": "public" }'2.Update the card with the app key, e.g. on every deploy. Send only the fields that change.
curl -X PATCH https://www.kodefabrik.dk/api/v1/apps/42 \ -H "Authorization: Bearer $KODEFABRIK_APP_KEY" \ -H "Content-Type: application/merge-patch+json" \ -d '{ "status": "live", "summary": { "en": "Now with exports" } }'3.Upload a logo and screenshots. Send the image file itself as the request body.
curl -X PUT https://www.kodefabrik.dk/api/v1/apps/42/logo \ -H "Authorization: Bearer $KODEFABRIK_APP_KEY" \ -H "Content-Type: image/png" \ --data-binary @logo.png curl -X POST https://www.kodefabrik.dk/api/v1/apps/42/screenshots \ -H "Authorization: Bearer $KODEFABRIK_APP_KEY" \ -H "Content-Type: image/png" \ --data-binary @screenshot.png
Good to know
- Applications are private until you make them public. A public application is listed once it has been approved (once).
- Texts are given per language ({ "da": …, "en": … }). If one is missing, the other is shown.
- Errors are returned as application/problem+json (RFC 9457).
- Limits: 60 requests per minute per key, 10 uploads per minute.
- Use ETag/If-Match if several parties may update the same application.
- Logo: square, at least 64×64, max 1 MB. Screenshots: at least 480×240, max 5 MB, up to 8.
Endpoints
Download the OpenAPI specification →https://www.kodefabrik.dk/api/v1
| GET | /me | Who am I |
| GET | /categories | List categories |
| GET | /apps | List your apps |
| POST | /apps | Create an app |
| GET | /apps/{id} | Get an app |
| PATCH | /apps/{id} | Update an app |
| DELETE | /apps/{id} | Delete an app |
| PUT | /apps/{id}/logo | Set the logo |
| DELETE | /apps/{id}/logo | Remove the logo |
| POST | /apps/{id}/screenshots | Add a screenshot |
| PATCH | /apps/{id}/screenshots/{mediaId} | Set alt text or position |
| DELETE | /apps/{id}/screenshots/{mediaId} | Remove a screenshot |
| GET | /apps/{id}/keys | List the app's keys |
| POST | /apps/{id}/keys | Create an app key |
| DELETE | /apps/{id}/keys/{keyId} | Revoke an app key |