Building Automated Changelog Workflows with APIs
Learn how to integrate your changelog with your development workflow using Changelogy API for seamless, automated updates.
Alex
Owner @ Changelogy
Building Automated Changelog Workflows with APIs
Manually creating changelog entries is time-consuming and error-prone. What if every time you shipped code, your changelog updated automatically?
With Changelogy's API, you can connect your changelog directly to your development process for seamless automation. Here's your complete guide.
Why API-Driven Changelogs?
Manual workflow problems:
- Developer ships code
- Someone remembers to update changelog (maybe)
- Manually writes entry
- Formats correctly
- Publishes
- Notifies users separately
Issues: Forgotten updates, inconsistent formatting, delays, duplicate work.
API-driven solution:
- Developer ships code with changelog metadata
- CI/CD pipeline extracts details
- API creates formatted entry automatically
- Auto-publishes (or stages for review)
- Users notified immediately
Result: Zero manual work, perfect consistency, instant updates, no forgotten announcements.
Changelogy API Quick Start
Authentication
All requests require API keys:
curl https://www.changelogy.com/api/v1/changelogs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Get your API key: Organization Settings → API → Create API Key
Store securely in CI/CD secrets. Never commit to Git.
Core API Endpoints
Create Entry
POST /v1/changelogs
{
"title": "Slack Integration Now Available",
"content": "Connect your workspace to receive real-time notifications...",
"category": "feature",
"tags": ["integration", "slack", "notifications"],
"published": true
}
Response includes entry ID, slug, and URL.
Integration Patterns
Pattern 1: Git Commit Metadata
Extract changelog from commit messages:
Commit format:
feat: Add Slack integration
[changelog]
title: Slack Integration Now Available
category: feature
tags: integration, slack
---
Connect your workspace to Slack and receive real-time
notifications when new updates are published.
[/changelog]
GitHub Actions workflow:
name: Auto Changelog
on:
push:
branches: [main]
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract and publish changelog
run: |
CHANGELOG=$(git log -1 --pretty=%B | sed -n '/\[changelog\]/,/\[\/changelog\]/p')
if [[ -n "$CHANGELOG" ]]; then
# Parse and post to Changelogy API
curl -X POST https://www.changelogy.com/api/v1/changelogs \
-H "Authorization: Bearer \$\{\{ secrets.CHANGELOGY_API_KEY \}\}" \
-H "Content-Type: application/json" \
-d @changelog.json
fi
Pattern 2: Release-Based Automation
Trigger on GitHub releases:
name: Changelog on Release
on:
release:
types: [published]
jobs:
create-changelog:
runs-on: ubuntu-latest
steps:
- name: Create changelog entry
run: |
curl -X POST https://www.changelogy.com/api/v1/changelogs \
-H "Authorization: Bearer \$\{\{ secrets.CHANGELOGY_API_KEY \}\}" \
-H "Content-Type: application/json" \
-d '{ "title": "Release", "content": "New release", "published": true }'
Pattern 3: PR-Based Changelogs
Create entries from merged pull requests with "changelog" label:
name: Changelog from PR
on:
pull_request:
types: [closed]
branches: [main]
jobs:
changelog:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'changelog')
runs-on: ubuntu-latest
steps:
- name: Create entry
run: |
curl -X POST https://www.changelogy.com/api/v1/changelogs \
-H "Authorization: Bearer \$\{\{ secrets.CHANGELOGY_API_KEY \}\}" \
-H "Content-Type: application/json" \
-d '{ "title": "PR Title", "content": "PR content", "published": false }'
Note: published false creates draft for manual review.
Advanced Scenarios
Conditional Publishing
Publish automatically in production, create drafts in staging:
- name: Create changelog
run: |
PUBLISHED="false"
if [ "refs/heads/main" == "refs/heads/main" ]; then
PUBLISHED="true"
fi
curl -X POST https://www.changelogy.com/api/v1/changelogs \
-H "Authorization: Bearer API_KEY" \
-d '{"title": "Update", "published": true}'
Multi-Channel Notifications
Post changelog then notify other platforms:
const changelogRes = await fetch('https://www.changelogy.com/api/v1/changelogs', {
method: 'POST',
headers: {
'Authorization': `Bearer ${CHANGELOGY_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'New Feature Released',
content: '...',
published: true
})
});
const changelog = await changelogRes.json();
// Send to Slack
await fetch(SLACK_WEBHOOK_URL, {
method: 'POST',
body: JSON.stringify({
text: `New changelog: ${changelog.title}`,
blocks: [{
type: 'section',
text: { type: 'mrkdwn', text: `*${changelog.title}*\n${changelog.url}` }
}]
})
});
Bulk Import
Migrate existing releases:
#!/bin/bash
gh release list --limit 100 | while read -r line; do
TAG=$(echo "$line" | awk '{print $1}')
TITLE=$(echo "$line" | awk '{print $2}')
BODY=$(gh release view "$TAG" --json body --jq .body)
curl -X POST https://www.changelogy.com/api/v1/changelogs \
-H "Authorization: Bearer $CHANGELOGY_API_KEY" \
-d "{\"title\": \"$TITLE\", \"content\": \"$BODY\"}"
sleep 1 # Rate limit courtesy
done
Error Handling
Retry Logic
async function createChangelogWithRetry(data, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const res = await fetch('https://www.changelogy.com/api/v1/changelogs', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});
if (res.ok) return await res.json();
if (res.status === 429) {
// Rate limited, wait and retry
const retryAfter = res.headers.get('Retry-After') || 60;
await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
continue;
}
throw new Error(`API error: ${res.status}`);
} catch (error) {
if (i === maxRetries - 1) throw error;
await new Promise(resolve => setTimeout(resolve, 2000 * (i + 1)));
}
}
}
Validation
function validateChangelogData(data) {
const errors = [];
if (!data.title || data.title.length < 5) {
errors.push('Title must be at least 5 characters');
}
if (!data.content || data.content.length < 20) {
errors.push('Content must be at least 20 characters');
}
const validCategories = ['feature', 'improvement', 'fix', 'security'];
if (data.category && !validCategories.includes(data.category)) {
errors.push(`Invalid category`);
}
return errors;
}
Security Best Practices
Secure API Keys:
- Never commit to Git
- Store in CI/CD secrets only
- Rotate keys regularly
- Use different keys per environment
- Revoke unused keys immediately
Rate Limit Your Automation:
const pLimit = require('p-limit');
const limit = pLimit(5); // Max 5 concurrent
const promises = changelogs.map(data =>
limit(() => createChangelog(data))
);
await Promise.all(promises);
Conclusion
API-driven workflows transform changelog maintenance from a chore into an automatic process. By connecting Changelogy to your development pipeline, you ensure every update is documented, every feature is announced, and every user stays informed—without manual intervention.
Ready to automate? Get your API key from Changelogy and start building automated workflows. Free tier includes 100 API calls per hour—perfect for most teams.
Ready to Create Your Changelog?
Start building trust with your users through transparent product updates. Get started with Changelogy today.
Create a Changelog