Project API
ProjectClient manages n8n projects and their members.
This handle is the entry point for organization-level operations: project creation, renaming, deletion, and project membership changes.
Access
const project = client.projects();
Methods
Common Tasks
- create projects for teams or environments
- list and audit project membership
- grant or revoke access for specific users
- move users between viewer, editor, and admin roles
list(params?)
List all projects visible to the authenticated caller.
const { data, nextCursor } = await client.projects().list({ limit: 10 });
create(data)
Create a new project.
await client.projects().create({ name: 'Production' });
update(id, data)
Update a project.
await client.projects().update('proj-123', { name: 'Production v2' });
delete(id)
Delete a project.
await client.projects().delete('proj-123');
listMembers(projectId, params?)
List members of a project.
const { data } = await client.projects().listMembers('proj-123', { limit: 50 });
addMembers(projectId, relations)
Add members to a project.
await client.projects().addMembers('proj-123', [
{ userId: 'user-1', role: 'project:admin' },
{ userId: 'user-2', role: 'project:editor' },
]);
removeMember(projectId, userId)
Remove a member from a project.
await client.projects().removeMember('proj-123', 'user-1');
changeMemberRole(projectId, userId, role)
Change a member's role in a project.
await client.projects().changeMemberRole('proj-123', 'user-1', 'project:viewer');
Important Note
The public API does not expose project().get(id). Use list() and then select the project you want, or work from IDs you already have.
ProjectResource
Use getResource() or listResources() to get a bound ProjectResource instance.
const resource = await client.projects().getResource('proj-123');
Properties
| Property | Type | Description |
|---|---|---|
id | string | Project ID |
name | string | Project name |
type | string | undefined | Project type |
Methods
| Method | Returns | Description |
|---|---|---|
update(data) | this | Update the project — merges into snapshot locally |
patch(data) | this | Convenience update — merges partial fields into the current project snapshot before updating |
delete() | void | Delete the project |
listMembers(params?) | ProjectMemberListResponse | List project members |
addMembers(relations) | void | Add members to the project |
removeMember(userId) | void | Remove a member |
changeMemberRole(userId, role) | void | Change a member's role |
Nested collections
ProjectResource exposes five nested collections. Each returns a collection object whose methods have projectId pre-filled so you never pass it manually.
workflows()
Full workflow CRUD scoped to this project. Supports list, listResources, get, getResource, create, createResource, update, patch, updateResource, patchResource. Scope is verified via paginated list for get, getResource, update, patch, updateResource, and patchResource.
const project = await client.projects().getResource('proj-1');
const workflows = await project.workflows().listResources({ active: true });
const workflow = await project.workflows().getResource('wf-1');
const created = await project.workflows().createResource({
name: 'New',
nodes: [],
connections: {},
settings: {},
});
const patched = await project.workflows().patch('wf-1', { name: 'Renamed' });
folders()
Folder CRUD scoped to this project. Supports list, listResources, get, getResource, create, createResource, update, patch, updateResource, patchResource, delete.
const folder = await project.folders().createResource({ name: 'Archive' });
const updated = await project.folders().updateResource('folder-id', { name: 'Archived' });
const moved = await project.folders().patchResource('folder-id', { parentFolderId: 'parent-id' });
variables()
Variable CRUD scoped to this project. Supports list, listResources, get, getResource, create, update, patch, updateResource, patchResource, delete.
await project.variables().create({ key: 'API_URL', value: 'https://example.com' });
await project.variables().patch('var-1', { value: 'https://api.example.com' });
dataTables()
Data table CRUD scoped to this project. Supports get, getResource, create, createResource, update, patch, updateResource, patchResource, delete. There is no list/listResources because the n8n API does not support a projectId filter on the list endpoint.
const table = await project.dataTables().createResource({
name: 'Users',
columns: [{ name: 'email', type: 'string' }],
});
await table.createColumn({ name: 'active', type: 'boolean' });
await project.dataTables().patch('table-id', { name: 'Customers' });
executions()
Execution listing scoped to this project. Supports list, listResources, get, getResource. Scope is verified via paginated list for get and getResource.
const runs = await project.executions().listResources({ status: 'success', limit: 10 });
await runs.data[0]?.getTags();
Typical Flow
const project = client.projects();
const { data } = await project.list({ limit: 10 });
await project.addMembers('proj-123', [
{ userId: 'user-1', role: 'project:editor' },
]);