Back to Docs

Releases & Changelog

Display your changelog and release notes in your app. Public releases require no authentication.

import { useState, useEffect } from 'react';

interface Release {
  id: string;
  title: string;
  content: string;
  publishedAt: number;
}

export function useReleases(workspaceSlug: string) {
  const [releases, setReleases] = useState<Release[]>([]);
  const [isLoading, setIsLoading] = useState(true);

  useEffect(() => {
    fetch(`https://simpleproduct.dev/api/v1/releases/public?workspace=${workspaceSlug}`)
      .then(res => res.json())
      .then(data => {
        setReleases(data.data || []);
        setIsLoading(false);
      });
  }, [workspaceSlug]);

  return { releases, isLoading };
}

// Changelog component
export function Changelog({ workspaceSlug }: { workspaceSlug: string }) {
  const { releases, isLoading } = useReleases(workspaceSlug);

  if (isLoading) return <p>Loading...</p>;

  return (
    <div>
      <h2>What's New</h2>
      {releases.map(release => (
        <article key={release.id}>
          <h3>{release.title}</h3>
          <time>{new Date(release.publishedAt).toLocaleDateString()}</time>
          <div dangerouslySetInnerHTML={{ __html: release.content }} />
        </article>
      ))}
    </div>
  );
}

RSS Feed

Subscribe to releases via RSS. Great for letting users follow updates in their feed reader.

https://simpleproduct.dev/api/v1/releases/rss?workspace=YOUR_WORKSPACE_SLUG

API Reference

GET /api/v1/releases/public

Get published releases. No authentication required.

Query Parameters

ParameterRequiredDescription
workspaceYesYour workspace slug

POST /api/v1/releases

Create a new release. Requires authentication.

Request Body

{ "title": "v2.1.0", "content": "## What's New\n- Dark mode\n- Bug fixes", "status": "published", "publishedAt": 1234567890 }

Fields

FieldTypeDescription
titlestringRelease title (e.g., "v2.1.0")
contentstringRelease notes content (markdown)
statusstring"draft" or "published"
publishedAtnumberUnix timestamp (milliseconds)

Tips

  • Cache responses: Use revalidate in Next.js or set cache headers to avoid hitting the API on every page load
  • Use markdown: Release content supports markdown formatting
  • Offer RSS: Link to the RSS feed so users can follow updates in their preferred reader