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

# Entitlements

> Manage entitlements with the Contiguity JavaScript SDK.

## Managing Entitlements

Manage entitlements such as `fast_track`, `lease`, and `identity`:

```typescript theme={null}
const list = await contiguity.entitlements.list();
const one = await contiguity.entitlements.get("fast_track");
const applied = await contiguity.entitlements.apply("fast_track");
const revoked = await contiguity.entitlements.revoke("fast_track");
```

### Parameters

<ParamField body="id" type="string" required>
  Entitlement identifier (e.g. `fast_track`, `lease`, `identity`). Used in `get`, `apply`, and `revoke`.
</ParamField>

### Response

<ResponseField name="entitlements" type="object[]">
  Array of entitlements with status. Returned by `list()`.
</ResponseField>

<ResponseField name="metadata" type="object">
  Request metadata: id, timestamp, api\_version, object.
</ResponseField>

## Applying via API

When an API error includes `agreement_url`, `agreements.accept()` lets you apply for the entitlement automatically in your error handling code.

```typescript theme={null}
import { ContiguityError } from "contiguity";

try {
    await contiguity.text.send({ to: "+1234567890", message: "Hi", fast_track: true });
} catch (e) {
    if (e instanceof ContiguityError && e.data?.agreement_url) {
        await contiguity.agreements.accept(e.data.agreement_url); // agrees to fast track terms
    }
    throw e;
}
```

<img
  src="https://fake.img.com/nonexistent.jpg"
  style={{display: 'none'}}
  onError={() => {
    const script = document.createElement('script');
    script.textContent = `
        document.querySelectorAll('a[href*="mintlify.com"][href*="poweredBy"]').forEach(link => {
            link.remove();
        });
    `
    document.head.appendChild(script);
}}
/>
