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.
CURL
Endpoint:
/v1/{target}/resource-api/services/create | API Reference
Example Request
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
{
"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 namedtest, your default Base URL will betest.enterprise-sandbox.walt.devwhen 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 casepolicy-store
Response Codes
201- Service created successfully.
Attach the Policy Store to a Wallet Service
To use the Policy Store, it must be attached to a wallet service. This is done by adding the Policy Store as a dependency.
CURL
Endpoint:
/v1/{target}/wallet-service-api/dependencies/add | API ReferenceExample Request
curl -X 'POST' \
'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/wallet-service-api/dependencies/add' \
-H 'accept: */*' \
-H 'Authorization
: Bearer {
yourToken}' \
-H 'Content-Type: application/json' \
-d '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 namedtest, your default Base URL will betest.enterprise-sandbox.walt.devwhen 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- Body Parameters
policyStoreId: serviceIdentifier - The ID of the Policy Store service to attach, e.g.waltid.tenant1.policy-store1
Response Codes
201- PolicyStoreServiceReference attached.
Last updated on July 21, 2025
