# Authorize a script (PCI 6.4.3 justification required)

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

URL: https://docs.proteside.com/en/docs/api/reference/scripts/authorizeScript

## Method and route

`POST /scripts/{id}/authorize`

Sets `status = authorized`, `authorization_method = api`, `authorized_by = api:<prefix>`, records a review and deactivates any block rule matching the script. `expires_days` sets `expires_at` / `review_due_at`.

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

- `justification` (`string`), required
- `expires_days` (`integer`)

## Responses

- `200`: Authorized script
- `400`: Validation error
- `404`: Not found in the acting organization

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