Skip to main content
This page documents the legacy settings API, which is deprecated. It keeps working for existing apps, but new apps should define settings in src/app/settings/ instead; see Workspace settings. To convert an existing app, use the folder structure migration guide.
The getWorkspaceSetting() function retrieves a single workspace setting value by key. It is only available in server functions.
For React components and client code, use getWorkspaceSettings() from attio/client to read settings, or useWorkspaceSettings() for real-time updates.

Parameters

string
required
The key of the setting to retrieve. Must match a key defined in your workspace settings schema.The key is fully typed, so TypeScript will only allow valid setting keys.

Returns

A promise that resolves to the value of the requested setting. The return type is automatically inferred based on the setting type in your schema.

Example

check-sync-status.server.ts

Type Safety

The function’s parameter and return type are automatically inferred from your schema:
app.settings.ts