For the complete documentation index, see llms.txt. This page is also available as Markdown.

Security Policy

Operations about the instance security policy settings

Retrieve the security policy

get
/settings/security-policy

Retrieve the instance security policy: personal-space publishing and sharing, the execution-data redaction enforcement floor, and the read-only usage counts shown in the UI. Requires the securitySettings:manage scope and the Personal Space Policy feature to be licensed.

Authorizations
X-N8N-API-KEYstringRequired
Responses
200

Operation successful.

application/json
personalSpacePublishingbooleanRequired

Whether members may publish workflows and agents from their personal space.

Example: true
personalSpaceSharingbooleanRequired

Whether members may share workflows and credentials from their personal space.

Example: true
publishedPersonalWorkflowsCountintegerRead-onlyRequired

Number of currently published personal workflows, shown for awareness before tightening the policy.

Example: 3
sharedPersonalWorkflowsCountintegerRead-onlyRequired

Number of personal workflows currently shared with other users.

Example: 5
sharedPersonalCredentialsCountintegerRead-onlyRequired

Number of personal credentials currently shared with other users.

Example: 2
get/settings/security-policy
GET /api/v1/settings/security-policy HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "personalSpacePublishing": true,
  "personalSpaceSharing": true,
  "publishedPersonalWorkflowsCount": 3,
  "sharedPersonalWorkflowsCount": 5,
  "sharedPersonalCredentialsCount": 2,
  "redactionEnforcement": {
    "floor": "production"
  }
}

Set the security policy

put
/settings/security-policy

Replace the instance security policy with the provided full object. Every writable field must be sent. Read-only usage counts from GET are ignored if included, so a GET response can be sent back as a PUT body. The update takes effect exactly as it would from the UI, using the same validation. Requires the securitySettings:manage scope and the Personal Space Policy feature to be licensed. When the group is managed via environment variables, the write is rejected with 409 and no changes are made; a read still returns the current values.

Authorizations
X-N8N-API-KEYstringRequired
Body

Full security policy. All writable fields must be provided; partial updates are not supported.

personalSpacePublishingbooleanRequired

Whether members may publish workflows and agents from their personal space.

Example: false
personalSpaceSharingbooleanRequired

Whether members may share workflows and credentials from their personal space.

Example: false
publishedPersonalWorkflowsCountintegerOptional

Read-only usage count returned by GET. Ignored on write so a GET response can be sent back as a PUT body.

sharedPersonalWorkflowsCountintegerOptional

Read-only usage count returned by GET. Ignored on write so a GET response can be sent back as a PUT body.

sharedPersonalCredentialsCountintegerOptional

Read-only usage count returned by GET. Ignored on write so a GET response can be sent back as a PUT body.

Responses
200

Operation successful.

application/json
personalSpacePublishingbooleanRequired

Whether members may publish workflows and agents from their personal space.

Example: true
personalSpaceSharingbooleanRequired

Whether members may share workflows and credentials from their personal space.

Example: true
publishedPersonalWorkflowsCountintegerRead-onlyRequired

Number of currently published personal workflows, shown for awareness before tightening the policy.

Example: 3
sharedPersonalWorkflowsCountintegerRead-onlyRequired

Number of personal workflows currently shared with other users.

Example: 5
sharedPersonalCredentialsCountintegerRead-onlyRequired

Number of personal credentials currently shared with other users.

Example: 2
put/settings/security-policy
PUT /api/v1/settings/security-policy HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "personalSpacePublishing": false,
  "personalSpaceSharing": false,
  "redactionEnforcement": {
    "floor": "production"
  },
  "publishedPersonalWorkflowsCount": 1,
  "sharedPersonalWorkflowsCount": 1,
  "sharedPersonalCredentialsCount": 1
}
{
  "personalSpacePublishing": true,
  "personalSpaceSharing": true,
  "publishedPersonalWorkflowsCount": 3,
  "sharedPersonalWorkflowsCount": 5,
  "sharedPersonalCredentialsCount": 2,
  "redactionEnforcement": {
    "floor": "production"
  }
}

Last updated

Was this helpful?