REST API

Programmatically manage projects, deployments, and infrastructure with our versioned REST API.

Base URL: https://api.git.dev/v1

All endpoints return JSON responses. Use standard HTTP methods and include your API key in the Authorization header.

Authentication

Authenticate requests using Bearer tokens. Generate keys from your dashboard under Settings → API Keys.

Authorization: Bearer sk_live_8f3a2b1c9d4e5f6a7b8c9d0e

Projects

GET /projects List all projects belonging to the authenticated user.
ParameterTypeDescription
limitintegerNumber of results (default: 20, max: 100)
cursorstringPagination cursor from previous response
{
  "data": [
    {
      "id": "proj_2x9k4m",
      "name": "frontend-app",
      "framework": "nextjs",
      "created_at": "2024-11-15T08:30:00Z",
      "active_deployments": 3
    }
  ],
  "meta": {
    "next_cursor": "eyJpZCI6MTIzfQ==",
    "has_more": true
  }
}
POST /projects Create a new project and initialize deployment pipelines.
ParameterTypeDescription
name requiredstringProject name (alphanumeric, hyphens allowed)
frameworkstringAuto-detected or manual override (nextjs, remix, astro, etc.)
repo_urlstringGit repository HTTPS/SSH URL
curl -X POST https://api.git.dev/v1/projects \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "my-saas-app", "framework": "nextjs", "repo_url": "https://github.com/org/repo"}'

Deployments

GET /projects/:id/deployments Retrieve deployment history for a specific project.
{
  "data": [
    {
      "id": "dep_88x2m9",
      "status": "ready",
      "branch": "main",
      "commit_sha": "a1b2c3d",
      "url": "https://main.git.dev",
      "duration_ms": 2400
    }
  ]
}
POST /projects/:id/deployments Trigger a manual deployment or override CI/CD rules.
ParameterTypeDescription
branchstringSource branch to deploy
environmentstringTarget environment: preview, production

Error Codes

The API uses standard HTTP status codes. Errors return a JSON body with error and message fields.

400
Bad Request — Invalid parameters
401
Unauthorized — Invalid/missing API key
403
Forbidden — Insufficient permissions
404
Not Found — Resource does not exist
429
Rate Limited — Too many requests
500
Server Error — Internal failure

Rate Limits

Requests are limited per API key. Check the X-RateLimit-Remaining header in responses.

    Starter: 100 requests/min

    Pro: 1,000 requests/min

    Enterprise: Custom limits (contact sales)