API Documentation
Integrate Jasper's AI-powered code reviews directly into your workflow. Trigger reviews programmatically, retrieve results, and build custom integrations.
Base URL
https://heyjasper.ai/api/v1
Authentication
All API requests require authentication using a Bearer token. You can generate an API key from your dashboard settings.
curl -X GET https://heyjasper.ai/api/v1/reviews \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Keep your API key secure
Never expose your API key in client-side code or public repositories.
Rate Limits
API requests are rate limited based on your plan. Rate limit headers are included in all responses.
| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum requests per hour |
X-RateLimit-Remaining |
Requests remaining in current window |
X-RateLimit-Reset |
Unix timestamp when the limit resets |
Reviews
/reviews
List all reviews for your organization.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status |
string | Filter by status: pending, processing, completed, failed |
repository |
string | Filter by repository (owner/repo format) |
limit |
integer | Number of results (default: 20, max: 100) |
{
"data": [
{
"id": "rev_abc123",
"repository": "acme/webapp",
"pull_request": 42,
"status": "completed",
"comments_count": 5,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:31:23Z"
}
],
"meta": {
"total": 150,
"page": 1,
"per_page": 20
}
}
/reviews
Trigger a new code review for a pull request.
Request Body
{
"repository": "acme/webapp",
"pull_request": 42,
"options": {
"focus_areas": ["security", "performance"],
"severity_threshold": "medium"
}
}
Response
{
"id": "rev_xyz789",
"status": "processing",
"estimated_seconds": 90,
"webhook_url": "https://heyjasper.ai/api/v1/reviews/rev_xyz789"
}
/reviews/{`{id}`}
Get details of a specific review including all comments.
{
"id": "rev_abc123",
"repository": "acme/webapp",
"pull_request": 42,
"status": "completed",
"summary": "Found 3 potential issues...",
"comments": [
{
"path": "src/auth.py",
"line": 42,
"severity": "high",
"category": "security",
"message": "SQL injection vulnerability detected",
"suggestion": "Use parameterized queries"
}
],
"metrics": {
"files_analyzed": 12,
"tokens_used": 4500,
"duration_seconds": 83
}
}
Repositories
/repositories
List all repositories with Jasper enabled.
{
"data": [
{
"id": "repo_123",
"name": "acme/webapp",
"auto_review": true,
"reviews_count": 45,
"last_review_at": "2024-01-15T10:30:00Z"
}
]
}
Usage & Billing
/usage
Get current usage statistics and remaining credits.
{
"credits": {
"remaining": 85,
"total": 100,
"resets_at": "2024-02-01T00:00:00Z"
},
"usage": {
"reviews_this_month": 15,
"tokens_used": 125000,
"avg_review_time_seconds": 78
}
}
Webhook Events
Configure webhooks to receive real-time notifications when reviews complete. Set your webhook URL in the dashboard settings.
Available Events
review.started
Fired when a review begins processing
review.completed
Fired when a review finishes successfully
review.failed
Fired when a review encounters an error
Webhook Payloads
review.completed
{
"event": "review.completed",
"timestamp": "2024-01-15T10:31:23Z",
"data": {
"review_id": "rev_abc123",
"repository": "acme/webapp",
"pull_request": 42,
"comments_count": 5,
"summary": "Found 3 potential security issues and 2 style suggestions.",
"url": "https://github.com/acme/webapp/pull/42"
}
}
Verifying Webhooks
Each webhook request includes a X-Jasper-Signature header containing an HMAC SHA-256 signature. Verify this signature using your webhook secret to ensure the request is authentic.
Ready to integrate?
Sign up to get your API key and start building.
Get Started Free