Policies

policies

Methods

Create Policy ->
post/v1/policies

Create a new policy.

Get Policy ->
get/v1/policies/{policy_id}

Get a policy by policy ID.

Get Policy Rule -> { id, action, conditions, 2 more... }
get/v1/policies/{policy_id}/rules/{rule_id}

Get a rule by policy ID and rule ID.

Update Policy ->
patch/v1/policies/{policy_id}

Update a policy by policy ID.

Delete Policy -> { success }
delete/v1/policies/{policy_id}

Delete a policy by policy ID.

path Parameters
policy_id: string
(minLength: 24, maxLength: 24)
header Parameters
privy-authorization-signature: string
Optional

Request authorization signature. If multiple signatures are required, they should be comma separated.

Response fields
success: boolean

Whether the policy was deleted successfully.

Request example
200Example
Create Policy Rule -> { id, action, conditions, 2 more... }
post/v1/policies/{policy_id}/rules

Create a new rule for a policy.

Update Policy Rule -> { id, action, conditions, 2 more... }
patch/v1/policies/{policy_id}/rules/{rule_id}

Update a rule by policy ID and rule ID.

Delete Policy Rule -> { success }
delete/v1/policies/{policy_id}/rules/{rule_id}

Delete a rule by policy ID and rule ID.

path Parameters
policy_id: string
(minLength: 24, maxLength: 24)
rule_id: string
(minLength: 24, maxLength: 24)
header Parameters
privy-authorization-signature: string
Optional

Request authorization signature. If multiple signatures are required, they should be comma separated.

Response fields
success: boolean

Whether the rule was deleted successfully.

Request example
200Example

Domain types

Policy = { id, chain_type, created_at, 4 more... }