Credentials
Operations about credentials
Retrieve all credentials from your instance. Only available for the instance owner and admin. Credential data (secrets) is not included.
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
Too many requests.
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"
}Creates a credential that can be used by nodes of the specified type.
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.
^[\x21-\x7E]+$An unused credential ID of 1–16 letters, digits, underscores, or hyphens. The supplied ID is preserved exactly. Omit to generate an ID.
R2DjclaysHbqn778Pattern: ^[a-zA-Z0-9_-]+$Joe's Github CredentialsPlain text, up to 512 characters. A blank value is saved as null. Ignored when credential descriptions are disabled.
Read-only key for the reporting databasegithubApiWhether this credential has resolvable fields
false2022-04-29T11:02:29.842Z2022-04-29T11:02:29.842ZProject to create the credential in. Defaults to the user's personal project.
VmwOO9HeTEj20kxMOperation successful.
Present only when credential descriptions are enabled.
Read-only key for the reporting databaseThe request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Conflict
Unsupported media type.
Unprocessable Entity
Too many requests.
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"
}Retrieves a credential by ID. Credential data (secrets) is not included.
The ID of the credential.
Operation successful.
Present only when credential descriptions are enabled.
Read-only key for the reporting databaseUnauthorized
Forbidden
The specified resource was not found.
Too many requests.
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"
}Deletes a credential from your instance. You must be the owner of the credential.
The ID of the credential.
Operation successful.
Present only when credential descriptions are enabled.
Read-only key for the reporting databaseUnauthorized
Forbidden
The specified resource was not found.
Too many requests.
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"
}Updates an existing credential. You must be the owner of the credential.
The ID of the credential.
The name of the credential
Updated Credential NamePlain 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.
Read-only key for the reporting databaseThe credential type. If changing type, data must also be provided.
githubApiWhether this credential is available globally
falseWhether this credential has resolvable fields
falseIf true, unredacts and merges existing credential data with the provided data. If false, replaces the entire data object.
falseExample: falseOperation successful.
Present only when credential descriptions are enabled.
Read-only key for the reporting databaseThe request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
Too many requests.
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.
The ID of the credential.
The ID of the project to transfer the credential to.
VmwOO9HeTEj20kxMOperation successful.
No content
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
Too many requests.
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
Tests a credential by ID using the stored credential data.
The ID of the credential.
Operation successful.
OKPossible values: Connection successful!Unauthorized
Forbidden
The specified resource was not found.
Too many requests.
POST /api/v1/credentials/{credentialId}/test HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"status": "OK",
"message": "Connection successful!"
}The credential type name that you want to get the schema for
Operation successful.
Names of the fields that a request must include. A field with a default value is not listed.
["apiKey","domain"]Unauthorized
The specified resource was not found.
Too many requests.
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 the workflows and agents that use the credential.
The ID of the credential.
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 number of dependencies that you do not have access to. They are not listed.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Too many requests.
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?