リファレンスHTTP APIWorkspace settings

Make an achievement type

POST
/v1/achievement-types

Owners and admins (achievement_rule.manage), signed in; API keys are refused. key matches [a-z][a-z0-9_]{1,40} and is unique in the workspace, archived types included (409 ALREADY_EXISTS, details.reason_code: key_taken); key and evidence_kind never change afterwards. A workspace holds at most 50 types that are not archived (409 REVISION_CONFLICT, details.reason_code: limit_reached). Writes a create_achievement_type receipt.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
key*string
Match^[a-z][a-z0-9_]{1,40}$
name*string
Length1 <= length <= 40
evidence_kind*string
Value in"github_pull_request""github_review""out_file""conversation"

Response Body

The type made, and its receipt.

application/json
  1. response
type*
receipt_id*|null
Example Request
curl -X POST 'https://example.com/v1/achievement-types' \  -H 'Content-Type: application/json' \  -d '{  "key": "design_doc",  "name": "Design doc",  "evidence_kind": "out_file"}'
Example Response
{  "type": {    "id": "6c2f3d4e-5a6b-4c7d-9e8f-0a1b2c3d4e5f",    "key": "design_doc",    "name": "Design doc",    "evidence_kind": "out_file",    "builtin": false,    "created_by": "3e7f1a90-5c2d-4b8e-8f61-2a9d0c4b7e35",    "created_at": "2026-11-02T01:00:00.000Z",    "archived_at": null,    "archived_by": null  },  "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}