n8n

N8n Credential API

Operations about credentials

Operations 8

POST /credentials Create a credential #
GET /credentials List credentials #
DELETE /credentials/{id} Delete credential by ID #
GET /credentials/{id} Get credential by ID #
PATCH /credentials/{id} Update credential by ID #
POST /credentials/{id}/test Test a credential #
GET /credentials/schema/{credentialTypeName} Show credential data schema #
PUT /credentials/{id}/transfer Transfer a credential to another project #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/n8n-credential-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

n8n-credential-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: N8n Credential API
  version: 1.1.1
  license:
    name: Sustainable Use License
    url: https://github.com/n8n-io/n8n/blob/master/LICENSE.md
  termsOfService: https://n8n.io/legal/#terms
  description: 'Operations tagged Credential across 2 of this provider''s published API definitions: n8n-openapi.yml, n8n-credential-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://app.n8n.cloud/api/v1
  description: n8n Cloud
- url: '{baseUrl}/api/v1'
  description: Self-hosted n8n
  variables:
    baseUrl:
      default: http://localhost:5678
- 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
tags:
- name: Credential
  description: Operations about credentials
paths:
  /credentials:
    post:
      tags:
      - Credential
      summary: Create a credential
      operationId: createCredential
      description: Creates a credential that can be used by nodes of the specified type.
      responses:
        '200':
          description: Operation successful.
        '401':
          description: Unauthorized
        '415':
          description: Unsupported media type
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
    servers:
    - url: https://app.n8n.cloud/api/v1
      description: n8n Cloud
    - url: '{baseUrl}/api/v1'
      description: Self-hosted n8n
      variables:
        baseUrl:
          default: http://localhost:5678
    get:
      operationId: getCredentials
      x-eov-operation-id: getCredentials
      x-required-scope: credential:list
      x-eov-operation-handler: v1/handlers/credentials/credentials.handler
      tags:
      - Credential
      summary: List credentials
      description: Retrieve all credentials from your instance. Only available for the instance owner and admin. Credential data (secrets) is not included.
      parameters:
      - name: limit
        in: query
        description: The maximum number of items to return.
        required: false
        schema:
          type: number
          example: 100
          default: 100
          maximum: 250
      - name: cursor
        in: query
        description: 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.
        required: false
        style: form
        schema:
          type: string
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      allOf:
                      - required:
                        - id
                        - name
                        - type
                        - isManaged
                        - isGlobal
                        - isResolvable
                        - resolvableAllowFallback
                        - createdAt
                        - updatedAt
                        type: object
                        properties:
                          id:
                            type: string
                            readOnly: true
                            example: vHxaz5UaCghVYl9C
                          name:
                            type: string
                            example: John's Github account
                          type:
                            type: string
                            example: githubApi
                          isManaged:
                            type: boolean
                            readOnly: true
                            description: Whether the credential is managed by n8n (managed credentials cannot be edited via the API).
                            example: false
                          isGlobal:
                            type: boolean
                            readOnly: true
                            description: Whether the credential is available for use by all users.
                            example: false
                          isResolvable:
                            type: boolean
                            readOnly: true
                            description: Whether the credential can be dynamically resolved by a resolver.
                            example: false
                          resolvableAllowFallback:
                            type: boolean
                            readOnly: true
                            description: Whether the credential resolver may fall back to static credentials if dynamic resolution fails.
                            example: false
                          resolverId:
                            type:
                            - string
                            - 'null'
                            readOnly: true
                            description: ID of the dynamic credential resolver associated with this credential, if any.
                            example: null
                          createdAt:
                            type: string
                            format: date-time
                            readOnly: true
                            example: '2022-04-29T11:02:29.842Z'
                          updatedAt:
                            type: string
                            format: date-time
                            readOnly: true
                            example: '2022-04-29T11:02:29.842Z'
                      - type: object
                        required:
                        - shared
                        properties:
                          shared:
                            type: array
                            description: Shared entries (project id, name, role, createdAt, updatedAt) from the credential's shared relation
                            items:
                              type: object
                              required:
                              - id
                              - name
                              - role
                              - createdAt
                              - updatedAt
                              properties:
                                id:
                                  type: string
                                  description: Project ID
                                name:
                                  type: string
                                  description: Project name
                                role:
                                  type: string
                                  description: Role of the credential in this project (e.g. credential:owner)
                                createdAt:
                                  type: string
                                  format: date-time
                                  description: When the credential was shared with this project
                                updatedAt:
                                  type: string
                                  format: date-time
                                  description: When the sharing was last updated
                  nextCursor:
                    type:
                    - string
                    - 'null'
                    description: 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
        '401':
          description: Unauthorized
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
  /credentials/{id}:
    delete:
      tags:
      - Credential
      summary: Delete credential by ID
      operationId: deleteCredential
      parameters:
      - name: id
        in: path
        required: true
        description: The credential ID.
        schema:
          type: string
      responses:
        '200':
          description: Operation successful.
        '401':
          description: Unauthorized
        '404':
          description: Not found
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
    servers:
    - url: https://app.n8n.cloud/api/v1
      description: n8n Cloud
    - url: '{baseUrl}/api/v1'
      description: Self-hosted n8n
      variables:
        baseUrl:
          default: http://localhost:5678
    get:
      x-eov-operation-id: getCredential
      x-required-scope: credential:read
      x-eov-operation-handler: v1/handlers/credentials/credentials.handler
      tags:
      - Credential
      summary: Get credential by ID
      description: Retrieves a credential by ID. Credential data (secrets) is not included.
      operationId: getCredential
      parameters:
      - name: id
        in: path
        description: The credential ID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                required:
                - id
                - name
                - type
                - isManaged
                - isGlobal
                - isResolvable
                - resolvableAllowFallback
                - createdAt
                - updatedAt
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: vHxaz5UaCghVYl9C
                  name:
                    type: string
                    example: John's Github account
                  type:
                    type: string
                    example: githubApi
                  isManaged:
                    type: boolean
                    readOnly: true
                    description: Whether the credential is managed by n8n (managed credentials cannot be edited via the API).
                    example: false
                  isGlobal:
                    type: boolean
                    readOnly: true
                    description: Whether the credential is available for use by all users.
                    example: false
                  isResolvable:
                    type: boolean
                    readOnly: true
                    description: Whether the credential can be dynamically resolved by a resolver.
                    example: false
                  resolvableAllowFallback:
                    type: boolean
                    readOnly: true
                    description: Whether the credential resolver may fall back to static credentials if dynamic resolution fails.
                    example: false
                  resolverId:
                    type:
                    - string
                    - 'null'
                    readOnly: true
                    description: ID of the dynamic credential resolver associated with this credential, if any.
                    example: null
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                    example: '2022-04-29T11:02:29.842Z'
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                    example: '2022-04-29T11:02:29.842Z'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: The specified resource was not found.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
    patch:
      x-eov-operation-id: updateCredential
      x-required-scope: credential:update
      x-eov-operation-handler: v1/handlers/credentials/credentials.handler
      tags:
      - Credential
      summary: Update credential by ID
      description: Updates an existing credential. You must be the owner of the credential.
      operationId: updateCredential
      parameters:
      - name: id
        in: path
        description: The credential ID that needs to be updated
        required: true
        schema:
          type: string
      requestBody:
        description: Credential data to update. All fields are optional.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Updated Credential Name
                  description: The name of the credential
                type:
                  type: string
                  example: githubApi
                  description: The credential type. If changing type, data must also be provided.
                data:
                  type: object
                  writeOnly: true
                  example:
                    accessToken: new_token_value
                  description: The credential data. Required when changing credential type.
                isGlobal:
                  type: boolean
                  example: false
                  description: Whether this credential is available globally
                isResolvable:
                  type: boolean
                  example: false
                  description: Whether this credential has resolvable fields
                isPartialData:
                  type: boolean
                  example: false
                  default: false
                  description: If true, unredacts and merges existing credential data with the provided data. If false, replaces the entire data object.
      responses:
        '200':
          description: Operation successful.
          content:
            application/json:
              schema:
                required:
                - id
                - name
                - type
                - isManaged
                - isGlobal
                - isResolvable
                - resolvableAllowFallback
                - createdAt
                - updatedAt
                type: object
                properties:
                  id:
                    type: string
                    readOnly: true
                    example: vHxaz5UaCghVYl9C
                  name:
                    type: string
                    example: John's Github account
                  type:
                    type: string
                    example: githubApi
                  isManaged:
                    type: boolean
                    readOnly: true
                    description: Whether the credential is managed by n8n (managed credentials cannot be edited via the API).
                    example: false
                  isGlobal:
                    type: boolean
                    readOnly: true
                    description: Whether the credential is available for use by all users.
                    example: false
                  isResolvable:
                    type: boolean
                    readOnly: true
                    description: Whether the credential can be dynamically resolved by a resolver.
                    example: false
                  resolvableAllowFallback:
                    type: boolean
                    readOnly: true
                    description: Whether the credential resolver may fall back to static credentials if dynamic resolution fails.
                    example: false
                  resolverId:
                    type:
                    - string
                    - 'null'
                    readOnly: true
                    description: ID of the dynamic credential resolver associated with this credential, if any.
                    example: null
                  createdAt:
                    type: string
                    format: date-time
                    readOnly: true
                    example: '2022-04-29T11:02:29.842Z'
                  updatedAt:
                    type: string
                    format: date-time
                    readOnly: true
                    example: '2022-04-29T11:02:29.842Z'
        '400':
          description: Bad request - invalid credential type or data.
        '401':
          description: Unauthorized
        '404':
          description: The specified resource was not found.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
  /credentials/{id}/test:
    post:
      tags:
      - Credential
      summary: Test a credential
      operationId: testCredential
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Operation successful.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
    servers:
    - url: https://app.n8n.cloud/api/v1
      description: n8n Cloud
    - url: '{baseUrl}/api/v1'
      description: Self-hosted n8n
      variables:
        baseUrl:
          default: http://localhost:5678
  /credentials/schema/{credentialTypeName}:
    get:
      tags:
      - Credential
      summary: Show credential data schema
      operationId: getCredentialSchema
      parameters:
      - name: credentialTypeName
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Operation successful.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
    servers:
    - url: https://app.n8n.cloud/api/v1
      description: n8n Cloud
    - url: '{baseUrl}/api/v1'
      description: Self-hosted n8n
      variables:
        baseUrl:
          default: http://localhost:5678
  /credentials/{id}/transfer:
    put:
      tags:
      - Credential
      summary: Transfer a credential to another project
      operationId: transferCredential
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Operation successful.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
    servers:
    - url: https://app.n8n.cloud/api/v1
      description: n8n Cloud
    - url: '{baseUrl}/api/v1'
      description: Self-hosted n8n
      variables:
        baseUrl:
          default: http://localhost:5678
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
externalDocs:
  description: n8n API documentation
  url: https://docs.n8n.io/api/
x-refined-from:
- n8n-openapi.yml
- n8n-credential-api-openapi.yml