API Keys

Authenticate to the getlaunch.dev API programmatically using API keys.


What are API Keys?

API keys allow you to access the getlaunch.dev API without OAuth. They're perfect for:

  • CI/CD pipelines (GitHub Actions, GitLab CI, etc.)
  • Automation scripts
  • Third-party integrations
  • Server-to-server communication

API keys use the glk_ prefix (e.g., glk_a1b2c3d4...) and are only shown once when created. Store them securely immediately.


Creating an API Key

Via Sidebar

  1. Go to Sidebar in your dashboard
  2. Find the API Keys section
  3. Click Create API Key
  4. Enter a name (e.g., "GitHub Actions deploy")
  5. Select the scopes your key needs (at least one required)
  6. Optionally set an expiration date
  7. Click Create

Your key will be displayed in a one-time reveal modal. Copy and store it immediately — it won't be shown again.


Available Scopes

Each API key grants access through specific scopes. Choose only the scopes your integration needs:

ScopeAccess
projects:readList/view projects, VCS connections, repos
projects:writeCreate, update, delete projects
deployments:readList deployments, view logs
deployments:writeTrigger new deployments
files:readList files in storage projects
files:writeUpload files to storage projects
billing:readView subscription, invoices, quotas

Note: Account settings, VCS connections, and AI generation are not accessible via API keys.


Using an API Key

Pass your API key in the Authorization header as a Bearer token:

Authorization: Bearer glk_a1b2c3d4...

curl

# List projects
curl https://api.getlaunch.dev/v1/private/projects \
  -H "Authorization: Bearer glk_a1b2c3d4..."

# Trigger a deployment from the project's configured branch
curl -X POST https://api.getlaunch.dev/v1/private/projects/{projectID}/deployments \
  -H "Authorization: Bearer glk_a1b2c3d4..."

# Request an upload URL for storage
curl -X POST https://api.getlaunch.dev/v1/private/projects/{id}/files \
  -H "Authorization: Bearer glk_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "data.csv",
    "content_type": "text/csv",
    "size": 1024
  }'

# Upload the file to the returned upload_url
curl -X PUT "{upload_url}" \
  -H "Content-Type: text/csv" \
  --data-binary @data.csv

GitHub Actions

Store your API key as a repository secret and use it in workflows:

env:
  GETLAUNCH_API_KEY: ${{ secrets.GETLAUNCH_API_KEY }}
  GETLAUNCH_PROJECT_ID: ${{ vars.GETLAUNCH_PROJECT_ID }}

- name: Deploy to GetLaunch
  run: |
    curl -f -X POST https://api.getlaunch.dev/v1/private/projects/$GETLAUNCH_PROJECT_ID/deployments \
      -H "Authorization: Bearer $GETLAUNCH_API_KEY"

Never hardcode API keys in your code or workflows. Always use repository secrets.

Node.js / fetch

const apiKey = process.env.GETLAUNCH_API_KEY;

const res = await fetch('https://api.getlaunch.dev/v1/private/projects', {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
  },
});
const { data } = await res.json();
console.log(data);

Python

import httpx
import os

api_key = os.getenv("GETLAUNCH_API_KEY")
client = httpx.Client(headers={"Authorization": f"Bearer {api_key}"})

response = client.get("https://api.getlaunch.dev/v1/private/projects")
projects = response.json()
print(projects)

Connect with Claude / MCP

Connect Claude or any MCP-compatible AI client to let it read your projects, trigger deployments, manage files, and check billing — using natural language.

Claude (claude.ai)

No API key needed. Claude supports OAuth — just add the server URL and follow the on-screen guide:

  1. In Claude, add a new MCP server with URL https://api.getlaunch.dev/mcp, give it a name (e.g. getlaunch), and click Connect
  2. Follow the on-screen guide to authorize access

Other MCP clients

For Claude Desktop, Claude Code CLI, or any client requiring manual config, create an API key first, then:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "getlaunch": {
      "type": "http",
      "url": "https://api.getlaunch.dev/mcp",
      "headers": {
        "Authorization": "Bearer glk_your_key_here"
      }
    }
  }
}

Claude Code CLI:

claude mcp add --transport http getlaunch https://api.getlaunch.dev/mcp \
  --header "Authorization: Bearer glk_your_key_here"

Restart your client after adding — it will discover the available tools automatically.

What the AI can do

Depending on the scopes you grant, the AI assistant can:

ScopeCapability
projects:readList projects, check deployment status
deployments:writeTrigger a new deployment
files:readList files in a storage bucket
files:writeUpload files to storage
billing:readCheck current quota and invoice status

Tip: narrow the scope

For an AI assistant you use day-to-day, projects:read + deployments:write is usually enough. Avoid granting projects:write unless you specifically want the AI to create or delete projects.


Managing Keys

View Key Details

Keys display:

  • Name — Your label for the key
  • Prefix — The first 8 characters (e.g., glk_a1b2) for identification
  • Scopes — Permissions granted
  • Last Used — When the key was last used (helps identify active keys)
  • Expires — Expiration date, if set

Expiration Warnings

Keys expiring within 7 days show a warning badge. Plan ahead to avoid service interruptions.

Key Rotation

To rotate a key:

  1. Create a new key with the same scopes
  2. Update your scripts and integrations to use the new key
  3. Delete the old key after verifying everything works

Limits & Quotas

  • Max 10 keys per user — Contact support if you need more
  • Key format — Always starts with glk_
  • Expiration — Can be set up to 10 years in the future

Security Best Practices

Store safely:

  • Use environment variables or secret management tools (never hardcode keys)
  • In CI/CD, always use repository or organization secrets
  • Rotate keys periodically

Limit scope:

  • Grant only the permissions your integration needs
  • Use separate keys for different purposes (one for deployments, one for file uploads, etc.)

Monitor usage:

  • Review the "Last Used" timestamp to identify unused keys
  • Delete keys you no longer need
  • Check which integrations are using each key

Handle expiration:

  • Set reasonable expiration dates
  • Receive dashboard warnings for expiring keys
  • Rotate before expiration to avoid downtime

Error Codes

ErrorHTTPCause
API_KEY_NOT_FOUND404Key ID doesn't exist or belongs to another user
API_KEY_LIMIT_EXCEEDED409You've created 10 keys (maximum allowed)
VALIDATION_ERROR400Invalid name, unknown scope, or invalid date format
UNAUTHORIZED401Key missing, invalid, expired, or lacks required scope

Examples

Trigger Deployment from Script

#!/bin/bash
PROJECT_ID="proj-12345"

curl -X POST "https://api.getlaunch.dev/v1/private/projects/$PROJECT_ID/deployments" \
  -H "Authorization: Bearer $GETLAUNCH_API_KEY"

List All Projects and Their Status

import httpx

api_key = "glk_your_key_here"
headers = {"Authorization": f"Bearer {api_key}"}

response = httpx.get(
    "https://api.getlaunch.dev/v1/private/projects",
    headers=headers
)
projects = response.json()["data"]["projects"]

for project in projects:
    print(f"{project['name']} — {project['deployment_type']}")

Upload File to Storage (Multi-step)

  1. Request an upload URL:
curl -X POST https://api.getlaunch.dev/v1/private/projects/{projectId}/files \
  -H "Authorization: Bearer glk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "data.csv",
    "content_type": "text/csv",
    "size": 5120
  }'
  1. Upload to the provided URL:
curl -X PUT "{upload_url}" \
  --data-binary @data.csv

What's Next?