---
title: "ifMatchHeader | TypeScript SDK | AEO API"
description: "Format a resource revision for the If-Match request header. When calling an SDK method, you can also pass the revision directly in options.ifMatch."
url: "https://aeoapi.dev/docs/sdks/typescript/ifMatchHeader"
canonical: "https://aeoapi.dev/docs/sdks/typescript/ifMatchHeader"
last_updated: "2026-11-30"
---

# ifMatchHeader

Format a resource revision for the If-Match request header. When calling an SDK method, you can also pass the revision directly in options.ifMatch.

## Signature

```
ifMatchHeader(value: string | number): string
```

## Parameters

**`value`**

A nonnegative integer, a string of digits, or a double-quoted string of digits such as "3".

## Return value

A double-quoted revision string. Passing 3 returns the three characters "3".

## Errors

- Error for other input, including a weak ETag, an unquoted word or a negative number.

## TypeScript example

```
import { ifMatchHeader } from "@aeoapi/aeo-sdk";

const revision = 3;
console.log(ifMatchHeader(revision)); // '"3"'
```

See [TypeScript client setup](https://aeoapi.dev/docs/sdks/typescript) for authentication, timeouts and retry settings.
