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

Credentials

Operations about credentials

List credentials

get
/credentials

Retrieve all credentials from your instance. Only available for the instance owner and admin. Credential data (secrets) is not included.

Authorizations
X-N8N-API-KEYstringRequired
Query parameters
limitnumber · max: 250Optional

The maximum number of items to return.

Default: 100Example: 100
cursorstringOptional

Paginate 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.

Responses
200

Operation successful.

application/json
nextCursorstring · nullableRequired
get/credentials
GET /api/v1/credentials HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "text",
      "name": "text",
      "type": "text",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z",
      "shared": [
        {
          "id": "text",
          "name": "text",
          "role": "text",
          "createdAt": "2026-01-01T00:00:00.000Z",
          "updatedAt": "2026-01-01T00:00:00.000Z"
        }
      ]
    }
  ],
  "nextCursor": "text"
}

Create a credential

post
/credentials

Creates a credential that can be used by nodes of the specified type.

Authorizations
X-N8N-API-KEYstringRequired
Header parameters
Idempotency-Keystring · min: 1 · max: 128Optional

Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.

Pattern: ^[\x21-\x7E]+$
Body
idstring · min: 1 · max: 16Optional

An unused credential ID of 1–16 letters, digits, underscores, or hyphens. The supplied ID is preserved exactly. Omit to generate an ID.

Example: R2DjclaysHbqn778Pattern: ^[a-zA-Z0-9_-]+$
namestringRequiredExample: Joe's Github Credentials
descriptionstring · max: 512 · nullableOptional

Plain text, up to 512 characters. A blank value is saved as null. Ignored when credential descriptions are disabled.

Example: Read-only key for the reporting database
typestringRequiredExample: githubApi
isResolvablebooleanOptional

Whether this credential has resolvable fields

Example: false
createdAtstring · date-timeRead-onlyOptionalExample: 2022-04-29T11:02:29.842Z
updatedAtstring · date-timeRead-onlyOptionalExample: 2022-04-29T11:02:29.842Z
projectIdstringOptional

Project to create the credential in. Defaults to the user's personal project.

Example: VmwOO9HeTEj20kxM
Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
typestringRequired
isManagedbooleanRequired
isGlobalbooleanRequired
isResolvablebooleanRequired
resolvableAllowFallbackbooleanRequired
resolverIdstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
descriptionstring · nullableOptional

Present only when credential descriptions are enabled.

Example: Read-only key for the reporting database
post/credentials
POST /api/v1/credentials HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 252

{
  "id": "R2DjclaysHbqn778",
  "name": "Joe's Github Credentials",
  "description": "Read-only key for the reporting database",
  "type": "githubApi",
  "data": {
    "accessToken": "ada612vad6fa5df4adf5a5dsf4389adsf76da7s"
  },
  "isResolvable": false,
  "projectId": "VmwOO9HeTEj20kxM"
}
{
  "id": "text",
  "name": "text",
  "type": "text",
  "isManaged": true,
  "isGlobal": true,
  "isResolvable": true,
  "resolvableAllowFallback": true,
  "resolverId": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "description": "Read-only key for the reporting database"
}

Get credential by ID

get
/credentials/{credentialId}

Retrieves a credential by ID. Credential data (secrets) is not included.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialIdstringRequired

The ID of the credential.

Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
typestringRequired
isManagedbooleanRequired
isGlobalbooleanRequired
isResolvablebooleanRequired
resolvableAllowFallbackbooleanRequired
resolverIdstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
descriptionstring · nullableOptional

Present only when credential descriptions are enabled.

Example: Read-only key for the reporting database
get/credentials/{credentialId}
GET /api/v1/credentials/{credentialId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "name": "text",
  "type": "text",
  "isManaged": true,
  "isGlobal": true,
  "isResolvable": true,
  "resolvableAllowFallback": true,
  "resolverId": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "description": "Read-only key for the reporting database"
}

Delete credential by ID

delete
/credentials/{credentialId}

Deletes a credential from your instance. You must be the owner of the credential.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialIdstringRequired

The ID of the credential.

Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
typestringRequired
isManagedbooleanRequired
isGlobalbooleanRequired
isResolvablebooleanRequired
resolvableAllowFallbackbooleanRequired
resolverIdstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
descriptionstring · nullableOptional

Present only when credential descriptions are enabled.

