Register or replace the workspace's GitHub App (owner or admin)
The author App's route; …/github-apps/author is the same. Takes the App's id and the private key GitHub issued for it (the PEM file's text). The key must be an RSA private key (400 invalid_private_key), and GitHub must accept a JWT signed with it for that id (400 github_app_rejected); only then is it stored, encrypted under the master key, with the App's name and page as GitHub reports them. A workspace has one author App: this replaces the one before, and repositories written as auth: { kind: github_app } use the new one from their next token. Writes a set_github_app receipt naming the App id. The key is in no response, receipt, log or error. API keys are refused.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSession__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.
id*stringThe workspace's id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
"werft-web"application/json- body
app_id*integer0 < value <= 2147483647private_key*string1 <= length <= 16384Stored; the App as GET now answers it, and the receipt.
application/json- response
github_app*receipt_id*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidpins_cleared?integer0 <= value <= 9007199254740991pins_restored?integer0 <= value <= 9007199254740991curl -X PUT 'https://example.com/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/github-app' \ -H 'Content-Type: application/json' \ -d '{ "app_id": 123456, "private_key": "<the .pem file GitHub downloaded>"}'{ "github_app": { "app_id": 123456, "slug": "acme-agents", "name": "Acme agents", "html_url": "https://github.com/apps/acme-agents", "private_key": { "updated_at": "2026-10-30T09:00:00Z", "updated_by": { "user_id": "3e7f1a90-5c2d-4b8e-8f61-2a9d0c4b7e35", "display_name": "Jae" } }, "created_at": "2026-10-30T09:00:00Z", "updated_at": "2026-10-30T09:00:00Z" }, "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}