---
title: "Setup"
description: "Create a Holder Policy Store service inside a tenant and attach it to a wallet service in the walt.id Enterprise Stack, with example requests."
stack: "Enterprise Stack (commercial) — version 1.2.1"
stack_version: "1.2.1"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/enterprise-stack/services/holder-policy-store-service/setup
generated: 2026-11-11
---
# Setup

We will setup a holder policy store service inside of a tenant. If you don't have a tenant yet, you can learn
how to create one [here](https://docs.walt.id/enterprise-stack/administration/tenants/create.md).

**Option: CURL**

Endpoint:
`/v1/{target}/resource-api/services/create` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%2F%20Resource/post_v1__target__resource_api_services_create)

**Example Request**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/resource-api/services/create' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "policy-store"
}'
```

**Body**

```json
{
  "type": "policy-store"
}
```

**Path Parameters**

- `orgID`: - When performing operations within an organization, it is essential to use the organization's Base URL or
  another valid host alias. For example, if your organization is named `test`, your default Base URL will
  be `test.enterprise-sandbox.walt.dev` when using the sandbox environment.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant in which to create the new policy
  Store service
  and the service's
  ID (`{organizationID}.{tenantID}.[NewPolicyStoreId]`), e.g. `waltid.tenant1.policy-store1`

**Body Parameters**

- `type`: _serviceType_ - Specifies the type of service to create. In our case `policy-store`

---

**Response Codes**

- `201` - Service created successfully.

## Attach the Policy Store to a Wallet

To use the Policy Store, it must be attached to a Wallet2 (v2) or Legacy Wallet (v1) service. This is done by adding the Policy Store as a dependency.

**Option: CURL**

Endpoint:
`/{version}/{target}/wallet-service-api/dependencies/add` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Wallet2%20Service/post_v2__target__wallet_service_api_dependencies_add)
**Example Request**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/{version}/{target}/wallet-service-api/dependencies/add' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "dependency": "waltid.tenant1.policy-store1"
}'
```

**Path Parameters**

- `orgID`: - When performing operations within an organization, it is essential to use the organization's Base URL or
  another valid host alias. For example, if your organization is named `test`, your default Base URL will
  be `test.enterprise-sandbox.walt.dev` when using the sandbox environment.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + walletId in which to attach the
  policy store, e.g. `waltid.tenant1.wallet`
- `version`: _version_ - The version of the Wallet Service API to use. In our case `v1` or `v2`
- **Body Parameters**
- `policyStoreId`: _serviceIdentifier_ - The ID of the Policy Store service to attach, e.g.
  `waltid.tenant1.policy-store1`

- ---
**Response Codes**
- `201` - PolicyStoreServiceReference attached.
---
