Skip to content
api

API Reference

Complete API documentation for integrating with GitProductivity.

API Reference

GitProductivity provides a REST API for programmatic access to your data. This reference documents all available endpoints.

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Keep your API keys secure. Never expose them in client-side code or public repositories.

Base URL

https://api.gitproductivity.com/v1

Rate Limits

| Plan | Requests/minute | Requests/day | |------|-----------------|--------------| | Free | 60 | 1,000 | | Pro | 300 | 10,000 | | Enterprise | 1,000 | Unlimited |

Endpoints

Repositories

GET/repositories

List all connected repositories

Response:

{
  "data": [
    {
      "id": "repo_123",
      "name": "my-project",
      "provider": "github",
      "language": "TypeScript",
      "stars": 150,
      "last_synced": "2026-03-19T10:30:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 20
  }
}

GET/repositories/{id}

Get a specific repository


Developers

GET/developers

List all developers in your organization

Query Parameters:

| Parameter | Type | Description | |-----------|------|-------------| | page | integer | Page number (default: 1) | | per_page | integer | Items per page (default: 20, max: 100) | | sort | string | Sort field (workdays, commits, prs) | | order | string | Sort order (asc, desc) |


GET/developers/{id}

Get developer statistics

Response:

{
  "id": "dev_456",
  "name": "John Doe",
  "email": "john@example.com",
  "avatar_url": "https://...",
  "stats": {
    "workdays": 45.2,
    "commits": 234,
    "prs_merged": 67,
    "reviews_given": 89,
    "ai_boost": 1.3
  },
  "period": {
    "start": "2026-01-01",
    "end": "2026-03-19"
  }
}

Analytics

GET/analytics/team

Get team analytics summary

Query Parameters:

| Parameter | Type | Description | |-----------|------|-------------| | start_date | string | Start date (YYYY-MM-DD) | | end_date | string | End date (YYYY-MM-DD) | | repository_ids | string | Comma-separated repository IDs |


GET/analytics/velocity

Get velocity metrics


Webhooks

GET/webhooks

List configured webhooks


POST/webhooks

Create a new webhook

Request Body:

{
  "url": "https://your-server.com/webhook",
  "events": ["developer.added", "repository.connected"],
  "secret": "your_webhook_secret"
}

DELETE/webhooks/{id}

Delete a webhook


Error Responses

All errors return standard HTTP status codes with JSON response bodies:

{
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid",
    "details": []
  }
}

Common Error Codes

| Code | Status | Description | |------|--------|-------------| | invalid_request | 400 | Malformed request | | unauthorized | 401 | Invalid or missing API key | | forbidden | 403 | Insufficient permissions | | not_found | 404 | Resource not found | | rate_limited | 429 | Rate limit exceeded |

SDKs

Official SDKs are available for:

  • JavaScript/TypeScript: npm install @gitproductivity/sdk
  • Python: pip install gitproductivity

Example usage:

import { GitProductivity } from '@gitproductivity/sdk';

const client = new GitProductivity('YOUR_API_KEY');
const developers = await client.developers.list();

Next Steps

Need Help?

Get personalized support from our team to help you get started.

View Demo
9+
Docs Available
6
Categories