# List releases

Returns the published releases of a product that the license key can get, the newest first.

`GET /v1/products/{product}/releases`

## Use cases

- Show the releases and their notes on a download page or in your application.
- Offer an older version to a customer.
- Show the prereleases of a channel to your beta testers.

To find out whether a newer version exists, use [Check for an update](../check-for-an-update/).

## License checks

List releases checks the license key when the request sends one. A refused license answers with the status 200. `valid` is `false`, `reason` names the refusal, and `releases` is empty:

```json
{
  "valid": false,
  "reason": "suspended",
  "releases": [],
  "next_cursor": null
}
```

The reason is `product_mismatch`, `suspended` or `expired`. See [License checks](../authentication/#license-checks).

A license that expired under the Perpetual fallback rule is not refused. The list has only the releases that were published on or before the expiry date of the license. A [backdated release](../../concepts/releases-and-artifacts/#backdated-releases) counts as published on its backdated date.

List releases changes no license and records no activity.

## Order and pages

The releases are ordered by version, the newest first. Releases with the same major, minor and patch numbers, such as `2.0.0-beta.2` and `2.0.0-beta.10`, are ordered by the time they were created, the newest first. This order does not follow the prerelease rules in [Newest release](../../concepts/releases-and-artifacts/#newest-release). To get the newest release, use [Get a release](../get-a-release/) with the version `latest`.

A page has at most 50 releases. When more releases follow, `next_cursor` is set. Send its value in the `cursor` parameter to get the next page. Send the same `channel` and `constraint` with each page. On the last page, `next_cursor` is `null`.

## Authentication

Send the license key of the customer. A product with the `open` distribution setting does not require a key. See [Authentication](../authentication/).

## Request

`{product}` is the ID of the product. The request has no body.

| Header | Required | Description |
| --- | --- | --- |
| `Seatify-License-Key` | For a `licensed` product | The license key of the customer. For an `open` product, a key that the request sends must be valid. |
| `Seatify-Nonce` | No | A new random value that the signature includes. See [Signed responses](../#signed-responses). |
| `Seatify-Signing-Key` | No | The key ID of the signing key in your application. See [Signed responses](../#signed-responses). |

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `channel` | string | No | The [channel](../../concepts/releases-and-artifacts/#channels) to list. The list has this channel and every more stable channel. The `dev` channel lists only `dev` releases. The default is `stable`. |
| `constraint` | string | No | A major version, such as `2`, or a major and minor version, such as `2.1`. The constraint `2` lists only `2.x.y` versions. The constraint `2.1` lists only `2.1.y` versions. |
| `cursor` | string | No | The `next_cursor` of the previous page. See [Order and pages](#order-and-pages). |

## Response

| Field | Type | Description |
| --- | --- | --- |
| `valid` | boolean | `true` when the license gets the releases. |
| `reason` | string or null | The reason of the refusal. It is `null` when `valid` is `true`. See [License checks](#license-checks). |
| `releases` | array | The releases on this page. See [Release](#release). The array is empty when the license is refused. |
| `next_cursor` | string or null | The cursor of the next page. It is `null` on the last page. |

### Release

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The ID of the release. |
| `version` | string | The version of the release, such as `2.1.0` or `2.1.0-beta.1`. |
| `channel` | string | The [channel](../../concepts/releases-and-artifacts/#channels) of the release: `stable`, `rc`, `beta`, `alpha` or `dev`. |
| `name` | string or null | The name of the release. |
| `notes` | string or null | The release notes. |
| `published_at` | string | The time when the release was first published. |
| `artifacts` | array | The files of the release. See [Artifact](#artifact). Only files whose upload has finished are listed. |

### Artifact

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The ID of the artifact. |
| `filename` | string | The name of the file. |
| `filetype` | string or null | The file type from the extension of the filename, such as `dmg` or `tar.gz`. It is `null` when the filename has no extension. |
| `platform` | string or null | The [platform](../../concepts/releases-and-artifacts/#platforms-and-architectures) of the file, such as `darwin`. |
| `arch` | string or null | The [architecture](../../concepts/releases-and-artifacts/#platforms-and-architectures) of the file, such as `arm64`. |
| `content_type` | string | The content type of the file. |
| `size` | integer | The size of the file in bytes. |
| `sha256` | string | The SHA-256 of the file in lower-case hex. |
| `signature` | string | The Ed25519 signature of the file in base64. See [Verifying files](../../concepts/releases-and-artifacts/#verifying-files). |
| `signing_key_id` | string | The ID of the signing key that made the signature. |
| `vendor_signature` | string or null | The signature for your update framework, such as a Tauri or Sparkle signature. |
| `url` | string | The download URL of the file. See [Download an artifact](../download-an-artifact/). |

## Errors

| Status | Reason | Description |
| --- | --- | --- |
| 400 | `The channel must be stable, rc, beta, alpha or dev.` | `channel` has another value. |
| 400 | `The constraint must be a major version, or a major and minor version, such as 2 or 2.1.` | `constraint` is not a major version or a major and minor version. A full version such as `2.1.0` is not valid. |
| 400 | `The cursor is not valid.` | `cursor` is not a release ID. |
| 400 | `The release cursor is not valid.` | `cursor` does not name a release of this product. |
| 400 | `The signing key is not known.` | Your organization has no signing key with the ID in `Seatify-Signing-Key`. |
| 400 | `The nonce must be at most 255 characters.` | The value of `Seatify-Nonce` is too long. |
| 401 | `A license key is required.` | The product is `licensed`, and the request has no `Seatify-License-Key` header, or the header is empty. |
| 401 | `The license key is not valid.` | No license in your account has this key. This applies to an `open` product too. |
| 404 | `The product was not found.` | No product has this ID. |
| 429 | `There are too many requests. Try again later.` | See [Rate limits](../#rate-limits). |

The error of a query parameter is in the `errors` field, under the name of the parameter. See [Errors](../#errors).

## Example

List the `1.4` releases of a product.

{{< tabs >}}
{{< tab name="curl" >}}
```bash
curl "https://dist.seatify.dev/v1/products/$PRODUCT_ID/releases?constraint=1.4" \
  -H "Seatify-License-Key: $LICENSE_KEY"
```
{{< /tab >}}
{{< tab name="Swift" >}}
```swift
import Foundation

struct ReleaseList: Decodable {
    let valid: Bool
    let reason: String?
    let releases: [Release]
    let nextCursor: String?
}

struct Release: Decodable {
    let id: String
    let version: String
    let channel: String
    let name: String?
    let notes: String?
    let artifacts: [Artifact]
}

struct Artifact: Decodable {
    let filename: String
    let platform: String?
    let arch: String?
    let size: Int
    let sha256: String
    let url: String
}

var components = URLComponents(string: "https://dist.seatify.dev/v1/products/\(productID)/releases")!
components.queryItems = [URLQueryItem(name: "constraint", value: "1.4")]

var request = URLRequest(url: components.url!)
request.setValue(licenseKey, forHTTPHeaderField: "Seatify-License-Key")

let (data, _) = try await URLSession.shared.data(for: request)

let decoder = JSONDecoder()
decoder.keyDecodingStrategy = .convertFromSnakeCase
let list = try decoder.decode(ReleaseList.self, from: data)
```
{{< /tab >}}
{{< tab name="C#" >}}
```csharp
using System.Net.Http.Json;
using System.Text.Json.Serialization;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Seatify-License-Key", licenseKey);

var list = await client.GetFromJsonAsync<ReleaseList>(
    $"https://dist.seatify.dev/v1/products/{productId}/releases?constraint=1.4");

record ReleaseList(
    bool Valid,
    string? Reason,
    List<Release> Releases,
    [property: JsonPropertyName("next_cursor")] string? NextCursor);

record Release(string Id, string Version, string Channel, string? Name, string? Notes, List<Artifact> Artifacts);

record Artifact(string Filename, string? Platform, string? Arch, long Size, string Sha256, string Url);
```
{{< /tab >}}
{{< tab name="Go" >}}
```go
type Artifact struct {
	Filename string  `json:"filename"`
	Platform *string `json:"platform"`
	Arch     *string `json:"arch"`
	Size     int64   `json:"size"`
	SHA256   string  `json:"sha256"`
	URL      string  `json:"url"`
}

type Release struct {
	ID        string     `json:"id"`
	Version   string     `json:"version"`
	Channel   string     `json:"channel"`
	Name      *string    `json:"name"`
	Notes     *string    `json:"notes"`
	Artifacts []Artifact `json:"artifacts"`
}

type ReleaseList struct {
	Valid      bool      `json:"valid"`
	Reason     *string   `json:"reason"`
	Releases   []Release `json:"releases"`
	NextCursor *string   `json:"next_cursor"`
}

req, err := http.NewRequest("GET", "https://dist.seatify.dev/v1/products/"+productID+"/releases?constraint=1.4", nil)
if err != nil {
	return err
}
req.Header.Set("Seatify-License-Key", licenseKey)

res, err := http.DefaultClient.Do(req)
if err != nil {
	return err
}
defer res.Body.Close()

var list ReleaseList
err = json.NewDecoder(res.Body).Decode(&list)
```
{{< /tab >}}
{{< tab name="JavaScript" >}}
```javascript
const response = await fetch(
  `https://dist.seatify.dev/v1/products/${productId}/releases?constraint=1.4`,
  { headers: { "Seatify-License-Key": licenseKey } },
);
const list = await response.json();
```
{{< /tab >}}
{{< /tabs >}}

```json
{
  "valid": true,
  "reason": null,
  "releases": [
    {
      "id": "<release id>",
      "version": "1.4.0",
      "channel": "stable",
      "name": null,
      "notes": "Updates through Sparkle.",
      "published_at": "2026-09-21T23:00:00Z",
      "artifacts": [
        {
          "id": "<artifact id>",
          "filename": "BEACON-1.4.0.zip",
          "filetype": "zip",
          "platform": "darwin",
          "arch": "universal",
          "content_type": "application/zip",
          "size": 53,
          "sha256": "<sha256>",
          "signature": "<signature>",
          "signing_key_id": "<signing key id>",
          "vendor_signature": "<vendor signature>",
          "url": "https://dist.seatify.dev/v1/products/<product id>/releases/1.4.0/artifacts/BEACON-1.4.0.zip"
        },
        {
          "id": "<artifact id>",
          "filename": "BEACON-1.4.0-arm64-setup.exe",
          "filetype": "exe",
          "platform": "windows",
          "arch": "arm64",
          "content_type": "application/vnd.microsoft.portable-executable",
          "size": 50,
          "sha256": "<sha256>",
          "signature": "<signature>",
          "signing_key_id": "<signing key id>",
          "vendor_signature": "<vendor signature>",
          "url": "https://dist.seatify.dev/v1/products/<product id>/releases/1.4.0/artifacts/BEACON-1.4.0-arm64-setup.exe"
        }
      ]
    }
  ],
  "next_cursor": null
}
```

