# Apply a policy to a store's scripts

> POST /policies/{id}/apply endpoint of the Proteside API: parameters, request body, responses and code samples.

URL: https://docs.proteside.com/en/docs/api/reference/policies/applyPolicy

## Method and route

`POST /policies/{id}/apply`

Sets the script `status`, `authorization_method = policy`, `policy_id/version`, justification from the template and `expires_at`, and records a review. A store-level policy never overrides an organization-level block.

## Parameters

- `id` (path, `string`, required)
- `org_id` (query, `string`): Partners only (`orgs:manage`): act on this child organization. May also be sent as `org_id` in JSON bodies.
- `Idempotency-Key` (header, `string`): Replays the original response for 24 h

## Request body

- `store_id` (`string`)
- `script_ids` (`string[]`)

## Responses

- `200`: Result
- `404`: Not found in the acting organization

Full OpenAPI specification: https://app.proteside.com/api/v1/openapi.json
