The whole hunk
from line 19, old and new numbered
/
lines
from line 19
1919```bash cURL
2020curl --fail-with-body -sS \
2121 "https://api.anthropic.com/v1/compliance/activities?limit=1" \
22 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
22 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
23 --header "anthropic-version: 2023-06-01"
2324```
2425
2526```json Response
from line 61
6061 --data-urlencode "activity_types[]=claude_file_uploaded" \
6162 --data-urlencode "activity_types[]=claude_chat_created" \
6263 --data-urlencode "created_at.gte=2026-04-01T00:00:00Z" \
63 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY"
64 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
65 --header "anthropic-version: 2023-06-01"
6466```
6567
6668The Activity Feed produces hundreds of distinct activity types. See [Query compliance activities](https://platform.claude.com/docs/en/api/compliance/activities/list) in the API reference for the full list of values that `activity_types[]` accepts.
from line 102
100102# Fetch the first page (newest activities first) and capture its trailing cursor.
101103last_id=$(curl --fail-with-body -sS \
102104 "https://api.anthropic.com/v1/compliance/activities?limit=2" \
103 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" | jq -er '.last_id')
105 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
106 --header "anthropic-version: 2023-06-01" | jq -er '.last_id')
104107
105108# Pass the cursor back unchanged to fetch the next (older) page.
106109curl --fail-with-body -sS -G \
107110 "https://api.anthropic.com/v1/compliance/activities" \
108111 --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \
112 --header "anthropic-version: 2023-06-01" \
109113 --data-urlencode "limit=2" \
110114 --data-urlencode "after_id=${last_id}"
111115```