Retrieve storage settings
Whether coss.com keeps the content of the environment's emails (content_storage: "store", the default) or only until each email is sent, fails or is canceled ("discard"). Settings belong to the API key's own environment: a coss_test_… key only ever changes sandbox settings. Emails keep the setting that applied when they were sent.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"The environment's storage settings.
application/json- response
- response
- …
What coss.com keeps of the API key's environment's emails. Emails keep the setting that applied when they were sent.
object*"storage_settings""storage_settings"content_storage*stringstore (the default) keeps each email's content (subject, body, headers, template variables, attachment filenames) for the email retention period. discard keeps it only until the email is sent, fails or is canceled; its metadata (addresses, tags, category, status, recipients, events) is kept as usual.
"store""discard"updated_at*|When the setting last changed; null if it never did (content is stored).
date-timeimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.email.storage.get();{ "object": "storage_settings", "content_storage": "discard", "updated_at": "2026-10-16T10:00:00.000Z"}