n8n Public API (1.1.1)

Download OpenAPI specification:Download

n8n Public API

User

Operations about users

Retrieve all users

Retrieve all users from your instance. Only available for the instance owner.

Authorizations:
ApiKeyAuth
query Parameters
limit
number <= 250
Default: 100
Example: limit=100

The maximum number of items to return.

cursor
string

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.

includeRole
boolean
Default: false
Example: includeRole=true

Whether to include the user's role or not.

projectId
string
Example: projectId=VmwOO9HeTEj20kxM

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}

Create multiple users

Create one or more users.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Array of users to be created.

Array
email
required
string <email>
role
string
Enum: "global:admin" "global:member"

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "user": {
    },
  • "error": "string"
}

Get user by ID/Email

Retrieve a user from your instance. Only available for the instance owner.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string <identifier>

The ID or email of the user.

query Parameters
includeRole
boolean
Default: false
Example: includeRole=true

Whether to include the user's role or not.

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000",
  • "email": "john.doe@company.com",
  • "firstName": "john",
  • "lastName": "Doe",
  • "isPending": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "role": "owner"
}

Delete a user

Delete a user from your instance.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string <identifier>

The ID or email of the user.

Responses

Change a user's global role

Change a user's global role

Authorizations:
ApiKeyAuth
path Parameters
id
required
string <identifier>

The ID or email of the user.

Request Body schema: application/json
required

New role for the user

newRoleName
required
string
Enum: "global:admin" "global:member"

Responses

Request samples

Content type
application/json
{
  • "newRoleName": "global:admin"
}

Audit

Operations about security audit

Generate an audit

Generate a security audit for your n8n instance.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{
  • "additionalOptions": {
    }
}

Response samples

Content type
application/json
{
  • "Credentials Risk Report": {
    },
  • "Database Risk Report": {
    },
  • "Filesystem Risk Report": {
    },
  • "Nodes Risk Report": {
    },
  • "Instance Risk Report": {
    }
}

Execution

Operations about executions

Retrieve all executions

Retrieve all executions from your instance.

Authorizations:
ApiKeyAuth
query Parameters
includeData
boolean

Whether or not to include the execution's detailed data.

status
string
Enum: "error" "success" "waiting"

Status to filter the executions by.

workflowId
string
Example: workflowId=1000

Workflow to filter the executions by.

projectId
string
Example: projectId=VmwOO9HeTEj20kxM
limit
number <= 250
Default: 100
Example: limit=100

The maximum number of items to return.

cursor
string

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

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}

Retrieve an execution

Retrieve an execution from your instance.

Authorizations:
ApiKeyAuth
path Parameters
id
required
number

The ID of the execution.

query Parameters
includeData
boolean

Whether or not to include the execution's detailed data.

Responses

Response samples

Content type
application/json
{
  • "id": 1000,
  • "data": { },
  • "finished": true,
  • "mode": "cli",
  • "retryOf": 0,
  • "retrySuccessId": "2",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "stoppedAt": "2019-08-24T14:15:22Z",
  • "workflowId": "1000",
  • "waitTill": "2019-08-24T14:15:22Z",
  • "customData": { }
}

Delete an execution

Deletes an execution from your instance.

Authorizations:
ApiKeyAuth
path Parameters
id
required
number

The ID of the execution.

Responses

Response samples

Content type
application/json
{
  • "id": 1000,
  • "data": { },
  • "finished": true,
  • "mode": "cli",
  • "retryOf": 0,
  • "retrySuccessId": "2",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "stoppedAt": "2019-08-24T14:15:22Z",
  • "workflowId": "1000",
  • "waitTill": "2019-08-24T14:15:22Z",
  • "customData": { }
}

Workflow

Operations about workflows

Create a workflow

Create a workflow in your instance.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Created workflow object.

name
required
string
required
Array of objects (node)
connections
required
object
required
object (workflowSettings)
(string or null) or (object or null)

Responses

Request samples

Content type
application/json
{
  • "name": "Workflow 1",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    }
}

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Workflow 1",
  • "active": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    },
  • "tags": [
    ]
}

Retrieve all workflows

Retrieve all workflows from your instance.

Authorizations:
ApiKeyAuth
query Parameters
active
boolean
Example: active=true
tags
string
Example: tags=test,production
name
string
Example: name=My Workflow
projectId
string
Example: projectId=VmwOO9HeTEj20kxM
limit
number <= 250
Default: 100
Example: limit=100

The maximum number of items to return.

cursor
string

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

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}

Retrieves a workflow

Retrieves a workflow.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Responses

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Workflow 1",
  • "active": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    },
  • "tags": [
    ]
}

Delete a workflow

Deletes a workflow.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Responses

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Workflow 1",
  • "active": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    },
  • "tags": [
    ]
}

Update a workflow

