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.

Responses

Response samples

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

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"
}

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.

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"
}

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"
}

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
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": [
    ]
}

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": {
    }
}