wortwerk
Documentation

API reference

Every endpoint of the public API, generated from the same schemas the server validates requests with.

Base URL
https://wortwerk.li/api/v1
Authentication
Authorization: Bearer <token> · Tokens and scopes
OpenAPI
openapi.json · OpenAPI 3.1, 1.0.0

Auth

Start a device login

POST/auth/device no token needed

OAuth 2.0 device authorization (RFC 8628). Show userCode to the user, open verificationUriComplete and poll POST /auth/token every interval seconds.

Request body

  • clientNamestringrequired

Responses

  • 200

    Codes for the CLI

    • deviceCodestringrequired
    • userCodestringrequired
    • verificationUristringrequired
    • verificationUriCompletestringrequired
    • expiresInnumberrequired
    • intervalnumberrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
curl
curl -X POST "https://wortwerk.li/api/v1/auth/device" \
  -H "Content-Type: application/json" \
  -d '{"clientName":"wortwerk CLI on laptop"}'
200 response
{
  "deviceCode": "Gk2v…",
  "userCode": "BCDF-GHJK",
  "verificationUri": "…",
  "verificationUriComplete": "…",
  "expiresIn": 0,
  "interval": 0
}

Poll a device login

POST/auth/token no token needed

Returns 400 with error = authorization_pending, slow_down, access_denied or expired_token until the user approved the login.

Request body

  • deviceCodestringrequired

Responses

  • 200

    A personal access token

    • tokenstringrequired
    • userobjectrequired
      • idstringrequired
      • namestringrequired
      • emailstringrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
curl
curl -X POST "https://wortwerk.li/api/v1/auth/token" \
  -H "Content-Type: application/json" \
  -d '{"deviceCode":"Gk2v…"}'
200 response
{
  "token": "wwu_…",
  "user": {
    "id": "f3b1c6e2-…",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  }
}

Responses

  • 200

    Token info

    • userobject | nullrequired
      • idstringrequired
      • namestringrequired
      • emailstringrequired
    • tokenobjectrequired
      • kind"personal" | "project"required
      • access"read" | "write" | "ci"required
      • workspaceIdstring | nullrequired

        null: every workspace of the user

      • projectIdstring | nullrequired
    • workspacesobject[]required
      • idstringrequired
      • namestringrequired
      • slugstringrequired
      • planstringrequired
      • rolestringrequired

        owner, admin, member or guest

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/me" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
{
  "user": {
    "id": "f3b1c6e2-…",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "token": {
    "kind": "personal",
    "access": "read",
    "workspaceId": "f3b1c6e2-…",
    "projectId": "f3b1c6e2-…"
  },
  "workspaces": [
    {
      "id": "f3b1c6e2-…",
      "name": "Checkout",
      "slug": "checkout",
      "plan": "…",
      "role": "owner"
    }
  ]
}

Responses

  • 204

    Revoked

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X DELETE "https://wortwerk.li/api/v1/me/token" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"

Workspaces

List workspaces

GET/workspaces

Responses

  • 200

    Workspaces

    • idstringrequired
    • namestringrequired
    • slugstringrequired
    • planstringrequired
    • rolestringrequired

      owner, admin, member or guest

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/workspaces" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
[
  {
    "id": "f3b1c6e2-…",
    "name": "Checkout",
    "slug": "checkout",
    "plan": "…",
    "role": "owner"
  }
]

Get a workspace with plan and usage

GET/workspaces/{workspace}

Parameters

  • workspacestringpathrequired

Responses

  • 200

    Workspace

    • idstringrequired
    • namestringrequired
    • slugstringrequired
    • planobjectrequired
      • idstringrequired
      • maxProjectsnumber | nullrequired
      • maxKeysnumberrequired
      • maxMembersnumber | nullrequired
      • machineTranslationbooleanrequired
    • rolestringrequired

      owner, admin, member or guest

    • featuresobjectrequired
      • machineTranslationbooleanrequired
    • usageobjectrequired
      • projectsnumberrequired
      • keysnumberrequired
      • membersnumberrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/workspaces/$WORKSPACE" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
{
  "id": "f3b1c6e2-…",
  "name": "Checkout",
  "slug": "checkout",
  "plan": {
    "id": "f3b1c6e2-…",
    "maxProjects": 0,
    "maxKeys": 0,
    "maxMembers": 0,
    "machineTranslation": false
  },
  "role": "owner",
  "features": {
    "machineTranslation": false
  },
  "usage": {
    "projects": 0,
    "keys": 0,
    "members": 0
  }
}

Projects

List projects

GET/workspaces/{workspace}/projects

Parameters

  • workspacestringpathrequired

Responses

  • 200

    Projects

    • idstringrequired
    • namestringrequired
    • slugstringrequired
    • sourceLocalestringrequired
    • localesstring[]required
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/workspaces/$WORKSPACE/projects" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
[
  {
    "id": "f3b1c6e2-…",
    "name": "Checkout",
    "slug": "checkout",
    "sourceLocale": "en",
    "locales": [
      "de"
    ]
  }
]

Create a project

POST/workspaces/{workspace}/projects

Parameters

  • workspacestringpathrequired

Request body

  • namestringrequired
  • slugstringrequired
  • sourceLocalestringrequired
  • localesstring[]default []

Responses

  • 201

    The new project

    • idstringrequired
    • namestringrequired
    • slugstringrequired
    • sourceLocalestringrequired
    • localesstring[]required
    • workspaceIdstringrequired
    • editableLocalesstring[] | nullrequired

      Locales a guest may edit, null when every locale is editable

    • filesobject[]required
      • idstringrequired
      • pathstringrequired
      • format"json" | "yaml" | "po" | "script"required
    • repoobject | nullrequired
      • provider"github" | "bitbucket"required
      • repostringrequired
      • branchstringrequired
      • localeAliasesmaprequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/workspaces/$WORKSPACE/projects" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Checkout","slug":"checkout","sourceLocale":"en","locales":[]}'
