Skip to content
Hoody.com

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).

NameInTypeRequiredDescription
iconIdpathstringYesThe unique identifier for the icon (e.g., 6_10_1749024932903.png)

The successful response body is a binary image. The endpoint serves three MIME types depending on the extension encoded in the iconId:

  • image/png
  • image/jpeg
  • image/svg+xml

The following response headers are returned with a 200 response and can be used for client-side caching:

HeaderTypeDescription
Cache-ControlstringCaching directives (example: public, max-age=86400)
Content-TypestringMIME type of the image (example: image/png)
ETagstringEntity tag for cache validation
Last-ModifiedstringLast 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 OK
Cache-Control: public, max-age=86400
Content-Type: image/png
ETag: "6_10_1749024932903"
Last-Modified: Tue, 03 Jun 2025 12:35:32 GMT
Content-Length: 4096
<binary image data>
Terminal window
curl -i "https://abc123-def456-n-1.eu-west-1.containers.hoody.icu/api/v1/notifications/icons/6_10_1749024932903.png" \
-o icon.png

To leverage client-side caching, send the previously returned ETag (or Last-Modified value) back to the server:

Terminal window
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.png