How to make a Confluence group watch a space or page
By Kayabyte
You want everyone in a team to get updates from the team’s Confluence space: new pages, edits and comments. In Confluence Cloud there is no setting for that. Watching is something each person does for themselves. This guide shows what an admin can do anyway, from a one-time script to keeping it in sync, and where each approach stops.
How watching works in Confluence Cloud
- Each person selects Watch on a page or a space. Watching a space covers all its pages and blog posts.
- Only user accounts can watch. You can’t add a group as a watcher, so a group of 40 people means 40 separate watches.
- People can see what they watch under Notifications → Watching, and unwatch at any time.
Adding watches for other people with the REST API
Confluence’s REST API can set a watch for someone else, one person at a time (Atlassian reference):
- Space:
POST /wiki/rest/api/user/watch/space/{spaceKey}?accountId={accountId} - Page:
POST /wiki/rest/api/user/watch/content/{pageId}?accountId={accountId}
Two requirements: send the header X-Atlassian-Token: no-check, and run it as someone with the Confluence Administrator global permission, or Space Administrator on that space. Without one of those, you can only add a watch for yourself.
A one-time script for a whole group
This adds every member of one group as a watcher of one space. You need an API token for your own account, curl and jq.
SITE="https://your-site.atlassian.net"
AUTH="you@example.com:your-api-token"
SPACE="TEAM" # the space key
GROUP="developers" # the group name
# 1. Look up the group's ID
GROUP_ID=$(curl -s -u "$AUTH" "$SITE/wiki/rest/api/group/picker?query=$GROUP" \
| jq -r --arg n "$GROUP" '.results[] | select(.name == $n) | .id')
# 2. Read the members, 200 at a time, and add a watch for each
start=0
while :; do
page=$(curl -s -u "$AUTH" "$SITE/wiki/rest/api/group/$GROUP_ID/membersByGroupId?start=$start&limit=200")
for id in $(echo "$page" | jq -r '.results[] | select((.accountType // "atlassian") == "atlassian") | .accountId'); do
curl -s -o /dev/null -w "%{http_code} $id\n" -u "$AUTH" -X POST \
-H "X-Atlassian-Token: no-check" \
"$SITE/wiki/rest/api/user/watch/space/$SPACE?accountId=$id"
done
# Stop when there is no next page (a short page alone doesn't prove the list is complete)
[ "$(echo "$page" | jq -r '._links.next // empty')" = "" ] && break
start=$((start + $(echo "$page" | jq '.results | length')))
doneA 204 means the watch was added. Members who can’t see the space are skipped by Confluence, because a watch never grants access. For a single page, use the page endpoint with the page ID from the page URL.
Where the script stops
The script is a snapshot. It’s fine for a one-time rollout, but groups change:
- Joiners aren’t added until you run it again.
- Leavers keep watching, and keep getting emails about a space that isn’t theirs any more.
- People who unwatched on purpose are added back on the next run. They will usually start filtering the emails instead.
- Watches people set up themselves look the same as the ones you added, so a cleanup script can’t tell which ones it may remove.
To keep it in sync you would run it on a schedule and keep a record of which watches you added, who opted out, and who already watched before. That record is the hard part.
Why someone “watches” but gets no email
Before changing anything, check Confluence’s email defaults. New pages and page edits in watched content go into the daily digest by default, while comments are emailed straight away. Each person can change this under their profile picture → Settings → Email. The updates also show under Notifications → Watching in Confluence.
Keeping a group in sync with an app
Group Watchers for Confluence is the app I make for this. You map one or more groups to a space or a single page, and it keeps the watches in line with the groups:
- It runs right after you change a rule and then every hour.
- Joiners start watching. For leavers, it removes only the watches it added (you can switch removal off).
- People who unwatch are not added back, and watches people already had are never touched.
- It runs entirely on Atlassian (Forge) and sends no data outside Atlassian.
It’s on the Atlassian Marketplace.
Confluence and Atlassian are trademarks of Atlassian. Kayabyte is an independent developer and is not affiliated with or endorsed by Atlassian.