---
title: "Retrieve Latest Release for a Device"
method: GET
path: "/api/v0/releases/latest"
tags: ["Releases"]
---

# Retrieve Latest Release for a Device

`GET /api/v0/releases/latest`

## Request

- Base URL: `https://api.memfault.com`
- URL: `https://api.memfault.com/api/v0/releases/latest`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/memfault/apis/memfault-api-documentation/docs/api/v0/releases/latest/get.ts> (a function with typed inputs; its response is checked against the schema)

For a given **Device** (*Device Unique Identifier* and *Hardware Version*), return the latest **Release** that should be installed.

| Query Parameter                          | Type     | Description                                                                                                |
|:-----------------------------------------|:---------|:-----------------------------------------------------------------------------------------------------------|
| `hardware_version` <br />**Required**    | `String` | Hardware Version of the **Device**                                                                         |
| `software_type` <br />**Required**       | `String` | Software Type being looked up for the **Device**                                                           |
| `current_version` <br />**Suggested**    | `String` | The **Software Version** that the **Device** is currently running (used for hopping through versions)      |
| `device_serial` <br />**Required**       | `String` | The **Device** serial to identify a particular device (used for determining the **Cohort**)                |

NOTE: This endpoint *requires* that the sender use a custom HTTP header defining the Memfault Project Client Key.

`Memfault-Project-Key: 87c2ca9d3ec148ac82034fc2724ff614`

Note: More details about version nomenclature can be found [here](https://mflt.io/34PyNGQ).

---

#### Return Value

- `200 Ok` — Returns a **Release** Schema if an update is available. The artifact URL(s) contained within will be direct links to OTA payloads served from Memfault's CDN. These URLs have an expiry of 6 hours.
- `204 No Content` — No new release available for the given device.
- `400 Bad Request` — `hardware_version` or `software_type` don't exist, or `device_serial` is missing.
- `403 Unauthorized` — Project Key is missing or invalid.
- `503 Service Unavailable` — Retry after the interval specified in the `Retry-After` response header.

## Headers

- `Memfault-Project-Key` string, required

## Response `200`

---

[API](https://skmtc.dev/memfault/apis/memfault-api-documentation.md) - [All operations](https://skmtc.dev/memfault/apis/memfault-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/memfault/apis/memfault-api-documentation/revisions/1e61a9fcb142?raw)