Example: Read-only key for the reporting database
usageScopestring · enumRequiredPossible values:
delete/credentials/{credentialId}
DELETE /api/v1/credentials/{credentialId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "name": "text",
  "type": "text",
  "isManaged": true,
  "isGlobal": true,
  "isResolvable": true,
  "resolvableAllowFallback": true,
  "resolverId": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "description": "Read-only key for the reporting database",
  "usageScope": "project"
}

Update credential by ID

patch
/credentials/{credentialId}

Updates an existing credential. You must be the owner of the credential.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialIdstringRequired

The ID of the credential.

Body
namestringOptional

The name of the credential

Example: Updated Credential Name
descriptionstring · max: 512 · nullableOptional

Plain text, up to 512 characters. Send null or a blank value to clear it. Omit it to keep the stored value. Ignored when credential descriptions are disabled.

Example: Read-only key for the reporting database
typestringOptional

The credential type. If changing type, data must also be provided.

Example: githubApi
isGlobalbooleanOptional

Whether this credential is available globally

Example: false
isResolvablebooleanOptional

Whether this credential has resolvable fields

Example: false
isPartialDatabooleanOptional

If true, unredacts and merges existing credential data with the provided data. If false, replaces the entire data object.

Default: falseExample: false
Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
typestringRequired
isManagedbooleanRequired
isGlobalbooleanRequired
isResolvablebooleanRequired
resolvableAllowFallbackbooleanRequired
resolverIdstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
descriptionstring · nullableOptional

Present only when credential descriptions are enabled.

Example: Read-only key for the reporting database
patch/credentials/{credentialId}
PATCH /api/v1/credentials/{credentialId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 211

{
  "name": "Updated Credential Name",
  "description": "Read-only key for the reporting database",
  "type": "githubApi",
  "data": {
    "accessToken": "new_token_value"
  },
  "isGlobal": false,
  "isResolvable": false,
  "isPartialData": false
}
{
  "id": "text",
  "name": "text",
  "type": "text",
  "isManaged": true,
  "isGlobal": true,
  "isResolvable": true,
  "resolvableAllowFallback": true,
  "resolverId": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "description": "Read-only key for the reporting database"
}

Transfer a credential to another project.

put
/credentials/{credentialId}/transfer

Transfer a credential to another project.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialIdstringRequired

The ID of the credential.

Body
destinationProjectIdstringRequired

The ID of the project to transfer the credential to.

Example: VmwOO9HeTEj20kxM
Responses
204

Operation successful.

No content

put/credentials/{credentialId}/transfer
PUT /api/v1/credentials/{credentialId}/transfer HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "destinationProjectId": "VmwOO9HeTEj20kxM"
}

No content

Test credential by ID

post
/credentials/{credentialId}/test

Tests a credential by ID using the stored credential data.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialIdstringRequired

The ID of the credential.

Responses
200

Operation successful.

application/json
statusstring · enumRequiredExample: OKPossible values:
messagestringRequiredExample: Connection successful!
post/credentials/{credentialId}/test
POST /api/v1/credentials/{credentialId}/test HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "status": "OK",
  "message": "Connection successful!"
}

Show credential data schema

get
/credentials/schema/{credentialTypeName}
Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialTypeNamestringRequired

The credential type name that you want to get the schema for

Responses
200

Operation successful.

application/json
additionalPropertiesboolean · enumRequiredPossible values:
typestring · enumRequiredPossible values:
requiredstring[]Required

Names of the fields that a request must include. A field with a default value is not listed.

Example: ["apiKey","domain"]
get/credentials/schema/{credentialTypeName}
GET /api/v1/credentials/schema/{credentialTypeName} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    }
  },
  "required": [
    "apiKey",
    "domain"
  ],
  "allOf": []
}

List credential dependencies

get
/credentials/{credentialId}/dependencies

List the workflows and agents that use the credential.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
credentialIdstringRequired

The ID of the credential.

Query parameters
limitnumber · max: 250Optional

The maximum number of items to return.

Default: 100Example: 100
cursorstringOptional

Paginate 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.

Responses
200

Operation successful.

application/json
nextCursorstring · nullableRequired
inaccessibleCountintegerRequired

The number of dependencies that you do not have access to. They are not listed.

get/credentials/{credentialId}/dependencies
GET /api/v1/credentials/{credentialId}/dependencies HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "type": "agent",
      "id": "2tUt1wbLX592XDdX",
      "name": "Sync customers",
      "projectId": "text"
    }
  ],
  "nextCursor": "text",
  "inaccessibleCount": 1
}

Last updated

Was this helpful?