# Get a release

Returns one published release of a product and its artifacts. The version is an exact version or `latest`.

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

## Use cases

- Show the newest release and its download links on a download page.
- Show the notes and the files of one version.
- Read the SHA-256 and the signature of a file before your application installs it.

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

## Versions

`{version}` is an exact version, such as `2.1.0` or `2.1.0-beta.1`, or the word `latest`.

- An exact version returns that release. Send the version without a `v` prefix. The `channel` and `constraint` parameters do not change the result.
- `latest` returns the newest release in the channel and the constraint. The rules are in [Newest release](../../concepts/releases-and-artifacts/#newest-release). Without a `channel`, `latest` uses `stable`.
- A version with build metadata, such as `2.1.0+42`, can have the plus sign as is or encoded as `%2B`.

When no published release matches, the answer has the status 200. `valid` is `false`, and `reason` is `release_not_found`:

```json
{
  "valid": false,
  "reason": "release_not_found",
  "release": null
}
```

A draft and a yanked release get the same answer, even with a valid license key.

## License checks

Get a release 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 `release` is `null`.

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

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

- `latest` returns the newest of these releases.
- An exact version of a release that was published later answers with the reason `release_not_covered`.

Get a release changes no license and records no activity.

## 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. `{version}` is an exact version or `latest`. See [Versions](#versions). 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) for `latest`. The release is from this channel or a more stable channel. The `dev` channel returns only `dev` releases. The default is `stable`. An exact version ignores it. |
| `constraint` | string | No | For `latest`. A major version, such as `2`, or a major and minor version, such as `2.1`. The constraint `2` allows only `2.x.y` versions. The constraint `2.1` allows only `2.1.y` versions. An exact version ignores it. |

## Response

| Field | Type | Description |
| --- | --- | --- |
| `valid` | boolean | `true` when the response has a release. |
| `reason` | string or null | The reason when there is no release. It is `null` when `valid` is `true`. See [Versions](#versions) and [License checks](#license-checks). |
| `release` | object or null | The release. See [Release](#release). It is `null` when `valid` is `false`. |

### 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. This also applies to an exact version. |
| 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. This also applies to an exact version. |
| 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). |

A version that is not found is not an error. See [Versions](#versions).

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

## Example

Get the newest stable release of a product.

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

struct ReleaseCheck: Decodable {
    let valid: Bool
    let reason: String?
    let release: Release?
}

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 request = URLRequest(url: URL(string: "https://dist.seatify.dev/v1/products/\(productID)/releases/latest")!)
request.setValue(licenseKey, forHTTPHeaderField: "Seatify-License-Key")

let (data, _) = try await URLSession.shared.data(for: request)
let check = try JSONDecoder().decode(ReleaseCheck.self, from: data)
```
{{< /tab >}}
{{< tab name="C#" >}}
```csharp
using System.Net.Http.Json;

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

var check = await client.GetFromJsonAsync<ReleaseCheck>(
    $"https://dist.seatify.dev/v1/products/{productId}/releases/latest");

record ReleaseCheck(bool Valid, string? Reason, Release? Release);

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 ReleaseCheck struct {
	Valid   bool     `json:"valid"`
	Reason  *string  `json:"reason"`
	Release *Release `json:"release"`
}

req, err := http.NewRequest("GET", "https://dist.seatify.dev/v1/products/"+productID+"/releases/latest", 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 check ReleaseCheck
err = json.NewDecoder(res.Body).Decode(&check)
```
{{< /tab >}}
{{< tab name="JavaScript" >}}
```javascript
const response = await fetch(
  `https://dist.seatify.dev/v1/products/${productId}/releases/latest`,
  { headers: { "Seatify-License-Key": licenseKey } },
);
const check = await response.json();
```
{{< /tab >}}
{{< /tabs >}}

```json
{
  "valid": true,
  "reason": null,
  "release": {
    "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"
      }
    ]
  }
}
```