Update a workflow.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Request Body schema: application/json
required

Updated workflow object.

name
required
string
required
Array of objects (node)
connections
required
object
required
object (workflowSettings)
(string or null) or (object or null)

Responses

Request samples

Content type
application/json
{
  • "name": "Workflow 1",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    }
}

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Workflow 1",
  • "active": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    },
  • "tags": [
    ]
}

Activate a workflow

Active a workflow.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Responses

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Workflow 1",
  • "active": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    },
  • "tags": [
    ]
}

Deactivate a workflow

Deactivate a workflow.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Responses

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Workflow 1",
  • "active": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "nodes": [
    ],
  • "connections": {
    },
  • "settings": {
    },
  • "staticData": {
    },
  • "tags": [
    ]
}

Transfer a workflow to another project.

Transfer a workflow to another project.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Request Body schema: application/json
required

Destination project information for the workflow transfer.

destinationProjectId
required
string

The ID of the project to transfer the workflow to.

Responses

Request samples

Content type
application/json
{
  • "destinationProjectId": "string"
}

Transfer a credential to another project.

Transfer a credential to another project.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the credential.

Request Body schema: application/json
required

Destination project for the credential transfer.

destinationProjectId
required
string

The ID of the project to transfer the credential to.

Responses

Request samples

Content type
application/json
{
  • "destinationProjectId": "string"
}

Get workflow tags

Get workflow tags.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update tags of a workflow

Update tags of a workflow.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the workflow.

Request Body schema: application/json
required

List of tags

Array
id
required
string

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Credential

Operations about credentials

Create a credential

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

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Credential to be created.

name
required
string
type
required
string
data
required
object

Responses

Request samples

Content type
application/json
{
  • "name": "Joe's Github Credentials",
  • "type": "github",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": "R2DjclaysHbqn778",
  • "name": "Joe's Github Credentials",
  • "type": "github",
  • "createdAt": "2022-04-29T11:02:29.842Z",
  • "updatedAt": "2022-04-29T11:02:29.842Z"
}

Delete credential by ID

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

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The credential ID that needs to be deleted

Responses

Response samples

Content type
application/json
{
  • "id": "R2DjclaysHbqn778",
  • "name": "Joe's Github Credentials",
  • "type": "github",
  • "createdAt": "2022-04-29T11:02:29.842Z",
  • "updatedAt": "2022-04-29T11:02:29.842Z"
}

Show credential data schema

Authorizations:
ApiKeyAuth
path Parameters
credentialTypeName
required
string

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

Responses

Response samples

Content type
application/json
Example
{
  • "additionalProperties": false,
  • "type": "object",
  • "properties": {
    },
  • "required": [
    ]
}

Tags

Operations about tags

Create a tag

Create a tag in your instance.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Created tag object.

name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "Production"
}

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Production",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Retrieve all tags

Retrieve all tags from your instance.

Authorizations:
ApiKeyAuth
query Parameters
limit
number <= 250
Default: 100
Example: limit=100

The maximum number of items to return.

cursor
string

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

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}

Retrieves a tag

Retrieves a tag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the tag.

Responses

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Production",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a tag

Deletes a tag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the tag.

Responses

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Production",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a tag

Update a tag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the tag.

Request Body schema: application/json
required

Updated tag object.

name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "Production"
}

Response samples

Content type
application/json
{
  • "id": "2tUt1wbLX592XDdX",
  • "name": "Production",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

SourceControl

Operations about source control

Pull changes from the remote repository

Requires the Source Control feature to be licensed and connected to a repository.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Pull options

force
boolean
variables
object

Responses

Request samples

Content type
application/json
{
  • "force": true,
  • "variables": {
    }
}

Response samples

Content type
application/json
{
  • "variables": {
    },
  • "credentials": [
    ],
  • "workflows": [
    ],
  • "tags": {
    }
}

Variables

Operations about variables

Create a variable

Create a variable in your instance.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Payload for variable to create.

key
required
string
value
required
string

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "value": "test"
}

Retrieve variables

Retrieve variables from your instance.

Authorizations:
ApiKeyAuth
query Parameters
limit
number <= 250
Default: 100
Example: limit=100

The maximum number of items to return.

cursor
string

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

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}

Delete a variable

Delete a variable from your instance.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The ID of the variable.

Responses

Projects

Operations about projects

Create a project

Create a project in your instance.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Payload for project to create.

name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Retrieve projects

Retrieve projects from your instance.

Authorizations:
ApiKeyAuth
query Parameters
limit
number <= 250
Default: 100
Example: limit=100

The maximum number of items to return.

cursor
string

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

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA"
}

Delete a project

Delete a project from your instance.

Authorizations:
ApiKeyAuth
path Parameters
projectId
required
string

The ID of the project.

Responses

Project

Update a project

Update a project.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Updated project object.

name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}