Skip to content

Watch a repository you can read: give level, with events for custom; or, as booleans, subscribed (all its activity, or with false, only what you take part in) and ignored (nothing at all).

PUT/repos/{owner}/{name}/subscription

Returns how you watch it now.

level You hear of
participating What you take part in, or are mentioned in (the default)
all Every issue and pull request opened, commented on, closed or merged, and every deployment
custom What you take part in, and the kinds in events: issues, pulls, deployments, security
ignore Nothing, not even a mention

Instead of level, {"subscribed": true} is all, {"subscribed": false} is participating and {"ignored": true} is ignore.

Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
level string No participating: only what you take part in. all: all its activity. ignore: nothing. custom: what you take part in, and events. One of participating, all, ignore, custom.
events array of strings No With custom: the kinds of activity to hear of. One of issues, pulls, deployments, security.
subscribed boolean No Instead of level: true for all its activity, false for only what you take part in.
ignored boolean No Instead of level: true to hear of nothing on it.
curl -X PUT https://api.g1t.sh/repos/flagon-io/hello/subscription \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"level": "custom",
"events": [
"pulls",
"deployments"
]
}'

A successful request answers 200 with:

{
"repo": "flagon-io/hello",
"level": "custom",
"events": [
"pulls",
"deployments"
],
"subscribed": true,
"ignored": false,
"updated_at": "2026-10-07T10:06:00.000Z"
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.