Credential Type Policy
Operations about credential type availability policies
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.
Operation successful.
Unauthorized
Forbidden
The requested service is temporarily unavailable.
GET /api/v1/credential-type-policies/instance HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"scopeId": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"defaultAction": "allow",
"version": 1
}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.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Conflict
Unsupported media type.
The requested service is temporarily unavailable.
PUT /api/v1/credential-type-policies/instance HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"defaultAction": "allow",
"version": 1
}{
"scopeId": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"defaultAction": "allow",
"version": 1,
"warnings": [
{
"ruleId": "text",
"shadowedByRuleId": "text"
}
]
}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.
The ID of the project.
Operation successful.
Unauthorized
Forbidden
The requested service is temporarily unavailable.
GET /api/v1/credential-type-policies/projects/{projectId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"scopeId": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"defaultAction": "allow",
"version": 1
}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.
The ID of the project.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Conflict
Unsupported media type.
The requested service is temporarily unavailable.
PUT /api/v1/credential-type-policies/projects/{projectId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"defaultAction": "allow",
"version": 1
}{
"scopeId": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"defaultAction": "allow",
"version": 1,
"warnings": [
{
"ruleId": "text",
"shadowedByRuleId": "text"
}
]
}Returns a cursor-paginated list of reusable policy documents.
The maximum number of items to return.
100Example: 100Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The requested service is temporarily unavailable.
GET /api/v1/credential-type-policies/policies HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "text",
"kind": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"version": 1,
"updatedBy": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"nextCursor": "text"
}Creates a reusable policy document that is not yet attached to any scope. Rule ids must be unique within the list. warnings lists rules that an earlier rule already shadows.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Unsupported media type.
The requested service is temporarily unavailable.
POST /api/v1/credential-type-policies/policies HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 84
{
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
]
}{
"policy": {
"id": "text",
"kind": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"version": 1,
"updatedBy": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"warnings": [
{
"ruleId": "text",
"shadowedByRuleId": "text"
}
]
}The ID of the credential type policy document.
Operation successful.
Unauthorized
Forbidden
The specified resource was not found.
The requested service is temporarily unavailable.
GET /api/v1/credential-type-policies/policies/{policyId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "text",
"kind": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"version": 1,
"updatedBy": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Replace the rules of a credential type policy document
Replaces the document's whole rule list. version must equal the version last read; a stale value is rejected with 409. Every scope the document is attached to has its version bumped. A delegate rule is rejected when the document is attached to a project scope.
The ID of the credential type policy document.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Conflict
Unsupported media type.
The requested service is temporarily unavailable.
PUT /api/v1/credential-type-policies/policies/{policyId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 96
{
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"version": 1
}{
"policy": {
"id": "text",
"kind": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"version": 1,
"updatedBy": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"warnings": [
{
"ruleId": "text",
"shadowedByRuleId": "text"
}
]
}Deletes a policy document. A document that is still attached to a scope is rejected with 409; detach it first.
The ID of the credential type policy document.
Operation successful.
No content
Unauthorized
Forbidden
The specified resource was not found.
Conflict
The requested service is temporarily unavailable.
DELETE /api/v1/credential-type-policies/policies/{policyId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
No content
Replace a scope's attached policy documents
Replaces every attachment on a scope. scopeId comes from the scope's GET response once it has been written. Each policyId and each (isFloor, priority) pair must be unique within the list. Last write wins; the scope's version is bumped.
The ID of the credential type policy scope.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
The requested service is temporarily unavailable.
PUT /api/v1/credential-type-policies/scopes/{scopeId}/attachments HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"attachments": [
{
"policyId": "text",
"priority": 1,
"isFloor": true
}
]
}{
"attachments": [
{
"policyId": "text",
"rules": [
{
"id": "text",
"action": "allow",
"selector": {
"kind": "name",
"value": "text"
}
}
],
"priority": 1,
"isFloor": true
}
],
"version": 1
}Last updated
Was this helpful?