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

Credential

Operations about credentials

List credentials

get

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 · nullableOptional

Paginate through credentials by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.

Example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
get/credentials

Create a credential

post

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

Authorizations
X-N8N-API-KEYstringRequired
Body
idstringRead-onlyOptionalExample: R2DjclaysHbqn778
namestringRequiredExample: Joe's Github Credentials
typestringRequiredExample: githubApi
dataobjectWrite-onlyRequiredExample: {"accessToken":"ada612vad6fa5df4adf5a5dsf4389adsf76da7s"}
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
idstringRead-onlyRequiredExample: vHxaz5UaCghVYl9C
namestringRequiredExample: John's Github account
typestringRequiredExample: githubApi
isManagedbooleanRead-onlyRequired

Whether the credential is managed by n8n (managed credentials cannot be edited via the API).

Example: false
isGlobalbooleanRead-onlyRequired

Whether the credential is available for use by all users.

Example: false
isResolvablebooleanRead-onlyRequired

Whether the credential can be dynamically resolved by a resolver.

Example: false
resolvableAllowFallbackbooleanRead-onlyRequired

Whether the credential resolver may fall back to static credentials if dynamic resolution fails.

Example: false
resolverIdstring · nullableRead-onlyOptional

ID of the dynamic credential resolver associated with this credential, if any.

createdAtstring · date-timeRead-onlyRequiredExample: 2022-04-29T11:02:29.842Z
updatedAtstring · date-timeRead-onlyRequiredExample: 2022-04-29T11:02:29.842Z
post/credentials

Get credential by ID

get

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

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The credential ID

Responses
200

Operation successful.

application/json
idstringRead-onlyRequiredExample: vHxaz5UaCghVYl9C
namestringRequiredExample: John's Github account
typestringRequiredExample: githubApi
isManagedbooleanRead-onlyRequired

Whether the credential is managed by n8n (managed credentials cannot be edited via the API).

Example: false
isGlobalbooleanRead-onlyRequired

Whether the credential is available for use by all users.

Example: false
isResolvablebooleanRead-onlyRequired

Whether the credential can be dynamically resolved by a resolver.

Example: false
resolvableAllowFallbackbooleanRead-onlyRequired

Whether the credential resolver may fall back to static credentials if dynamic resolution fails.

Example: false
resolverIdstring · nullableRead-onlyOptional

ID of the dynamic credential resolver associated with this credential, if any.

createdAtstring · date-timeRead-onlyRequiredExample: 2022-04-29T11:02:29.842Z
updatedAtstring · date-timeRead-onlyRequiredExample: 2022-04-29T11:02:29.842Z
get/credentials/{id}

Delete credential by ID

delete

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

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The credential ID that needs to be deleted

Responses
200

Operation successful.

application/json
idstringRead-onlyOptionalExample: R2DjclaysHbqn778
namestringRequiredExample: Joe's Github Credentials
typestringRequiredExample: githubApi
dataobjectWrite-onlyRequiredExample: {"accessToken":"ada612vad6fa5df4adf5a5dsf4389adsf76da7s"}
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
delete/credentials/{id}

Update credential by ID

patch

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

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The credential ID that needs to be updated

Body
namestringOptional

The name of the credential

Example: Updated Credential Name
typestringOptional

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

Example: githubApi
dataobjectWrite-onlyOptional

The credential data. Required when changing credential type.

Example: {"accessToken":"new_token_value"}
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
idstringRead-onlyRequiredExample: vHxaz5UaCghVYl9C
namestringRequiredExample: John's Github account
typestringRequiredExample: githubApi
isManagedbooleanRead-onlyRequired

Whether the credential is managed by n8n (managed credentials cannot be edited via the API).

Example: false
isGlobalbooleanRead-onlyRequired

Whether the credential is available for use by all users.

Example: false
isResolvablebooleanRead-onlyRequired

Whether the credential can be dynamically resolved by a resolver.

Example: false
resolvableAllowFallbackbooleanRead-onlyRequired

Whether the credential resolver may fall back to static credentials if dynamic resolution fails.

Example: false
resolverIdstring · nullableRead-onlyOptional

ID of the dynamic credential resolver associated with this credential, if any.

createdAtstring · date-timeRead-onlyRequiredExample: 2022-04-29T11:02:29.842Z
updatedAtstring · date-timeRead-onlyRequiredExample: 2022-04-29T11:02:29.842Z
patch/credentials/{id}

Test credential by ID

post

Tests a credential by ID using the stored credential data.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The credential ID

Responses
200

Operation successful.

application/json
statusstring · enumRequiredPossible values:
messagestringRequired
post/credentials/{id}/test

Show credential data schema

get
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
objectOptional
get/credentials/schema/{credentialTypeName}

Transfer a credential to another project.

put

Transfer a credential to another project.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the credential.

Body
destinationProjectIdstringRequired

The ID of the project to transfer the credential to.

Responses
200

Operation successful.

No content

put/credentials/{id}/transfer

No content

Last updated

Was this helpful?