---
title: Versions and changes
description: How the API changes without breaking clients, how a deprecation is announced, and where the changelog is.
sidebar:
  icon: git-branch
---

## Versioning [#versioning]

The API has no version in its path, and only one version, because it only grows. Fields, operations, values of an enumeration and errors are added. None is renamed, removed or made stricter.

A client written today keeps working, as long as it ignores what it doesn't know:

| What the client meets                                                                               | What it does                                                 |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| A field it doesn't read, in any answer or webhook payload                                           | Ignores it.                                                  |
| A value it doesn't know where a field lists its values, such as a new post status or failure reason | Treats it as "something else", never as a failure to decode. |
| An error code it doesn't know                                                                       | Falls back on the HTTP status, and shows `message`.          |

> **Tests block any change that could break a client**
>
> Every change to the contract is compared with the last released OpenAPI
> document, the one the SDKs were generated from (their release 0.3.0 today).
> The project's tests fail on any change that could break a client: an
> operation, a field or a value removed or renamed, a parameter that became
> required, or a type that changed.

A break happens only when it's decided on. It's then recorded with its reason and listed in the [changelog](#changelog) under `breaking`. Wherever an endpoint goes away, a [deprecation](#deprecations) announces it first.

Webhook payloads follow the same rule, with a `version` of their own ([Versions](/developers/webhooks/requests#versions)).

## The version header [#version-header]

A version of the API is the day of a release in the [changelog](#changelog), such as `2026-11-09`. Every answer carries the version the server speaks, its latest release, in a `Peal-Version` header:

```http
HTTP/1.1 200 OK
Content-Type: application/json
Peal-Version: 2026-11-09
```

Send the version your client was written against in the same header. The SDKs and the command line send theirs on every request, so there's nothing to set. The server answers every client alike whatever it sends, a missing or unknown version included, and counts which versions its clients send. If a break is ever decided on, that count shows who still calls with an older version.

## Deprecations [#deprecations]

A deprecated endpoint keeps answering as it always did. It says so in three places:

- The OpenAPI document marks its operation `deprecated`, which generated clients and editors show.
- Every answer from it carries the headers below.
- The [changelog](#changelog) lists it, by operation, in the release that deprecated it.

Here's what each header says:

| Header        | What it says                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Deprecation` | Since when the endpoint is deprecated, as RFC 9745 writes it: `@` followed by seconds since 1970, such as `@1803859200`. |
| `Sunset`      | When it stops answering, once that is decided, as an HTTP date (RFC 8594), such as `Wed, 01 Sep 2027 00:00:00 GMT`.      |
| `Link`        | Where the deprecation is explained, with what to call instead, when there is such a page: `rel="deprecation"`.           |

`Sunset` and `Link` are there only when there's something to say, so a deprecated endpoint without `Sunset` has no end decided. Have your client log any answer that carries `Deprecation`.

No endpoint is deprecated today.

## Changelog [#changelog]

`GET /api/changelog` lists the releases of the API, newest first. It needs no credential, so a client can read it to learn what the server it found can do.

```ts Node.js
import { PealClient } from "@peal-social/sdk";

const peal = new PealClient({ token: process.env.PEAL_API_KEY });

const changelog = await peal.system.changelog();
```

```python Python
import os

from peal import Peal

peal = Peal(token=os.environ["PEAL_API_KEY"])

changelog = peal.system.changelog()
```

```go Go
import (
	"context"
	"os"

	"github.com/peal-social/peal/packages/peal-sdk/go/client"
	"github.com/peal-social/peal/packages/peal-sdk/go/option"
)

client := client.NewClient(option.WithToken(os.Getenv("PEAL_API_KEY")))

changelog, err := client.System.Changelog(context.Background())
```

```ruby Ruby
require "peal"

peal = Peal::Client.new(token: ENV.fetch("PEAL_API_KEY"))

changelog = peal.system.changelog
```

```java Java
import social.peal.PealClient;
import social.peal.types.ApiChangelog;

PealClient peal = PealClient.builder()
    .token(System.getenv("PEAL_API_KEY"))
    .build();

ApiChangelog changelog = peal.system().changelog();
```

```php PHP
<?php
use Peal\PealClient;

$peal = new PealClient(token: getenv('PEAL_API_KEY'));

$changelog = $peal->system->changelog();
```

```csharp .NET
using Peal;

var peal = new PealClient(Environment.GetEnvironmentVariable("PEAL_API_KEY")!);

var changelog = await peal.System.ChangelogAsync();
```

```rust Rust
use peal_sdk::prelude::*;

let peal = PealClient::new(ClientConfig {
    token: std::env::var("PEAL_API_KEY").ok(),
    ..Default::default()
})?;

let changelog = peal.system.changelog(None).await?;
```

```bash curl
curl https://api.example.com/api/changelog
```

The answer lists one entry per release:

```json
{
  "entries": [
    {
      "date": "2026-11-09",
      "title": "The API as the SDKs' release 0.3.0 calls it: 49 operations. Later entries list what each release adds to it.",
      "operations": [],
      "deprecations": [],
      "breaking": [],
      "additions": 0
    }
  ]
}
```

Each entry has these fields:

| Field          | What it holds                                                                                        |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| `date`         | The day of the release.                                                                              |
| `title`        | What the release is, in a sentence.                                                                  |
| `operations`   | The operations it added, by operation id, such as `workspace.activity.list`.                         |
| `deprecations` | The operations it deprecated, by operation id.                                                       |
| `breaking`     | The changes that could break a client, each with the `change` and its `reason`. Almost always empty. |
| `additions`    | How many additions it made in all: operations, fields, values and errors.                            |
