Bulk upsert rules

PUT/policies/{policyID}/rules/bulk

Create or update multiple rules at once for a policy. Each rule in the array must include category, enabled, and config.

Auth:Bearer

Path parameters

policyID

uuidrequired

Request body

rules

object[]required

Response

id

uuid
policy_id

uuid
category

One of the 45 supported rule categories

content_rating | content_block_title | content_allow_title | content_allowlist_mode | content_descriptor_block | time_daily_limit | time_scheduled_hours | time_per_app_limit | time_downtime | purchase_approval | purchase_spending_cap | purchase_block_iap | social_contacts | social_chat_control | social_multiplayer | web_safesearch | web_category_block | web_custom_allowlist | web_custom_blocklist | web_filter_level | privacy_location | privacy_profile_visibility | privacy_data_sharing | privacy_account_creation | monitoring_activity | monitoring_alerts | algo_feed_control | addictive_design_control | notification_curfew | usage_timer_notification | targeted_ad_block | dm_restriction | age_gate | data_deletion_request | geolocation_opt_in | csam_reporting | library_filter_compliance | ai_minor_interaction | social_media_min_age | image_rights_minor | parental_consent_gate | parental_event_notification | screen_time_report | commercial_data_ban | algorithmic_audit
enabled

boolean
config

object
created_at

datetime
Request
bash
curl -X PUT "https://api.phosra.com/api/v1/policies/{policyID}/rules/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "rules": [
    {
      "category": "content_rating",
      "enabled": true,
      "config": {}
    }
  ]
}'
Response
json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "policy_id": "550e8400-e29b-41d4-a716-446655440000",
    "category": "content_rating",
    "enabled": true,
    "config": {},
    "created_at": "2025-01-15T09:30:00Z"
  }
]