# 226 IM Used

> https://http-status.org/docs/226

**Family:** 2xx Success

## Rationale

The server applied one or more instance manipulations, such as delta encoding, to produce the response.

## In Plain Terms

Instead of sending the whole thing again, the server sent the changes needed to update what you already have.

## Description

The HTTP 226 IM Used status code indicates that the server fulfilled a GET request using one or more negotiated instance manipulations on the current representation, typically delta encoding against a representation the client already has.

## Server Perspective

### Usage
- Return 226 only when the client explicitly negotiated a supported instance manipulation
- Use it for specialized caching or synchronization flows, not mainstream JSON APIs
- Delta encoding where the client already has an earlier representation
- Specialized HTTP clients that explicitly negotiate instance manipulations with A-IM
- Bandwidth-sensitive synchronization flows using standards-based delta responses

### Implementation
- Use it for GET responses where the client negotiated A-IM and the server can describe the current representation with validators
- Document the manipulation algorithm and negotiation rules clearly
- Return an ETag for the current representation, and include Delta-Base when the client might need help identifying which prior representation the delta applies to
- Make sure validators and reconstruction rules let the client rebuild the intended current representation

### Common Headers
- A-IM
- If-None-Match
- IM
- Delta-Base
- ETag

### Body
- Return the manipulated or delta-encoded payload, not the plain full representation

### Pitfalls
- Do not use 226 when the client does not understand the negotiated manipulation
- Do not confuse 226 with byte ranges or application-level patch documents
- Ordinary APIs where clients do not support delta encodings
- Simple partial delivery, which is usually a 206 Partial Content case instead
- Generic patch or diff APIs that are not using HTTP instance-manipulation semantics

## Client Perspective

### Pitfalls
- Do not treat a 226 body as if it were automatically a complete standalone representation

## Examples

### Delta-encoded document refresh

The client proves it already has an older representation, and the server returns a delta plus validators for the current one instead of resending the full document.

**Request:**
```
GET https://api.example.test/doc
A-IM: diffe
If-None-Match: "doc-v1"
```

**Response:**
```
226 IM Used
Content-Type: application/json
IM: diffe
ETag: "doc-v2"
Delta-Base: "doc-v1"

{"delta":"..."}
```

## Related Codes

- [200 OK](/docs/200.md)
- [206 Partial Content](/docs/206.md)
- [304 Not Modified](/docs/304.md)

