Create a Project Security Policy

post

/ic/api/integration/v1/projects/{projectId}/mcp/policies/security

Creates a project security policy. Supply a name, a code or id, and a policyType. Supported write types are TOOLS_FILTER and PII_DETECTION; PII_DETECTION requires its feature flag. A policy can be created as a draft without scope or config. Configuration is validated when supplied.

Request

Path Parameters
Query Parameters
  • This is the name of the service instance. You can get this value from the About page where it is specified in the Service instance field.
    Example:
    example-instance
Supported Media Types
Request Body - application/json; charset=utf-8 ()
Root Schema : schema
Match All
Show Source
Nested Schema : MCPPolicyRs
Type: object
MCP policy details, including scope and type-specific configuration.
Show Source
Nested Schema : type
Type: object
Nested Schema : config
Type: object
Additional Properties Allowed: true
Policy-type-specific configuration. Its required fields depend on the policy type.
Nested Schema : scope
Resource scope to which the MCP policy applies.
Match All
Resource scope to which the MCP policy applies.
Show Source
Nested Schema : PolicyScopeRs
Type: object
Resource scope to which the MCP policy applies.
Show Source
Back to Top

Response

Supported Media Types

201 Response

Successful operation
Body ()
Root Schema : MCPPolicyRs
Type: object
MCP policy details, including scope and type-specific configuration.
Show Source
Nested Schema : config
Type: object
Additional Properties Allowed: true
Policy-type-specific configuration. Its required fields depend on the policy type.
Nested Schema : scope
Resource scope to which the MCP policy applies.
Match All
Resource scope to which the MCP policy applies.
Show Source
Nested Schema : PolicyScopeRs
Type: object
Resource scope to which the MCP policy applies.
Show Source

400 Response

Malformed parameters

401 Response

Unauthorized or insufficient design-time permissions

404 Response

Project or resource not found, or the MCP feature is not available

409 Response

Conflict

500 Response

Server error
Back to Top

Examples

The following example shows how to create a project security policy by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.

Example: Create a Project Security Policy

curl --request POST --include \
  --url "${BASE_URL}/ic/api/integration/v1/projects/${PROJECT_ID}/mcp/policies/security?integrationInstance=${INTEGRATION_INSTANCE}" \
  --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json; charset=utf-8" \
  --data-raw '{
  "code": "TOOLS_POLICY",
  "name": "Tools Policy",
  "policyType": "TOOLS_FILTER"
}'
Back to Top