# Icons

**Page:** api/kit/notification-server/icons

[Download Raw Markdown](./api/kit/notification-server/icons.md)

---

{/* AUTO-GENERATED — Do not edit manually. Regenerate with: npm run docs:api:generate */}



## Get notification icon

The notification icon endpoint serves icon image assets used by client applications to render visual indicators for Hoody notifications. Icon identifiers are deterministically derived from the underlying notification payload — combining the extension, notification ID, session identifier, and timestamp — so a given notification always maps to the same icon. Use this endpoint when you need to display or cache the raw icon binary for a notification record.

### `GET /api/v1/notifications/icons/{iconId}`

Returns the binary contents of a notification icon. The response is served with caching headers (`Cache-Control`, `ETag`, `Last-Modified`) so clients can revalidate and avoid redundant downloads. The `Content-Type` header indicates the actual image format (`image/png`, `image/jpeg`, or `image/svg+xml`).

#### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `iconId` | path | string | Yes | The unique identifier for the icon (e.g., `6_10_1749024932903.png`) |

This endpoint takes no request body.

#### Response



The icon image was found and is returned as binary data in the negotiated content type.

```json
HTTP/1.1 200 OK
Content-Type: image/png
Cache-Control: public, max-age=86400
ETag: "6_10_1749024932903"
Last-Modified: Tue, 03 Jun 2025 12:35:32 GMT

(binary image data)
```


Returned when the client supplies a valid `If-None-Match` (ETag) or `If-Modified-Since` header and the cached copy is still current. No body is returned.

```json
HTTP/1.1 304 Not Modified
ETag: "6_10_1749024932903"
Cache-Control: public, max-age=86400
```


Returned when no icon matches the supplied `iconId`. The icon identifier is typically derived from extension, session, notification ID, and timestamp — confirm those values are correct.

```json
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Icon not found"
}
```


Returned when the client has exceeded the allowed request rate for icon downloads. Honor the `Retry-After` response header before retrying.

```json
{
  "statusCode": 429,
  "error": "Too Many Requests",
  "message": "Rate limit exceeded"
}
```



#### SDK usage

```ts
// Fetch a notification icon binary
const iconStream = await client.notifications.icons.get({
  iconId: "6_10_1749024932903.png",
});
```

```ts
// Using cURL with cache revalidation
curl -i https://api.hoody.com/api/v1/notifications/icons/6_10_1749024932903.png \
  -H "Authorization: Bearer <token>" \
  -H "If-None-Match: \"6_10_1749024932903\""
```


Always reuse the `ETag` and `Last-Modified` values from the first response to issue conditional requests (`If-None-Match` / `If-Modified-Since`). A `304 Not Modified` response avoids transferring the image body, reducing bandwidth and latency.