> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Reference map for the Encore Web SDK public API: configure(), identify()/setUserAttributes()/reset(), show()/redeem()/placement(), utility getters, and the error contract.

The Encore Web SDK (`@encorekit/web-sdk`) presents targeted offers in your web app. A
complete integration is three calls:

```javascript theme={null}
import Encore from '@encorekit/web-sdk';

// 1. Initialize (apiKey is the only required field)
Encore.configure({ apiKey: 'pk_live_yourpublishablekey' });

// 2. Attach your stable user id when you know it (optional but recommended)
Encore.identify('user-123');

// 3. Present offers at the right moment
const result = await Encore.placement('cancel_flow').show();
// { status: 'claimed' } | { status: 'dismissed', reason? } | { status: 'unavailable' }
```

In the default deferred [redemption mode](/publishers/web/concepts/redemption-modes), a fourth
call, [`redeem()`](/publishers/web/sdk-reference/redeem), fires the advertiser redirect
after your own conversion step.

<Note>
  New to the SDK? Start with the [Web Quickstart](/publishers/web/quickstart/install). This
  section is the per-method contract reference.
</Note>

## Initialization

<CardGroup cols={2}>
  <Card title="configure()" icon="gear" href="/publishers/web/sdk-reference/configure">
    Initialize with your publishable key; set redemptionMode, logLevel
  </Card>
</CardGroup>

## User identity

<CardGroup cols={2}>
  <Card title="identify()" icon="user" href="/publishers/web/sdk-reference/identify">
    Attach your stable user id (replaces the auto-generated anonymous UUID)
  </Card>

  <Card title="setUserAttributes()" icon="user-tag" href="/publishers/web/sdk-reference/set-user-attributes">
    Merge user attributes for offer targeting
  </Card>

  <Card title="reset()" icon="rotate-left" href="/publishers/web/sdk-reference/reset">
    Clear local SDK state on logout; generates a fresh anonymous id
  </Card>
</CardGroup>

## Offer presentation

<CardGroup cols={2}>
  <Card title="show()" icon="gift" href="/publishers/web/sdk-reference/show">
    Present the offer carousel (phase 1); resolves a bare ShowResult
  </Card>

  <Card title="redeem()" icon="arrow-up-right-from-square" href="/publishers/web/sdk-reference/redeem">
    Fire the advertiser redirect for a pending claim (phase 2, deferred mode)
  </Card>

  <Card title="placement()" icon="layer-group" href="/publishers/web/sdk-reference/placement">
    Named placements with per-surface UI options and scoped redeem
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/publishers/web/sdk-reference/errors">
    EncoreError, error codes, and the never-rejects contract
  </Card>
</CardGroup>

## Utility getters

| Method                | Returns                                                        |
| --------------------- | -------------------------------------------------------------- |
| `getVersion()`        | SDK version string                                             |
| `isConfigured()`      | Whether `configure()` succeeded                                |
| `getConfiguration()`  | Read-only snapshot of the live config (or `null`)              |
| `getCurrentUserId()`  | Current user id: yours or the anonymous UUID (or `null`)       |
| `getAppAccountId()`   | The account id claims and events bind to (same value as above) |
| `getUserAttributes()` | The merged attribute set                                       |
| `setLogLevel(level)`  | Switch `'none'`/`'debug'` logging at runtime                   |

## Entitlements are server-side

The SDK exposes no client-side entitlement checks; real access is server-authoritative.
Verify a user's entitlements from your backend via Encore's HMAC-authenticated
server-side entitlements API, which reflects conversions verified on Encore's side,
asynchronously.
