Create and manage API keys for secure programmatic access to DeployBrief.
API keys provide secure, programmatic access to DeployBrief for automation, CI/CD integration, and custom tooling. Each key has specific scopes that control what actions it can perform.
Key Format: API keys start with db_ followed by a random
string (e.g., db_1234567890abcdef)
Only Owners and Admins can create API keys:
Important: Store your API key securely! Treat it like a password. If lost, you must create a new key.
Scopes control what actions an API key can perform. Follow the principle of least privilege.
View existing deployment briefs. Required for listing and retrieving briefs.
Generate new deployment briefs. Required for automated brief generation in CI/CD.
Delete deployment briefs. Use cautiously; typically not needed for automation.
View Azure DevOps connections. Useful for discovering available connections.
View pipeline presets. Required for preset-based brief generation.
CI/CD Pipeline (Recommended)
briefs:write, briefs:read, presets:read
Read-Only Dashboard
briefs:read, connections:read, presets:read
Full Automation (Use Carefully)
briefs:*, connections:read, presets:read
Include your API key in the Authorization header as a Bearer token:
curl https://api.deploybrief.com/api/briefs \
-H "Authorization: Bearer db_1234567890abcdef"const response = await fetch('https://api.deploybrief.com/api/briefs', {
headers: {
'Authorization': `Bearer $${process.env.DEPLOYBRIEF_API_KEY}`,
'Content-Type': 'application/json'
}
}});import requests
import os
headers = {
'Authorization': f'Bearer {os.getenv("DEPLOYBRIEF_API_KEY")}',
'Content-Type': 'application/json'
}
response = requests.get('https://api.deploybrief.com/api/briefs', headers=headers)$headers = @{
'Authorization' = "Bearer $env:DEPLOYBRIEF_API_KEY"
'Content-Type' = 'application/json'
}
Invoke-RestMethod -Uri 'https://api.deploybrief.com/api/briefs' -Headers $headersSee all active API keys for your workspace:
Immediately invalidate an API key:
Warning: Revoking a key immediately stops all integrations using it. Update your CI/CD pipelines before revoking.
Best practice: rotate keys periodically (every 90 days recommended):
API keys are essential for integrating DeployBrief into your CI/CD pipelines.
# Store API key as GitHub secret: DEPLOYBRIEF_API_KEY
- name: Generate Deployment Brief
run: |
curl -X POST https://api.deploybrief.com/api/briefs/generate-from-preset \
-H "Authorization: Bearer $${{secrets.DEPLOYBRIEF_API_KEY}}" \
-H "Content-Type: application/json" \
-d '{"presetId": "preset-123", "buildId": $${{github.run_id}}}'# Store API key as pipeline variable: DEPLOYBRIEF_API_KEY
- task: PowerShell@2
displayName: 'Generate Deployment Brief'
inputs:
targetType: 'inline'
script: |
$headers = @{
'Authorization' = "Bearer $(DEPLOYBRIEF_API_KEY)"
'Content-Type' = 'application/json'
}
Invoke-RestMethod -Uri 'https://api.deploybrief.com/api/briefs/generate-from-preset' `
-Method Post -Headers $headers `
-Body (@{presetId = 'preset-123'; buildId = $(Build.BuildId)}| ConvertTo-Json)See CI/CD Integration Guide for complete examples.
Authorization: Bearer format is correct