Projects
A Project is a namespace inside an organization that scopes workflow templates, instances, resources, and tasks. Most SDK resources accept an optional projectId — if omitted, they default to your personal project.
Methods
| Method | Description |
|---|---|
projects.list() | List all projects you have access to |
projects.get(projectId) | Fetch a single project |
projects.list()
typescript
const { data: projects } = await client.projects.list()
for (const project of projects) {
console.log(project.id, project.name, project.slug)
}projects.get(projectId)
typescript
const { data: project } = await client.projects.get('proj_abc123')
console.log(project.organizationId, project.name)Using projectId
Pass projectId when creating resources to scope them to a specific project:
typescript
// Template scoped to a project
await client.workflowTemplates.create({
name: 'Deal Review',
projectId: 'proj_abc123',
})
// Instance scoped to a project
await client.workflowInstances.create({
templateId: 'tmpl_xyz',
projectId: 'proj_abc123',
})Type reference
typescript
interface Project {
id: string
ownerPlatformUserId: string
organizationId: string
name: string
slug: string
metadata: Record<string, unknown> | null
createdAt: string
updatedAt: string
}Related
- Organizations — projects belong to organizations
- Me — check which projects your API key can access