Update API

The Update API provides a Tauri-compatible endpoint for checking whether a newer version of your application is available. It follows the Tauri Updater protocol, making it a drop-in backend for Tauri desktop applications. No authentication is required.

GET/api/update/{productSlug}/{target}/{arch}/{currentVersion}

Check for an available update. Returns update metadata if a newer stable release exists, or a 204 No Content response if the current version is up to date.

URL Parameters

ParameterTypeDescription
productSlugstringThe product identifier (e.g. nexadeck)
targetstringTauri target identifier (see table below)
archstringCPU architecture (see table below)
currentVersionstringCurrent app version in semver format (e.g. 1.0.0)

Supported Targets

Tauri TargetPlatform
darwinmacOS
windows-msvcWindows
linuxLinux

Supported Architectures

Tauri ArchArchitecture
x86_6464-bit x86 (Intel/AMD)
aarch6464-bit ARM (Apple Silicon, etc.)

Update Available Response (200)

{
  "version": "1.2.0",
  "url": "https://releases.example.com/nexadeck/1.2.0/nexadeck-1.2.0-darwin-aarch64.tar.gz",
  "signature": "dGhlIHNpZ25hdHVyZSBvZiB0aGUgdXBkYXRl...",
  "pub_date": "2025-06-01T12:00:00.000Z",
  "notes": "## What's New\n- Feature X\n- Bug fix Y"
}

TypeScript Interface

interface UpdateResponse {
  version: string;    // New version number (semver)
  url: string;        // Download URL for the update (HTTPS)
  signature: string;  // Signature for verifying the update
  pub_date: string;   // ISO 8601 publish date
  notes: string;      // Release notes (markdown)
}

No Update Available (204)

An empty response with status 204 No Content is returned when the current version is already the latest, or when no release exists for the requested platform and architecture.

Error Responses

CodeErrorCause
400Unknown targetTarget string is not recognized
400Unknown archArchitecture string is not recognized
404Unknown productProduct slug does not exist

Example (curl)

curl https://your-domain.com/api/update/nexadeck/darwin/aarch64/1.0.0

Example (Tauri Configuration)

Configure the Tauri updater in your tauri.conf.json:

{
  "plugins": {
    "updater": {
      "endpoints": [
        "https://your-domain.com/api/update/nexadeck/{{target}}/{{arch}}/{{current_version}}"
      ]
    }
  }
}

Example (TypeScript)

const target = "darwin";
const arch = "aarch64";
const currentVersion = "1.0.0";

const response = await fetch(
  `https://your-domain.com/api/update/nexadeck/${target}/${arch}/${currentVersion}`
);

if (response.status === 204) {
  console.log("Already up to date");
} else if (response.ok) {
  const update = await response.json();
  console.log("Update available:", update.version);
  console.log("Download:", update.url);
} else {
  const error = await response.json();
  console.error("Update check failed:", error.error);
}

Example (Rust)

use reqwest::Client;
use serde::Deserialize;

#[derive(Deserialize)]
struct UpdateResponse {
    version: String,
    url: String,
    signature: String,
    pub_date: String,
    notes: String,
}

let client = Client::new();
let res = client
    .get("https://your-domain.com/api/update/nexadeck/darwin/aarch64/1.0.0")
    .send()
    .await?;

match res.status().as_u16() {
    204 => println!("Already up to date"),
    200 => {
        let update: UpdateResponse = res.json().await?;
        println!("Update available: {}", update.version);
        println!("Download: {}", update.url);
    }
    _ => {
        let body = res.text().await?;
        eprintln!("Update check failed: {}", body);
    }
}