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

Git Connections

Operations about Git connections

List Git connections

get
/git-connections

Returns a cursor-paginated list of Git connections.

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/git-connections
GET /api/v1/git-connections HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "text",
      "name": "text",
      "repositoryUrl": "text",
      "branchName": "text",
      "connectionType": "ssh",
      "keyGeneratorType": "ed25519",
      "baseCommit": "text",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  ],
  "nextCursor": "text"
}

Create a Git connection

post
/git-connections

Creates a Git connection and its authentication material. Only one Git connection can exist.

Authorizations
X-N8N-API-KEYstringRequired
Body
namestring · min: 1 · max: 128Required
repositoryUrlstring · min: 1Required
branchNamestring · min: 1 · max: 255Optional
connectionTypestring · enumRequiredPossible values:
keyGeneratorTypestring · enumOptionalPossible values:
usernamestring · min: 1Optional
passwordstring · min: 1Optional
Responses
201

Operation successful.

application/json
idstringRequired
namestringRequired
repositoryUrlstringRequired
branchNamestring · nullableRequired
connectionTypestring · enumRequiredPossible values:
publicKeystring · nullableRequired
keyGeneratorTypestring · enum · nullableRequiredPossible values:
baseCommitstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
post/git-connections
POST /api/v1/git-connections HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "keyGeneratorType": "ed25519",
  "username": "text",
  "password": "text"
}
{
  "id": "text",
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "publicKey": "text",
  "keyGeneratorType": "ed25519",
  "baseCommit": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Retrieve a Git connection

get
/git-connections/{id}
Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
repositoryUrlstringRequired
branchNamestring · nullableRequired
connectionTypestring · enumRequiredPossible values:
publicKeystring · nullableRequired
keyGeneratorTypestring · enum · nullableRequiredPossible values:
baseCommitstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
get/git-connections/{id}
GET /api/v1/git-connections/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "publicKey": "text",
  "keyGeneratorType": "ed25519",
  "baseCommit": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Update a Git connection

put
/git-connections/{id}

Updates only the supplied fields. Secrets are never returned.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Body
namestring · min: 1 · max: 128Optional
repositoryUrlstring · min: 1Optional
branchNamestring · min: 1 · max: 255Optional
connectionTypestring · enumOptionalPossible values:
keyGeneratorTypestring · enumOptionalPossible values:
usernamestring · min: 1Optional
passwordstring · min: 1Optional
Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
repositoryUrlstringRequired
branchNamestring · nullableRequired
connectionTypestring · enumRequiredPossible values:
publicKeystring · nullableRequired
keyGeneratorTypestring · enum · nullableRequiredPossible values:
baseCommitstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
put/git-connections/{id}
PUT /api/v1/git-connections/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "keyGeneratorType": "ed25519",
  "username": "text",
  "password": "text"
}
{
  "id": "text",
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "publicKey": "text",
  "keyGeneratorType": "ed25519",
  "baseCommit": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Delete a Git connection

delete
/git-connections/{id}

Deletes a Git connection and its local files.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Responses
204

Operation successful.

No content

delete/git-connections/{id}
DELETE /api/v1/git-connections/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*

No content

Clone a Git connection

post
/git-connections/{id}/clone

Clones the repository into local storage. Safe to call repeatedly.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Body
branchNamestring · min: 1 · max: 255Optional
Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
repositoryUrlstringRequired
branchNamestring · nullableRequired
connectionTypestring · enumRequiredPossible values:
publicKeystring · nullableRequired
keyGeneratorTypestring · enum · nullableRequiredPossible values:
baseCommitstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
post/git-connections/{id}/clone
POST /api/v1/git-connections/{id}/clone HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "branchName": "text"
}
{
  "id": "text",
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "publicKey": "text",
  "keyGeneratorType": "ed25519",
  "baseCommit": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Disconnect a Git connection

post
/git-connections/{id}/disconnect

Removes the local clone. The connection and its authentication material are retained.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Responses
200

Operation successful.

application/json
idstringRequired
namestringRequired
repositoryUrlstringRequired
branchNamestring · nullableRequired
connectionTypestring · enumRequiredPossible values:
publicKeystring · nullableRequired
keyGeneratorTypestring · enum · nullableRequiredPossible values:
baseCommitstring · nullableRequired
createdAtstring · date-timeRequired
updatedAtstring · date-timeRequired
post/git-connections/{id}/disconnect
POST /api/v1/git-connections/{id}/disconnect HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "name": "text",
  "repositoryUrl": "text",
  "branchName": "text",
  "connectionType": "ssh",
  "publicKey": "text",
  "keyGeneratorType": "ed25519",
  "baseCommit": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Push all team projects to a Git connection

post
/git-connections/{id}/push

Exports all team projects, commits them, and pushes to the configured branch. Personal projects are ignored. Requires the repository to be cloned first.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Body
commitMessagestring · min: 1 · max: 1000Required
forcebooleanOptional
Responses
200

Operation successful.

application/json
connectionIdstringRequired
commitShastringRequired
post/git-connections/{id}/push
POST /api/v1/git-connections/{id}/push HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "commitMessage": "text",
  "force": true
}
{
  "connectionId": "text",
  "counts": {
    "workflows": 1,
    "folders": 1,
    "credentials": 1,
    "dataTables": 1,
    "variables": 1,
    "tags": 1
  },
  "commitSha": "text"
}

