Overview #

The .git API follows RESTful conventions and uses standard HTTP response codes, authentication, and verbs. All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

ℹ️
Base URL: https://api.git.dev/v2. All endpoints are versioned to ensure backward compatibility.
n

Authentication #

.git uses API keys to authenticate requests. Generate your keys from the Dashboard under Settings → API Keys. Never expose your secret key in client-side code.

HTTP Header
Authorization: Bearer gpk_live_4f3a2b1c9d8e7f6g5h4i3j2k1l0m

Key Types

Public Keys (gpk_) identify your organization. Secret Keys (gsk_) authenticate requests. Scope your keys to specific projects using the dashboard.

Official SDKs #

Install and use our officially maintained SDKs. All SDKs share a consistent interface and automatic retry logic.

Installation
npm install @git/sdk
Usage
import { GitClient } from '@git/sdk';

const git = new GitClient({ apiKey: process.env.GIT_API_KEY });

const deployment = await git.deployments.create({
  project: 'my-app',
  branch: 'main',
  env: { NODE_ENV: 'production' }
});
console.log(deployment.url); // https://my-app.git.dev
Installation
pip install git-sdk
Usage
import git_sdk

client = git_sdk.Client(api_key=os.getenv("GIT_API_KEY"))
deployment = client.deployments.create(
    project="my-app",
    branch="main",
    env={"NODE_ENV": "production"}
)
print(deployment.url)
Installation
go get git.dev/sdk-go/v2
Usage
import "git.dev/sdk-go/v2"

client := git.New(os.Getenv("GIT_API_KEY"))
dep, err := client.Deployments.Create(context.Background(), &git.DeployRequest{
    Project: "my-app",
    Branch:  "main",
})
if err != nil { log.Fatal(err) }
fmt.Println(dep.URL)
Installation
gem install git-sdk
Usage
require 'git_sdk'

client = GitSDK::Client.new(api_key: ENV['GIT_API_KEY'])
dep = client.deployments.create(
  project: 'my-app',
  branch: 'main'
)
puts dep.url

API Endpoints #

GET
/projects/:id
Retrieve project configuration and status
Docs →
POST
/deployments
Trigger a new deployment for a project
Docs →
PUT
/environments/:id/env-vars
Update environment variables securely
Docs →
GET
/deployments/:id/logs
Stream real-time deployment logs
Docs →
DELETE
/webhooks/:id
Remove a webhook subscription
Docs →

Webhooks #

Configure webhooks to receive real-time events about deployments, build status, and security alerts. All payloads are signed using HMAC-SHA256.

Example Payload
{
  "id": "evt_8x9y7z6w5v4u",
  "type": "deployment.completed",
  "timestamp": 1718942301,
  "data": {
    "project": "my-app",
    "status": "live",
    "url": "https://my-app.git.dev",
    "duration_ms": 2400
  }
}
⚠️
Always verify the X-Git-Signature header before processing webhook requests to prevent spoofing.

Rate Limits #

API requests are limited based on your plan. Headers include X-RateLimit-Remaining and X-RateLimit-Reset.

Rate Limits #

API requests are limited based on your plan. Headers include X-RateLimit-Remaining and X-RateLimit-Reset.

PlanRequests / minBurst
Starter6010
Pro60050
Enterprise6,000200

Changelog #

  • v2.4.1 Added WebSocket support for log streaming. Fixed env-var encoding issue.
  • v2.4.0 New deployment preview endpoints. SDK retry logic improvements.
  • v2.3.2 Security patch for webhook signature verification.
"}