> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# SiteService

**Published**: 2026-11-30
**Category**: Services

Reads the public site configuration (name, domain, locales, branding, analytics consent mode),
available as `lynkow.site`. The client does not cache it: use `fetchOptions` for your framework's cache.

Access via: `lynkow.site`

## Methods

**2** methods

### `clearCache`

```typescript
clearCache(): void
```

Clears the cache entries of this service. `getConfig()` writes none, so this does nothing
for a client that never cached a site configuration.

Returns: `void`

```typescript
lynkow.site.clearCache()
```

---

### `getConfig`

```typescript
getConfig(options?: BaseRequestOptions): Promise<SiteConfig>
```

Fetches the site's identity, locale settings, branding options and analytics consent mode.
Not cached by the client, so a plan or branding change shows on the next call.
Throws `LynkowError` `NOT_FOUND` for an unknown site, `FORBIDDEN` for an inactive site
or a request origin that does not match the site's domain, and `PAYMENT_REQUIRED` when the
subscription no longer covers public delivery.

| Parameter | Type | Description |
| --- | --- | --- |
| `options` | `BaseRequestOptions` | Request options. `fetchOptions` carries framework cache directives, such as `{ next: { revalidate: 3600 } }`. |


Returns: `Promise<SiteConfig>`

```typescript
const config = await lynkow.site.getConfig()
console.log(config.enabledLocales)        // ['en', 'fr', 'de']
console.log(config.i18n.detection.enabled) // true
console.log(config.analytics.consentMode)  // 'opt-in'
```