Get notification icon
Section titled “Get notification icon”GET /api/v1/notifications/icons/{iconId}
Serves a notification icon image. Icon IDs are derived from notification data — specifically a combination of session, ID, timestamp, and extension — so they remain stable for the lifetime of the underlying notification record. Use this endpoint whenever a client needs to render the actual image binary associated with a notification (for example, in a notification center UI, an email preview, or a custom push payload).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
iconId | path | string | Yes | The unique identifier for the icon (e.g., 6_10_1749024932903.png) |
Response
Section titled “Response”The successful response body is a binary image. The endpoint serves three MIME types depending on the extension encoded in the iconId:
image/pngimage/jpegimage/svg+xml
The following response headers are returned with a 200 response and can be used for client-side caching:
| Header | Type | Description |
|---|---|---|
Cache-Control | string | Caching directives (example: public, max-age=86400) |
Content-Type | string | MIME type of the image (example: image/png) |
ETag | string | Entity tag for cache validation |
Last-Modified | string | Last modification date |
Send the ETag value back in an If-None-Match request header (or the Last-Modified value in If-Modified-Since) to receive a 304 Not Modified response when the client cache is still valid.
The response body is a binary image. The exact bytes are not JSON-serializable; the example below shows the headers returned alongside the binary payload.
HTTP/1.1 200 OKCache-Control: public, max-age=86400Content-Type: image/pngETag: "6_10_1749024932903"Last-Modified: Tue, 03 Jun 2025 12:35:32 GMTContent-Length: 4096
<binary image data>The client cache is still valid. No response body is returned. Reuse the previously cached bytes.
{ "success": false, "error": "Not Found", "details": "The requested icon does not exist"}{ "success": false, "error": "Rate Limit Exceeded", "details": "Too many requests, please try again later"}Example request
Section titled “Example request”curl -i "https://abc123-def456-n-1.eu-west-1.containers.hoody.icu/api/v1/notifications/icons/6_10_1749024932903.png" \ -o icon.pngTo leverage client-side caching, send the previously returned ETag (or Last-Modified value) back to the server:
curl -i "https://abc123-def456-n-1.eu-west-1.containers.hoody.icu/api/v1/notifications/icons/6_10_1749024932903.png" \ -H "If-None-Match: \"6_10_1749024932903\"" \ -o icon.pngconst blob = await client.notifications.icons.get("6_10_1749024932903.png");The get method takes the iconId string as a positional argument and returns the raw image bytes.