Skip to main content
PUT
/
organization
/
{organizationId}
/
policies
/
{policyId}
/
toggle
Enable or disable a security policy
curl --request PUT \
  --url https://api-eu.cybedefend.com/organization/{organizationId}/policies/{policyId}/toggle \
  --header 'Content-Type: application/json' \
  --data '
{
  "isEnabled": true
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "scope": "PROJECT",
  "organizationId": "550e8400-e29b-41d4-a716-446655440001",
  "name": "Production Security Policy",
  "priority": 10,
  "config": {
    "rules": [],
    "exclusions": []
  },
  "isEnabled": true,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "projectIds": [
    "550e8400-e29b-41d4-a716-446655440002"
  ],
  "teamIds": [
    "550e8400-e29b-41d4-a716-446655440003"
  ],
  "description": "Security policy for production environment",
  "createdBy": "<string>",
  "updatedBy": "<string>"
}

Path Parameters

organizationId
string<uuid>
required
policyId
string<uuid>
required

Body

application/json
isEnabled
boolean
required

New enabled state for the policy

Response

Policy state toggled

id
string
required

Policy ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

scope
enum<string>
required

Policy scope

Available options:
ORGANIZATION,
TEAM,
PROJECT
Example:

"PROJECT"

organizationId
string
required

Organization ID the policy belongs to

Example:

"550e8400-e29b-41d4-a716-446655440001"

name
string
required

Policy name

Example:

"Production Security Policy"

priority
number
required

Priority (lower = higher priority)

Example:

10

config
object
required

Policy configuration

Example:
{ "rules": [], "exclusions": [] }
isEnabled
boolean
required

Whether the policy is enabled

Example:

true

createdAt
string
required

Creation timestamp

Example:

"2024-01-15T10:30:00Z"

updatedAt
string
required

Last update timestamp

Example:

"2024-01-15T10:30:00Z"

projectIds
string[]

Project IDs targeted by this policy (for PROJECT scope)

Example:
["550e8400-e29b-41d4-a716-446655440002"]
teamIds
string[]

Team IDs targeted by this policy (for TEAM scope)

Example:
["550e8400-e29b-41d4-a716-446655440003"]
description
string

Policy description

Example:

"Security policy for production environment"

createdBy
string

User ID who created the policy

updatedBy
string

User ID who last updated the policy