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

# Link an org to its billing entitlement (admin). Idempotent — re-linking

> updates the mapping. **Required scope:** admin

updates the mapping.

**Required scope:** `admin`

### Request body

`LinkEntitlementRequest`

<ParamField body="entitlement" type="object" required>
  Which billing backend + the identifiers it reports against.
</ParamField>

<ParamField body="org_id" type="string" required>
  The NSR org/tenant to bill.
</ParamField>

<ParamField body="token" type="string" required>
  The marketplace subscription token, so a later lifecycle event resolves back to this org.
</ParamField>

### Response

No response body. Entitlement linked.

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Entitlement linked                                 |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/v1/metering/entitlement' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "entitlement": {},
    "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "token": "YOUR_API_KEY"
  }'
  ```
</RequestExample>