201 response
{
  "id": "f3b1c6e2-…",
  "name": "Checkout",
  "slug": "checkout",
  "sourceLocale": "en",
  "locales": [
    "de"
  ],
  "workspaceId": "f3b1c6e2-…",
  "editableLocales": [
    "de"
  ],
  "files": [
    {
      "id": "f3b1c6e2-…",
      "path": "locales/%locale%.json",
      "format": "json"
    }
  ],
  "repo": {
    "provider": "github",
    "repo": "…",
    "branch": "…",
    "localeAliases": {}
  }
}

Parameters

  • projectIdstringpathrequired

Responses

  • 200

    Project

    • idstringrequired
    • namestringrequired
    • slugstringrequired
    • sourceLocalestringrequired
    • localesstring[]required
    • workspaceIdstringrequired
    • editableLocalesstring[] | nullrequired

      Locales a guest may edit, null when every locale is editable

    • filesobject[]required
      • idstringrequired
      • pathstringrequired
      • format"json" | "yaml" | "po" | "script"required
    • repoobject | nullrequired
      • provider"github" | "bitbucket"required
      • repostringrequired
      • branchstringrequired
      • localeAliasesmaprequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/projects/$PROJECT_ID" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
{
  "id": "f3b1c6e2-…",
  "name": "Checkout",
  "slug": "checkout",
  "sourceLocale": "en",
  "locales": [
    "de"
  ],
  "workspaceId": "f3b1c6e2-…",
  "editableLocales": [
    "de"
  ],
  "files": [
    {
      "id": "f3b1c6e2-…",
      "path": "locales/%locale%.json",
      "format": "json"
    }
  ],
  "repo": {
    "provider": "github",
    "repo": "…",
    "branch": "…",
    "localeAliases": {}
  }
}

Translation progress per locale

GET/projects/{projectId}/stats

Parameters

  • projectIdstringpathrequired

Responses

  • 200

    Stats

    • localestringrequired
    • totalnumberrequired
    • translatednumberrequired
    • needsReviewnumberrequired
    • approvednumberrequired
    • untranslatednumberrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/projects/$PROJECT_ID/stats" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
