> ## 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`

**entitlement** `object` *required*

Which billing backend + the identifiers it reports against.

**org\_id** `string` *required*

The NSR org/tenant to bill.

**token** `string` *required*

The marketplace subscription token, so a later lifecycle event resolves back to this org.

### 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 |

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.