List projects added to a Git connection

get
/git-connections/{id}/projects
Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Responses
200

Operation successful.

application/json
projectIdsstring[]Required
get/git-connections/{id}/projects
GET /api/v1/git-connections/{id}/projects HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "projectIds": [
    "text"
  ]
}

Add a project to a Git connection

post
/git-connections/{id}/projects/{projectId}

Adds a team project to the connection. A project can be added to only one connection.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
projectIdstringRequired
Responses
200

Operation successful.

application/json
projectIdstringRequired
gitConnectionIdstringRequired
post/git-connections/{id}/projects/{projectId}
POST /api/v1/git-connections/{id}/projects/{projectId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "projectId": "text",
  "gitConnectionId": "text"
}

Remove a project from a Git connection

delete
/git-connections/{id}/projects/{projectId}
Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
projectIdstringRequired
Responses
204

Operation successful.

No content

delete/git-connections/{id}/projects/{projectId}
DELETE /api/v1/git-connections/{id}/projects/{projectId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*

No content

Pull projects from a Git connection

post
/git-connections/{id}/pull

Resets the local clone to the configured branch tip and imports projects into the instance, overwriting to match. Requires the repository to be cloned first.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired
Responses
200

Operation successful.

application/json
connectionIdstringRequired
commitShastringRequired
post/git-connections/{id}/pull
POST /api/v1/git-connections/{id}/pull HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
  "connectionId": "text",
  "counts": {
    "projects": {
      "created": 1,
      "updated": 1,
      "skipped": 1,
      "deleted": 1
    },
    "folders": {
      "created": 1,
      "skipped": 1,
      "removed": 1
    },
    "workflows": {
      "created": 1,
      "updated": 1,
      "skipped": 1,
      "archived": 1,
      "deleted": 1,
      "publishing": {
        "published": 1,
        "unpublished": 1,
        "unchanged": 1,
        "blocked": 1,
        "failed": 1
      }
    },
    "credentials": {
      "matched": 1,
      "stubbed": 1
    },
    "dataTables": {
      "matched": 1,
      "created": 1
    },
    "variables": {
      "matched": 1,
      "created": 1,
      "updated": 1,
      "stubbed": 1,
      "missing": 1
    },
    "tags": {
      "matched": 1,
      "created": 1,
      "renamed": 1,
      "reconciled": 1,
      "skipped": 1
    }
  },
  "commitSha": "text"
}

Last updated

Was this helpful?