Post or update a comment on the pull request
Posts a comment on the pull request opened from this push request, or edits the one posted before with the same marker (default status), so a progress note is updated in place instead of piling up. The comment carries a hidden line <!-- werft:<session-id>:<marker> --> that finds it again. body is cleaned the same way as a pull request body.
Every attempt, refused ones included, leaves a comment_pull_request receipt with the actor, the pull request, the comment id and created. The same credentials as opening the pull request are needed.
Scope: sessions:approve (API key or cookie session). Idempotency-Key: ignored.
AuthorizationBearer <token>For servers and scripts: an API key sent as an HTTP bearer token, Bearer <key>. It holds exactly the scopes it was issued with; a key issued before scopes existed holds none. It never needs the CSRF header, and it cannot manage agents, members, teams or API keys. Issue one in the web console under Settings → API keys; each operation names the scope it needs.
Scope: sessions:approve
id*stringThe session'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)$uuidpush_request_id*stringThe push request'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
body*string1 <= length <= 60000marker?string^[a-z0-9][a-z0-9-]{0,39}$The comment: 201 when this call posted it, 200 with created: false when it edited the marked one.
application/json- response
pull_request*comment*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)$uuidcurl -X POST 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/push-requests/497f6eca-6276-4993-bfeb-53cbbbba6f08/pull-request/comments' \ -H 'Content-Type: application/json' \ -d '{ "body": "Tests pass on the pushed commit.", "marker": "status"}'{ "pull_request": { "push_request_id": "5b9e2c17-4f3a-4d6e-8a1b-7c0d9e2f3a41", "session_id": "0f8b6a52-3d1e-4c7a-9b2f-5e6d7c8a9b01", "repository_id": "sample-app", "number": 42, "url": "https://github.com/acme/sample-app/pull/42", "head": "agent/0f8b6a52-3d1e-4c7a-9b2f-5e6d7c8a9b01", "base": "main", "created_at": "2026-10-11T08:40:00Z", "receipt_id": "a7b8c9d0-e1f2-4a3b-8c4d-5e6f7a8b9c0d" }, "comment": { "id": 2401, "url": "https://github.com/acme/sample-app/pull/42#issuecomment-2401", "marker": "status", "created": true }, "receipt_id": "b8c9d0e1-f2a3-4b4c-9d5e-6f7a8b9c0d1e"}