> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/connect/n8n-api/node-type-policy.md).

# Node Type Policy

Operations about node type availability policies

## Retrieve the instance node type policy

> Returns the composed instance-scope policy: its default action and the rules of every attached policy document in evaluation order. An instance that was never configured reports \`scopeId: null\`, no rules, \`defaultAction: allow\`, and \`version: 0\`.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"NodeTypePolicy","description":"Operations about node type availability policies"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"nodeTypePolicyEffectivePublicDto.generated":{"type":"object","properties":{"scopeId":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string","enum":["allow","deny","delegate"]},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["package"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]}]}},"required":["id","action","selector"]}},"defaultAction":{"type":"string","enum":["allow","deny","delegate"]},"version":{"type":"integer","minimum":0}},"required":["scopeId","rules","defaultAction","version"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/node-type-policies/instance":{"get":{"operationId":"getInstancePolicy","tags":["NodeTypePolicy"],"summary":"Retrieve the instance node type policy","description":"Returns the composed instance-scope policy: its default action and the rules of every attached policy document in evaluation order. An instance that was never configured reports `scopeId: null`, no rules, `defaultAction: allow`, and `version: 0`.","responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nodeTypePolicyEffectivePublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Replace the instance node type policy

> Sets the instance default action and replaces the rules of its single policy document, creating both on first write. \`version\` must equal the version last read; a stale value is rejected with 409. Rule ids must be unique within the list.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"NodeTypePolicy","description":"Operations about node type availability policies"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"nodeTypePolicyEffectiveWriteResultPublicDto.generated":{"type":"object","properties":{"scopeId":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string","enum":["allow","deny","delegate"]},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["package"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]}]}},"required":["id","action","selector"]}},"defaultAction":{"type":"string","enum":["allow","deny","delegate"]},"version":{"type":"integer","minimum":0},"warnings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"shadowedByRuleId":{"type":"string"}},"required":["ruleId","shadowedByRuleId"]}}},"required":["scopeId","rules","defaultAction","version","warnings"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/node-type-policies/instance":{"put":{"operationId":"putInstancePolicy","tags":["NodeTypePolicy"],"summary":"Replace the instance node type policy","description":"Sets the instance default action and replaces the rules of its single policy document, creating both on first write. `version` must equal the version last read; a stale value is rejected with 409. Rule ids must be unique within the list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string","enum":["allow","deny","delegate"]},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["package"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]}]}},"required":["id","action","selector"]}},"defaultAction":{"type":"string","enum":["allow","deny","delegate"]},"version":{"type":"integer","minimum":0}},"required":["rules","defaultAction","version"]}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nodeTypePolicyEffectiveWriteResultPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Retrieve a project's node type policy

> Returns the project's own composed policy, not the result of combining it with the instance policy. A project that was never configured reports \`scopeId: null\`, no rules, \`defaultAction: allow\`, and \`version: 0\`.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"NodeTypePolicy","description":"Operations about node type availability policies"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"nodeTypePolicyEffectivePublicDto.generated":{"type":"object","properties":{"scopeId":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string","enum":["allow","deny","delegate"]},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["package"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]}]}},"required":["id","action","selector"]}},"defaultAction":{"type":"string","enum":["allow","deny","delegate"]},"version":{"type":"integer","minimum":0}},"required":["scopeId","rules","defaultAction","version"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/node-type-policies/projects/{projectId}":{"get":{"operationId":"getProjectPolicy","tags":["NodeTypePolicy"],"summary":"Retrieve a project's node type policy","description":"Returns the project's own composed policy, not the result of combining it with the instance policy. A project that was never configured reports `scopeId: null`, no rules, `defaultAction: allow`, and `version: 0`.","parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nodeTypePolicyEffectivePublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Replace a project's node type policy

> Sets the project's default action and replaces the rules of its single policy document, creating both on first write. The \`delegate\` action is not accepted at project scope. \`version\` must equal the version last read; a stale value is rejected with 409, as is a project document that is shared with another scope.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"NodeTypePolicy","description":"Operations about node type availability policies"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"nodeTypePolicyEffectiveWriteResultPublicDto.generated":{"type":"object","properties":{"scopeId":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string","enum":["allow","deny","delegate"]},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["package"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]}]}},"required":["id","action","selector"]}},"defaultAction":{"type":"string","enum":["allow","deny","delegate"]},"version":{"type":"integer","minimum":0},"warnings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"shadowedByRuleId":{"type":"string"}},"required":["ruleId","shadowedByRuleId"]}}},"required":["scopeId","rules","defaultAction","version","warnings"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/node-type-policies/projects/{projectId}":{"put":{"operationId":"putProjectPolicy","tags":["NodeTypePolicy"],"summary":"Replace a project's node type policy","description":"Sets the project's default action and replaces the rules of its single policy document, creating both on first write. The `delegate` action is not accepted at project scope. `version` must equal the version last read; a stale value is rejected with 409, as is a project document that is shared with another scope.","parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"action":{"type":"string","enum":["allow","deny"]},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["package"]},"value":{"type":"string","minLength":1}},"required":["kind","value"]}]}},"required":["id","action","selector"]}},"defaultAction":{"type":"string","enum":["allow","deny"]},"version":{"type":"integer","minimum":0}},"required":["rules","defaultAction","version"]}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nodeTypePolicyEffectiveWriteResultPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```
