ChangeCrab API Overview

Complete overview of the ChangeCrab REST API. Learn about authentication, endpoints, and usage.

All Articles

ChangeCrab API Overview

The ChangeCrab REST API allows you to programmatically create, read, update, and delete changelogs and entries. This enables automation, integration with CI/CD pipelines, and custom workflows.

Prerequisites

To use the ChangeCrab API, you need:

  • A premium ChangeCrab subscription
  • An API key (see API Authentication)
  • Basic knowledge of REST APIs and HTTP requests

API Base URL

All API requests should be made to:

https://changecrab.com/api

Authentication

The ChangeCrab API uses API key authentication. Include your API key in the request header:

X-API-Key: your-api-key-here

Learn more about API authentication and managing API keys.

API Endpoints

Changelogs

Method Endpoint Description
GET /changelogs List all changelogs
POST /changelogs Create a new changelog
GET /changelogs/{id} Get a specific changelog
PUT /changelogs/{id} Update a changelog
DELETE /changelogs/{id} Delete a changelog

Posts (Entries)

Method Endpoint Description
GET /changelogs/{id}/posts List all posts for a changelog
POST /changelogs/{id}/posts Create a new post
PUT /changelogs/{id}/posts/{postId} Update a post
DELETE /changelogs/{id}/posts/{postId} Delete a post

Categories

Method Endpoint Description
GET /changelogs/{id}/categories List all categories for a changelog

Response Format

All API responses are in JSON format. Successful responses include:

{
    "success": true,
    "data": {
        // Response data here
    }
}

Error responses include:

{
    "success": false,
    "error": "Error message here",
    "errors": {
        // Validation errors (if applicable)
    }
}

HTTP Status Codes

  • 200 OK - Request successful
  • 201 Created - Resource created successfully
  • 400 Bad Request - Invalid request data
  • 401 Unauthorized - Invalid or missing API key
  • 403 Forbidden - Access denied
  • 404 Not Found - Resource not found
  • 422 Unprocessable Entity - Validation errors
  • 500 Internal Server Error - Server error

Rate Limiting

API requests are rate-limited to prevent abuse. Limits are:

  • 100 requests per minute per API key
  • 1000 requests per hour per API key

Rate limit headers are included in responses:

  • X-RateLimit-Limit - Request limit
  • X-RateLimit-Remaining - Remaining requests
  • X-RateLimit-Reset - When the limit resets

Code Examples

cURL

# List all changelogs
curl -X GET https://changecrab.com/api/changelogs \
  -H "X-API-Key: your-api-key-here"

# Create a new changelog
curl -X POST https://changecrab.com/api/changelogs \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Changelog",
    "team": 1,
    "subdomain": "mychangelog"
  }'

JavaScript (Fetch)

// List all changelogs
fetch('https://changecrab.com/api/changelogs', {
  method: 'GET',
  headers: {
    'X-API-Key': 'your-api-key-here'
  }
})
.then(response => response.json())
.then(data => console.log(data));

// Create a new post
fetch('https://changecrab.com/api/changelogs/{id}/posts', {
  method: 'POST',
  headers: {
    'X-API-Key': 'your-api-key-here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    summary: 'New Feature',
    markdown: '# New Feature\n\nDescription here',
    public: 1,
    team: 1
  })
})
.then(response => response.json())
.then(data => console.log(data));

Python

import requests

# List all changelogs
response = requests.get(
    'https://changecrab.com/api/changelogs',
    headers={'X-API-Key': 'your-api-key-here'}
)
print(response.json())

# Create a new post
response = requests.post(
    'https://changecrab.com/api/changelogs/{id}/posts',
    headers={
        'X-API-Key': 'your-api-key-here',
        'Content-Type': 'application/json'
    },
    json={
        'summary': 'New Feature',
        'markdown': '# New Feature\n\nDescription here',
        'public': 1,
        'team': 1
    }
)
print(response.json())

Next Steps

Learn more about: