skopik

Projects

Projects organize related work and make it easier to filter, assign, and review groups of tasks.

Quick Links

Action Description
projects.list() List projects.
projects.create() Create a project.
projects.get() Read a project.
projects.update() Update a project.
projects.delete() Archive a project.
projects.tasks() List tasks in a project.

Reference

Pagination

List calls resolve to ListResponse<T>{ data: T[], page?: { nextCursor, hasMore } }. Use paginate() to walk every page of projects.list():

import { paginate } from '@skopiklabs/client'

for await (const project of paginate((p) => client.projects.list(p), { limit: 50 })) {
	// every project across pages
}

projects.list(params?)

List projects in the current workspace.

const { data: projects } = await client.projects.list({ status: 'active' })

Parameters

Field Type Required Notes
status string No active, archived, or all. Defaults to active.
owner string No Filter by owner.
leadAgentId string No Filter by lead agent.
createdBy string No Filter by creator.
limit number No Page size.
cursor string No Cursor from the previous page.

Returns ListResponse<Project> — see Project.

projects.create(input)

Create a project.

const { project } = await client.projects.create({
	title: 'Q3 launch',
	goal: 'Prepare and ship the Q3 customer launch.',
})

Parameters

Field Type Required Notes
title string Yes Project title.
goal string No Project goal.
description string No Longer project description.
status string No active or archived. Defaults to active.
tags string[] No Tags.
icon string No Optional icon token.
color string No Optional color token.
owner string No Owner id or external owner reference.
leadAgentId string No Lead agent id.
conversationId string No Conversation to attach project activity to.
metadata object No Customer metadata.

Returns { project: Project } — see Project.

projects.get(projectId)

Read a project.

const { project } = await client.projects.get('proj_9f2c1a')

Returns { project: Project } — see Project.

projects.update(projectId, input)

Update a project.

const { project } = await client.projects.update('proj_9f2c1a', {
	goal: 'Ship the Q3 launch by September 15.',
	tags: ['launch', 'q3'],
})

Parameters

Field Type Required Notes
title string No New title.
goal string No New goal. Send null to clear.
description string No New description. Send null to clear.
status string No active or archived.
tags string[] No Replacement tags.
icon string No New icon token. Send null to clear.
color string No New color token. Send null to clear.
owner string No New owner. Send null to clear.
leadAgentId string No New lead agent id. Send null to clear.
conversationId string No New conversation id. Send null to clear.
metadata object No Replacement metadata.

Returns { project: Project } — see Project.

projects.delete(projectId)

Archive a project.

const { project } = await client.projects.delete('proj_9f2c1a')

Returns { project: Project } — the archived project. See Project.

projects.tasks(projectId, params?)

List tasks in a project.

const { data: tasks } = await client.projects.tasks('proj_9f2c1a')

Parameters

Field Type Required Notes
status number No Task status code. See Task.

Returns ListResponse<Task> — see Task.

Types

Project

Field Type Notes
projectId string Project id.
orgId string Workspace id.
title string Project title.
goal string Project goal.
description string Longer description.
status string active or archived.
tags string[] Tags.
icon string Optional icon token.
color string Optional color token.
owner string Owner id or external owner reference.
leadAgentId string Lead agent id.
conversationId string Attached conversation id.
metadata object Customer metadata.
createdBy string Creator id.
archivedAt string | null ISO timestamp when archived.
deletedAt string | null ISO timestamp when deleted.
purgeAfter string | null ISO timestamp when eligible for purge.
ttlAt number Expiration timestamp in seconds.
createdAt string ISO timestamp.
updatedAt string ISO timestamp.