[
  {
    "locale": "de",
    "total": 0,
    "translated": 0,
    "needsReview": 0,
    "approved": 0,
    "untranslated": 0
  }
]

Add a locale

POST/projects/{projectId}/locales

Parameters

  • projectIdstringpathrequired

Request body

  • codestringrequired

Responses

  • 204

    Added

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/projects/$PROJECT_ID/locales" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"de"}'

Remove a locale

DELETE/projects/{projectId}/locales/{code}

Parameters

  • projectIdstringpathrequired
  • codestringpathrequired

Responses

  • 204

    Removed

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X DELETE "https://wortwerk.li/api/v1/projects/$PROJECT_ID/locales/$CODE" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"

Files

Add or update a file mapping

POST/projects/{projectId}/files

Parameters

  • projectIdstringpathrequired

Request body

  • pathstringrequired
  • format"json" | "yaml" | "po" | "script"
  • optionsmapdefault {}

Responses

  • 201

    File mapping

    • idstringrequired
    • pathstringrequired
    • format"json" | "yaml" | "po" | "script"required
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/projects/$PROJECT_ID/files" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"path":"locales/%locale%.json","format":"json","options":{}}'
201 response
{
  "id": "f3b1c6e2-…",
  "path": "locales/%locale%.json",
  "format": "json"
}

Download a file in one locale

GET/projects/{projectId}/files/{fileId}/download

Serialized with the same adapter as git exports, so the output matches what a PR would contain.

Parameters

  • localestringqueryrequired
  • projectIdstringpathrequired
  • fileIdstringpathrequired

Responses

  • 200

    File content. x-wortwerk-path holds the path in the repository

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/projects/$PROJECT_ID/files/$FILE_ID/download?locale=de" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
# text/plain

Upload a file in one locale

POST/projects/{projectId}/files/{fileId}/import

The request body is the raw file content. Source files of a project connected to a repository come from the repository and cannot be uploaded.

Parameters

  • localestringqueryrequired
  • overwrite"true" | "false"query

    Replace existing translations

  • projectIdstringpathrequired
  • fileIdstringpathrequired

Request body

The raw file content, sent as the request body (application/octet-stream).

Responses

  • 202

    Queued import run

    • idstringrequired
    • kind"import" | "export" | "pull" | "push" | "machine"required
    • status"queued" | "running" | "succeeded" | "failed"required
    • resultany | nullrequired
    • errorstring | nullrequired
    • createdAtstringrequired
    • finishedAtstring | nullrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/projects/$PROJECT_ID/files/$FILE_ID/import?locale=de" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  --data-binary @locales/de.json
202 response
{
  "id": "f3b1c6e2-…",
  "kind": "import",
  "status": "queued",
  "result": "…",
  "error": "not_found",
  "createdAt": "2026-10-08T09:30:00.000Z",
  "finishedAt": "2026-10-08T09:30:00.000Z"
}

Keys

List keys with their source and translation

GET/projects/{projectId}/keys

Parameters

  • localestringqueryrequired

    Locale code, or "all" for one row per key and target locale

  • status"untranslated" | "translated" | "needs_review" | "approved"query
  • searchstringquery
  • namestringquery
  • fileIdstringquery
  • limitintegerquery
  • cursorstringquery
  • projectIdstringpathrequired

Responses

  • 200

    One page of keys

    • dataobject[]required
      • idstringrequired
      • namestringrequired
      • contextstringrequired
      • descriptionstringrequired
      • isPluralbooleanrequired
      • fileIdstring | nullrequired
      • localestringrequired
      • sourcestring | nullrequired
      • valuestring | nullrequired
      • status"untranslated" | "translated" | "needs_review" | "approved"required
      • updatedAtstring | nullrequired
    • totalnumberrequired
    • nextCursorstring | nullrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/projects/$PROJECT_ID/keys?locale=de" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
{
  "data": [
    {
      "id": "f3b1c6e2-…",
      "name": "Checkout",
      "context": "…",
      "description": "…",
      "isPlural": false,
      "fileId": "f3b1c6e2-…",
      "locale": "de",
      "source": "Cart",
      "value": "Warenkorb",
      "status": "untranslated",
      "updatedAt": "2026-10-08T09:30:00.000Z"
    }
  ],
  "total": 0,
  "nextCursor": "MTAw"
}

