Privicore
  1. Policy
Privicore
  • Privicore API
  • Utility
    • Utility
    • Check server health
      GET
    • Request command id status
      GET
  • Profile
    • Profile Model and Authentication Workflow
    • Register new profile
      POST
    • Authenticate
      POST
    • Retrieve profile id
      GET
    • Change password
      POST
    • Generate qr token for authorization
      POST
    • Reauthorize authorization token
      POST
    • Revoke authorization token
      POST
    • Retrieve token expiry
      POST
  • OAuth Application
    • OAuth Application Management
    • Register OAuth Application
      POST
    • Retrieve OAuth app configuration
      POST
    • Request OAuth app authorization code
      GET
    • Retrieve OAuth app authorization code
      POST
    • Obtain OAuth app access token
      POST
    • OAuth application list
      GET
    • Retrieve OAuth application scope
      GET
    • Refresh OAuth app access token
      POST
  • Public key
    • Public and Private Key Management
    • Generate your private and public keys
    • Register public key
    • Retrieve public key
    • Retrieve CAB public key
  • Data Token
    • Data Token Management
    • Reserve token space
    • Retrieve temporary data token
    • Exchange data for token
    • Upstream file via stream auth
    • Request data via token
    • Download data
    • Configure information security risk meta
    • Configure file meta
    • List data tokens
    • Update data token
    • Delete data
  • Device
    • Device Management
    • Request unique identifier (i.e. Register new device)
    • Retrieve unique identifier
    • Retrieve profile devices
    • Configure device meta
    • Approve device
    • Reject device
    • Retrieve device configuration
    • Remove device
  • Storage
    • Storage Device Management
    • Register storage device
    • List storage devices
    • Synchronize device
    • Remove storage
  • Verified authenticator
    • Authenticator and Voting Management
    • Register authenticator
    • List verified authenticators
    • Retrieve voting strategy
    • Set quorum size
    • Set quorum strategy
    • Set voting time limit
    • Set maximum voting attempts
    • Remove authenticator
    • Register voting configuration
    • Update voting configuration
    • List voting configurations
    • Retrieve voting configuration
  • Policy
    • Policy Management
    • List policy templates
      GET
    • Register policy
      POST
    • List active policies
      GET
    • List inactive policies
      GET
    • Activate policy
      POST
    • Deactivate policy
      POST
    • Delete policy
      POST
    • List registered policies
      GET
    • Retrieve registered policy
      GET
  • Voting
    • Voting Operations
    • Create voting
    • Check pool status
  • Schemas
    • Response
      • CommandAccepted
      • Unauthorized
      • ValidationErrors
    • Schemas
    • profileId
    • deviceIdentifier
    • directoryId
    • directoryName
    • directoryShortName
    • givenName
    • familyName
    • createdAt
    • meta
  1. Policy

Register policy

POST
/policy/register

Overview#

Create a new policy from a template with custom configuration. Newly registered policies are inactive by default and must be explicitly activated.

Register Policy#

Endpoint: POST /policy/register
Authentication: Required (Authorization token obtained from the step)
Content-Type: application/json

Request Parameters#

ParameterTypeRequiredDescription
namestringNoHuman-readable name for the policy
policyTemplateIdstringYesTemplate identifier from list policy templates
applyingEventIdsarray[string]YesEvent identifiers that trigger this policy
configurationobjectNoCustom configuration parameters for the policy
configurationIdstringNoVoting configuration identifier to apply when policy triggers

Use Case#

Use this endpoint to create a new policy based on a template. The registration process:
1.
Select a template using policyTemplateId from the templates list
2.
Define which events trigger the policy using applyingEventIds
3.
Optionally customize policy behavior using configuration object
4.
Optionally specify a voting configuration using configurationId
Policy Registration Flow:
Policy is created in inactive state
Configuration is validated against template requirements
Policy can be activated when ready using the activate policy endpoint
Event IDs specify which operations the policy evaluates. For example:
Login events
Data token exchange events
Account modification events
Device registration events
The configuration object allows customization of template parameters such as:
Condition thresholds
Security classification filters
Time-based constraints
Context-specific rules
Newly registered policies are inactive by default
Use list policy templates to get valid policyTemplateId values
Event IDs determine which operations trigger the policy
Configuration parameters depend on the selected template
Specify configurationId to link a voting configuration for authorization workflows
Activate the policy after registration to begin enforcement
Use descriptive names to identify policy purpose

Request

Authorization
API Key
Add parameter in header
X-DPT-AUTHORIZATION
Example:
X-DPT-AUTHORIZATION: ********************
or
Header Params

Body Params application/json

Example
{
    "name": "testName",
    "policyTemplateId": "",
    "applyingEventIds": [
        ""
    ],
    "configuration": {
        "property1": "string",
        "property2": "string"
    },
    "configurationId": "voting_configuration_id"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sandbox.privicore.com:9009/policy/register' \
--header 'X-DPT-AUTHORIZATION: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "testName",
    "policyTemplateId": "",
    "applyingEventIds": [
        ""
    ],
    "configuration": {
        "property1": "string",
        "property2": "string"
    },
    "configurationId": "voting_configuration_id"
}'

Responses

🟢202Success
This response does not have a body.
🟠401401
🟠422422
Modified at 2025-12-31 11:29:09
Previous
List policy templates
Next
List active policies
Built with