Sentry API via curl. Use this skill to manage error tracking, list issues, resolve errors, and monitor releases in Sentry.
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Use the Sentry API via direct curl calls to manage error tracking, issues, projects, and releases.
Official docs:
https://docs.sentry.io/api/
Use this skill when you need to:
export SENTRY_HOST="sentry.io" # Or your self-hosted Sentry domain
export SENTRY_TOKEN="sntrys_..." # Auth token from Internal Integration
export SENTRY_ORG="your-org-slug" # Your organization slug
project:read - List and view projectsevent:read - View issues and eventsevent:write - Update issues (resolve, ignore, assign)release:read - View releasesrelease:write - Create releasesImportant: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
All examples below assume SENTRY_HOST, SENTRY_TOKEN, and SENTRY_ORG are set.
Base URL: https://${SENTRY_HOST}/api/0
Get all projects you have access to:
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/projects/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {slug, name, platform, dateCreated}
Get details for a specific project:
Note: Replace
my-projectwith your actual project slug from the "List Your Projects" output above.
PROJECT_SLUG="my-project"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/projects/${SENTRY_ORG}/${PROJECT_SLUG}/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '{slug, name, platform, status, dateCreated}
Get all issues across the organization:
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {id, shortId, title, culprit, status, count, userCount, firstSeen, lastSeen}
Query parameters:
query=is:unresolved - Filter by statusquery=error.type:TypeError - Filter by error typesort=date - Sort by last seen (default)sort=new - Sort by first seensort=freq - Sort by event countGet issues for a specific project:
Note: Replace
my-projectwith your actual project slug from the "List Your Projects" output.
PROJECT_SLUG="my-project"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/projects/${SENTRY_ORG}/${PROJECT_SLUG}/issues/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {id, shortId, title, status, count, lastSeen}
Search issues with query:
bash -c 'curl -s -G "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --data-urlencode "query=is:unresolved level:error"' | jq '.[] | {shortId, title, level, count}
Common query filters:
is:unresolved / is:resolved / is:ignored - By statuslevel:error / level:warning / level:info - By levelassigned:me / assigned:none - By assigneebrowser:Chrome - By browseros:Windows - By OSrelease:1.0.0 - By release versionGet details for a specific issue:
Note: Replace
123456789with an actual issue ID from the "List Issues" or "List Project Issues" output (use theidfield, notshortId).
ISSUE_ID="123456789"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '{id, shortId, title, culprit, status, level, count, userCount, firstSeen, lastSeen, assignedTo}
Get the most recent event for an issue:
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/events/latest/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '{eventID, message, platform, dateCreated, tags, contexts}
Get all events for an issue:
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/events/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {eventID, message, dateCreated}
Mark an issue as resolved:
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d '"'"'{"status": "resolved"}'"'"'' | jq '{id, shortId, status}
Mark issue as resolved in next release:
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d '"'"'{"status": "resolvedInNextRelease"}'"'"'' | jq '{id, shortId, status}
Ignore an issue:
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d '"'"'{"status": "ignored"}'"'"'' | jq '{id, shortId, status}
Ignore with duration (in minutes):
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d '"'"'{"status": "ignored", "statusDetails": {"ignoreDuration": 60}}'"'"'' | jq '{id, shortId, status}
Reopen a resolved issue:
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d '"'"'{"status": "unresolved"}'"'"'' | jq '{id, shortId, status}
Assign an issue to a user:
Note: Replace
123456789with an actual issue ID from the "List Issues" output. Replacedeveloper@example.comwith a valid user email from your Sentry organization members.
ISSUE_ID="123456789"
USER_EMAIL="developer@example.com"
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d "{\"assignedTo\": \"${USER_EMAIL}\"}"' | jq '{id, shortId, assignedTo}
Update multiple issues at once:
Note: Replace
123456789and987654321with actual issue IDs from the "List Issues" output.
bash -c 'curl -s -X PUT "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d '"'"'{
"id": ["123456789", "987654321"],
"status": "resolved"
}'"'"' | jq '"'"'.'"'"''
Delete an issue (requires admin permissions):
Note: Replace
123456789with an actual issue ID from the "List Issues" output.
ISSUE_ID="123456789"
curl -s -X DELETE "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/${ISSUE_ID}/" --header "Authorization: Bearer ${SENTRY_TOKEN}" -w "\nHTTP Status: %{http_code}"
Get all releases for the organization:
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/releases/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {version, dateCreated, newGroups, projects: [.projects[].slug]}
Get details for a specific release:
Note: Replace
1.0.0with an actual release version from the "List Releases" output.
RELEASE_VERSION="1.0.0"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/releases/${RELEASE_VERSION}/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '{version, dateCreated, dateReleased, newGroups, lastEvent, projects}
Create a new release:
Note: Replace
my-projectwith your actual project slug from the "List Your Projects" output.
PROJECT_SLUG="my-project"
curl -s -X POST "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/releases/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d "{
\"version\": \"1.0.1\",
\"projects\": [\"${PROJECT_SLUG}\"]
}" | jq '{version, dateCreated}'
Create release with associated commits:
Note: Replace
my-projectwith your actual project slug from the "List Your Projects" output.
PROJECT_SLUG="my-project"
curl -s -X POST "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/releases/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d "{
\"version\": \"1.0.2\",
\"projects\": [\"${PROJECT_SLUG}\"],
\"refs\": [{
\"repository\": \"owner/repo\",
\"commit\": \"abc123def456\"
}]
}" | jq '{version, dateCreated}'
Get recent error events for a project:
Note: Replace
my-projectwith your actual project slug from the "List Your Projects" output.
PROJECT_SLUG="my-project"
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/projects/${SENTRY_ORG}/${PROJECT_SLUG}/events/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {eventID, title, message, dateCreated}
| Status | Description |
|---|---|
unresolved | Active issue (default) |
resolved | Manually resolved |
resolvedInNextRelease | Auto-resolve on next release |
ignored | Ignored (won't alert) |
cursor parameter for paginated resultsSENTRY_HOST to your domain