Create a key

POST/projects/{projectId}/keys

Only for projects without a repository: keys of a connected project are added in the repository.

Parameters

  • projectIdstringpathrequired

Request body

  • namestringrequired
  • contextstringdefault ""
  • descriptionstringdefault ""
  • fileIdstring | nulldefault null
  • sourceValuestringdefault ""

Responses

  • 201

    The key

  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/projects/$PROJECT_ID/keys" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Checkout","context":"","description":"","fileId":null,"sourceValue":""}'

Set a translation

PUT/projects/{projectId}/keys/{keyId}/translations/{locale}

Source edits may only change wording: placeholders, markup and plural forms must stay as in the repository.

Parameters

  • projectIdstringpathrequired
  • keyIdstringpathrequired
  • localestringpathrequired

Request body

  • valuestringrequired
  • status"untranslated" | "translated" | "needs_review" | "approved"
  • minorboolean

Responses

  • 200

    The translation

    • keyIdstringrequired
    • localestringrequired
    • valuestringrequired
    • status"untranslated" | "translated" | "needs_review" | "approved"required
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X PUT "https://wortwerk.li/api/v1/projects/$PROJECT_ID/keys/$KEY_ID/translations/$LOCALE" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":"Warenkorb","status":"untranslated","minor":false}'
200 response
{
  "keyId": "f3b1c6e2-…",
  "locale": "de",
  "value": "Warenkorb",
  "status": "untranslated"
}

Sync

Parameters

  • projectIdstringpathrequired

Request body

  • exportbooleandefault false

Responses

  • 202

    Queued runs

    • runsobject[]required
      • idstringrequired
      • kind"import" | "export" | "pull" | "push" | "machine"required
      • status"queued" | "running" | "succeeded" | "failed"required
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/projects/$PROJECT_ID/sync" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"export":false}'
202 response
{
  "runs": [
    {
      "id": "f3b1c6e2-…",
      "kind": "import",
      "status": "queued"
    }
  ]
}

Machine-translate every untranslated key of a locale

POST/projects/{projectId}/machine

Paid plans only. Results are marked as needs review.

Parameters

  • projectIdstringpathrequired

Request body

  • localestringrequired

Responses

  • 202

    Queued run

    • idstringrequired
    • kind"import" | "export" | "pull" | "push" | "machine"required
    • status"queued" | "running" | "succeeded" | "failed"required
    • resultany | nullrequired
    • errorstring | nullrequired
    • createdAtstringrequired
    • finishedAtstring | nullrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl -X POST "https://wortwerk.li/api/v1/projects/$PROJECT_ID/machine" \
  -H "Authorization: Bearer $WORTWERK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locale":"de"}'
202 response
{
  "id": "f3b1c6e2-…",
  "kind": "import",
  "status": "queued",
  "result": "…",
  "error": "not_found",
  "createdAt": "2026-10-08T09:30:00.000Z",
  "finishedAt": "2026-10-08T09:30:00.000Z"
}

Recent runs

GET/projects/{projectId}/runs

Parameters

  • projectIdstringpathrequired

Responses

  • 200

    Runs, newest first

    • idstringrequired
    • kind"import" | "export" | "pull" | "push" | "machine"required
    • status"queued" | "running" | "succeeded" | "failed"required
    • resultany | nullrequired
    • errorstring | nullrequired
    • createdAtstringrequired
    • finishedAtstring | nullrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/projects/$PROJECT_ID/runs" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
[
  {
    "id": "f3b1c6e2-…",
    "kind": "import",
    "status": "queued",
    "result": "…",
    "error": "not_found",
    "createdAt": "2026-10-08T09:30:00.000Z",
    "finishedAt": "2026-10-08T09:30:00.000Z"
  }
]

