sentry
Original:🇺🇸 English
Translated
Sentry API via curl. Use this skill to manage error tracking, list issues, resolve errors, and monitor releases in Sentry.
9installs
Sourcevm0-ai/vm0-skills
Added on
NPX Install
npx skill4agent add vm0-ai/vm0-skills sentryTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Sentry API
Use the Sentry API via direct calls to manage error tracking, issues, projects, and releases.
curlOfficial docs:https://docs.sentry.io/api/
When to Use
Use this skill when you need to:
- List and search issues - find errors and exceptions
- Resolve or ignore issues - manage issue status
- View issue details - get stack traces and event data
- Manage projects - list and configure projects
- Track releases - create and monitor releases
- View events - get detailed error events
Prerequisites
- Go to Sentry → Settings (gear icon in sidebar) → Account → API → Personal Tokens
- Click Create New Token
- Select the required scopes (see below) — scopes cannot be edited after creation
- Copy the generated token
bash
export SENTRY_HOST="sentry.io" # Or your self-hosted Sentry domain
export SENTRY_TOKEN="sntrys_..." # Personal Auth Token
export SENTRY_ORG="your-org-slug" # Your organization slugRequired Scopes
- - List and view projects
project:read - - View issues and events
event:read - - Update issues (resolve, ignore, assign)
event:write - - View and create releases
project:releases
Important: When usingin a command that pipes to another command, wrap the command containing$VARin$VAR. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c '...'bashbash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"'
How to Use
All examples below assume , , and are set.
SENTRY_HOSTSENTRY_TOKENSENTRY_ORGBase URL:
https://${SENTRY_HOST}/api/01. List Your Projects
Get all projects you have access to:
bash
bash -c 'curl -s "https://${SENTRY_HOST}/api/0/projects/" --header "Authorization: Bearer ${SENTRY_TOKEN}"' | jq '.[] | {slug, name, platform, dateCreated}'2. Get Project Details
Get details for a specific project:
Note: Replacewith your actual project slug from the "List Your Projects" output above.my-project
bash
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}'3. List Organization Issues
Get all issues across the organization:
bash
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:
- - Filter by status
query=is:unresolved - - Filter by error type
query=error.type:TypeError - - Sort by last seen (default)
sort=date - - Sort by first seen
sort=new - - Sort by event count
sort=freq
4. List Project Issues
Get issues for a specific project:
Note: Replacewith your actual project slug from the "List Your Projects" output.my-project
bash
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}5. Search Issues
Search issues with query:
Write to :
/tmp/sentry_query.txtis:unresolved level:errorbash
bash -c 'curl -s -G "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/issues/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --data-urlencode "query@/tmp/sentry_query.txt"' | jq '.[] | {shortId, title, level, count}Common query filters:
- /
is:unresolved/is:resolved- By statusis:ignored - /
level:error/level:warning- By levellevel:info - /
assigned:me- By assigneeassigned:none - - By browser
browser:Chrome - - By OS
os:Windows - - By release version
release:1.0.0
6. Get Issue Details
Get details for a specific issue:
Note: Replacewith an actual issue ID from the "List Issues" or "List Project Issues" output (use the123456789field, notid).shortId
bash
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}'7. Get Latest Event for Issue
Get the most recent event for an issue:
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
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}'8. List Issue Events
Get all events for an issue:
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
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}9. Resolve Issue
Mark an issue as resolved:
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
ISSUE_ID="123456789"Write to :
/tmp/sentry_request.jsonjson
{
"status": "resolved"
}Then run:
bash
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 @/tmp/sentry_request.json' | jq '{id, shortId, status}'10. Resolve in Next Release
Mark issue as resolved in next release:
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
ISSUE_ID="123456789"Write to :
/tmp/sentry_request.jsonjson
{
"status": "resolvedInNextRelease"
}Then run:
bash
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 @/tmp/sentry_request.json' | jq '{id, shortId, status}'11. Ignore Issue
Ignore an issue:
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
ISSUE_ID="123456789"Write to :
/tmp/sentry_request.jsonjson
{
"status": "ignored"
}Then run:
bash
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 @/tmp/sentry_request.json' | jq '{id, shortId, status}'Ignore with duration (in minutes):
Write to :
/tmp/sentry_request.jsonjson
{
"status": "ignored",
"statusDetails": {
"ignoreDuration": 60
}
}Then run:
bash
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 @/tmp/sentry_request.json' | jq '{id, shortId, status}'12. Unresolve Issue
Reopen a resolved issue:
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
ISSUE_ID="123456789"Write to :
/tmp/sentry_request.jsonjson
{
"status": "unresolved"
}Then run:
bash
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 @/tmp/sentry_request.json' | jq '{id, shortId, status}'13. Assign Issue
Assign an issue to a user:
Note: Replacewith an actual issue ID from the "List Issues" output. Replace123456789with a valid user email from your Sentry organization members.<user-email>
Write to :
/tmp/sentry_request.jsonjson
{
"assignedTo": "<user-email>"
}Then run:
bash
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 @/tmp/sentry_request.json' | jq '{id, shortId, assignedTo}'Note: Replacein the URL with the actual issue ID from the "List Issues" output.123456789
14. Bulk Update Issues
Update multiple issues at once:
Note: Replaceand123456789with actual issue IDs from the "List Issues" output.987654321
Write to :
/tmp/sentry_request.jsonjson
{
"id": ["123456789", "987654321"],
"status": "resolved"
}Then run:
bash
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 @/tmp/sentry_request.json'15. Delete Issue
Delete an issue (requires admin permissions):
Note: Replacewith an actual issue ID from the "List Issues" output.123456789
bash
ISSUE_ID="123456789"
bash -c '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}"'16. List Releases
Get all releases for the organization:
bash
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]}'17. Get Release Details
Get details for a specific release:
Note: Replacewith an actual release version from the "List Releases" output.1.0.0
bash
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}'18. Create Release
Create a new release:
Note: Replacewith your actual project slug from the "List Your Projects" output.<your-project-slug>
Write to :
/tmp/sentry_request.jsonjson
{
"version": "1.0.1",
"projects": ["<your-project-slug>"]
}Then run:
bash
bash -c 'curl -s -X POST "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/releases/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d @/tmp/sentry_request.json' | jq '{version, dateCreated}'19. Create Release with Commits
Create release with associated commits:
Note: Replacewith your actual project slug from the "List Your Projects" output.<your-project-slug>
Write to :
/tmp/sentry_request.jsonjson
{
"version": "1.0.2",
"projects": ["<your-project-slug>"],
"refs": [
{
"repository": "owner/repo",
"commit": "abc123def456"
}
]
}Then run:
bash
bash -c 'curl -s -X POST "https://${SENTRY_HOST}/api/0/organizations/${SENTRY_ORG}/releases/" --header "Authorization: Bearer ${SENTRY_TOKEN}" --header "Content-Type: application/json" -d @/tmp/sentry_request.json' | jq '{version, dateCreated}'20. List Project Error Events
Get recent error events for a project:
Note: Replacewith your actual project slug from the "List Your Projects" output.my-project
bash
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}'Issue Status Values
| Status | Description |
|---|---|
| Active issue (default) |
| Manually resolved |
| Auto-resolve on next release |
| Ignored (won't alert) |
Guidelines
- Use organization slug: Most endpoints use org slug, not ID
- Pagination: Use parameter for paginated results
cursor - Query syntax: Use Sentry's query language for powerful filtering
- Rate limits: Sentry has rate limits; implement backoff for 429 responses
- Self-hosted: For self-hosted Sentry, set to your domain
SENTRY_HOST - Scopes matter: Ensure your token has required scopes for each operation