---
title: "Check for an available patch for an install."
method: POST
path: "/patches/check"
tags: ["patches"]
---

# Check for an available patch for an install.

`POST /patches/check`

## Request

- Base URL: `https://api.shorebird.dev/api/v1`
- URL: `https://api.shorebird.dev/api/v1/patches/check`
- Auth: none required

## Request body

- PatchCheckRequest: The request body for POST /patches/check.
  - `release_version` string, required: The release version of the app.
  - `patch_number` integer: The highest patch number the client has already downloaded. If provided, the server only returns patches with a higher number. If omitted, the server returns the latest available.
  - `platform` 'android' | 'ios' | 'linux' | 'macos' | 'windows', required: A platform to which a Shorebird release can be deployed.
  - `arch` string, required: The architecture of the app.
  - `app_id` string, required: The ID of the app.
  - `channel` string, required: The channel of the app.
  - `client_id` string: Unique device ID for the install, generated on device and unique per app. Optional for backward compatibility.
  - `current_patch_number` integer: The patch number currently running on the device, if any. Supersedes `patch_number` for newer clients; unlike `patch_number`, this does not affect the server's response.

## Response `200`

The patch check result.

- PatchCheckResponse: The response body for POST /patches/check.
  - `patch_available` boolean, required: Whether a patch is available.
  - `patch` PatchCheckMetadata: Patch metadata representing the contents of a patch for a specific platform and architecture.
    - `number` integer, required: The patch number associated with the artifact.
    - `download_url` string, required: The URL of the artifact.
    - `hash` string, required: The hash of the artifact.
    - `hash_signature` string: The signature of the `hash`.
  - `rolled_back_patch_numbers` integer[]: The numbers of all patches that have been rolled back for the current release.

## Other responses

- `default`: Standard error response. Emitted for any non-2xx status where a body can be decoded into an [ErrorResponse].

---

[API](https://skmtc.dev/shorebird/apis/shorebird-codepush-api.md) - [All operations](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shorebird/apis/shorebird-codepush-api/revisions/941da8871d10?raw)