Get a run

GET/projects/{projectId}/runs/{runId}

Parameters

  • projectIdstringpathrequired
  • runIdstringpathrequired

Responses

  • 200

    Run

    • idstringrequired
    • kind"import" | "export" | "pull" | "push" | "machine"required
    • status"queued" | "running" | "succeeded" | "failed"required
    • resultany | nullrequired
    • errorstring | nullrequired
    • createdAtstringrequired
    • finishedAtstring | nullrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
  • 401

    Missing, invalid or expired token

curl
curl "https://wortwerk.li/api/v1/projects/$PROJECT_ID/runs/$RUN_ID" \
  -H "Authorization: Bearer $WORTWERK_TOKEN"
200 response
{
  "id": "f3b1c6e2-…",
  "kind": "import",
  "status": "queued",
  "result": "…",
  "error": "not_found",
  "createdAt": "2026-10-08T09:30:00.000Z",
  "finishedAt": "2026-10-08T09:30:00.000Z"
}

Setup

Start browser-assisted project setup

POST/setup no token needed

Uploads sanitized local discovery results, opens the setup URL, and polls POST /setup/token until the browser flow is complete. An optional personal bearer token binds the browser flow to that user.

Request body

  • clientNamestringrequired
  • proposalobjectrequired
    • namestringrequired
    • gitobject
      • provider"github" | "bitbucket"required
      • repostringrequired
      • remotestringrequired
      • branchstring
    • patternsobject[]required
      • pathstringrequired
      • format"json" | "yaml" | "po" | "script"required
      • localesstring[]required
      • confidencenumberrequired
      • keyCountsmap
    • sourceLocalestring
    • localesstring[]required
    • localeAliasesmapdefault {}

Responses

  • 200

    Codes for the CLI

    • deviceCodestringrequired
    • userCodestringrequired
    • verificationUristringrequired
    • verificationUriCompletestringrequired
    • expiresInnumberrequired
    • intervalnumberrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
curl
curl -X POST "https://wortwerk.li/api/v1/setup" \
  -H "Content-Type: application/json" \
  -d '{"clientName":"wortwerk CLI on laptop","proposal":{"name":"Checkout","git":{"provider":"github","repo":"…","remote":"…","branch":"…"},"patterns":[{"path":"locales/%locale%.json","format":"json","locales":["de"],"confidence":0,"keyCounts":{}}],"sourceLocale":"en","locales":["de"],"localeAliases":{}}}'
200 response
{
  "deviceCode": "Gk2v…",
  "userCode": "BCDF-GHJK",
  "verificationUri": "…",
  "verificationUriComplete": "…",
  "expiresIn": 0,
  "interval": 0
}

Poll browser-assisted project setup

POST/setup/token no token needed

Request body

  • deviceCodestringrequired

Responses

  • 200

    CLI credentials and completed project

    • tokenstringrequired
    • userobjectrequired
      • idstringrequired
      • namestringrequired
      • emailstringrequired
    • workspaceobjectrequired
      • idstringrequired
      • slugstringrequired
    • projectobjectrequired
      • idstringrequired
      • slugstringrequired
    • runobject | nullrequired
      • idstringrequired
    • warningstring | nullrequired
  • 400

    Invalid input

    • error"not_found" | "conflict" | "invalid" | "limit_reached" | "forbidden" | "http" | "internal"required
    • messagestringrequired
curl
curl -X POST "https://wortwerk.li/api/v1/setup/token" \
  -H "Content-Type: application/json" \
  -d '{"deviceCode":"Gk2v…"}'
200 response
{
  "token": "wwu_…",
  "user": {
    "id": "f3b1c6e2-…",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "workspace": {
    "id": "f3b1c6e2-…",
    "slug": "checkout"
  },
  "project": {
    "id": "f3b1c6e2-…",
    "slug": "checkout"
  },
  "run": {
    "id": "f3b1c6e2-…"
  },
  "warning": "…"
}