Skip to main content
PATCH
Update Policy

Authorizations

X-API-Key
string
header
required

PromptGuard API key for developer endpoints. Keys start with pg_live_ and are created in the dashboard.

Headers

x-api-key
string | null
PromptGuard-Approval
string | null

The approval_id of an approval_required refusal, once your user has approved it. Send the same method, path, query and body.

Maximum string length: 64

Path Parameters

project_id
string
required
policy_id
string
required

Body

application/json

A change to a policy, which stays on its project.

name
string | null
Required string length: 1 - 255
description
string | null
policy_type
string | null
status
string | null
priority
integer | null
Required range: 1 <= x <= 1000
rules
PolicyRule · object[] | null
threat_types
string[] | null
system_prompt_details
string | null

Response

Successful Response

Policy response schema

id
string
required
user_id
string
required
name
string
required
description
string | null
required
policy_type
string
required
status
string
required
priority
integer
required
rules
Rules · object[]
required
threat_types
string[]
required
is_default
boolean
required
triggered_count
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
enforced
boolean
required

False for a policy of a type the engine does not enforce: a rate_limit policy saved before such policies were refused. Rate limits are set per API key (rate_limit_per_minute) and by the Plan.

project_id
string | null
system_prompt_details
string | null
warnings
PolicyWarning · object[]