---
title: "SDK: tasks"
description: "The tasks methods of the Overlane TypeScript SDK, with their signatures. Generated from the SDK types."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK: tasks

{/* Generated by apps/docs/scripts/generate.mjs (SDK pages from the TypeScript types in packages/sdk). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

The `tasks` area has 14 methods on the client. Each takes one object of path, query and body arguments and an optional `CallOptions`, and returns a promise of the response body. A refused call rejects with `OverlaneApiError` (see the [SDK index](/sdk/)).

## tasksApprovalsCreate

Ask for an approval on a task

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/approvals`

```ts
tasksApprovalsCreate(args: { tenantId: string; projectId: string; taskId: string; body: CreateApprovalRequest }, options?: CallOptions): Promise<Record<string, unknown>>
```

## tasksApprovalsList

List a task's approvals

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/approvals`

```ts
tasksApprovalsList(args: { tenantId: string; projectId: string; taskId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## tasksArchive

Archive a task

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/archive`

```ts
tasksArchive(args: { tenantId: string; projectId: string; taskId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<TaskView>
```

## tasksAssign

Assign a task to an agent, person or bot

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/assign`

```ts
tasksAssign(args: { tenantId: string; projectId: string; taskId: string; body: AssignTaskRequest }, options?: CallOptions): Promise<Record<string, unknown>>
```

## tasksCapsule

A task as an open, versioned capsule

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/capsule`

```ts
tasksCapsule(args: { tenantId: string; projectId: string; taskId: string }, options?: CallOptions): Promise<TaskCapsule>
```

## tasksCapsulePayload

The rendered payload sections of a task capsule, for the lease holder only

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/capsule/payload`

```ts
tasksCapsulePayload(args: { tenantId: string; projectId: string; taskId: string; query?: { fencingToken?: string } }, options?: CallOptions): Promise<CapsulePayload>
```

## tasksCreate

Create a task contract

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks`

```ts
tasksCreate(args: { tenantId: string; projectId: string; body: CreateTaskRequest }, options?: CallOptions): Promise<TaskView>
```

## tasksDelete

Delete a task: it is archived and can be restored for 30 days, then removed; refused while it has a lease or recorded evidence

- Request: `DELETE` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}`

```ts
tasksDelete(args: { tenantId: string; projectId: string; taskId: string }, options?: CallOptions): Promise<TaskView>
```

## tasksGet

Read a task and its ledger

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}`

```ts
tasksGet(args: { tenantId: string; projectId: string; taskId: string }, options?: CallOptions): Promise<TaskView>
```

## tasksList

List a project's tasks; archived=true lists the archived ones that can still be restored

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks`

```ts
tasksList(args: { tenantId: string; projectId: string; query?: { archived?: string } }, options?: CallOptions): Promise<TaskList>
```

## tasksMessages

A task's messages

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/messages`

```ts
tasksMessages(args: { tenantId: string; projectId: string; taskId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## tasksOperation

Run a task operation: claim, start, checkpoint, submit, evidence, handoff, cancel

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/{operation}`

```ts
tasksOperation(args: { tenantId: string; projectId: string; taskId: string; operation: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<TaskView>
```

## tasksRestore

Restore an archived task within 30 days

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}/restore`

```ts
tasksRestore(args: { tenantId: string; projectId: string; taskId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<TaskView>
```

## tasksUpdate

Change a task's title or outcome

- Request: `PATCH` on `/v1/tenants/{tenantId}/projects/{projectId}/tasks/{taskId}`

```ts
tasksUpdate(args: { tenantId: string; projectId: string; taskId: string; body: UpdateTaskRequest }, options?: CallOptions): Promise<TaskView>
```

Source: https://docs.overlane.app/sdk/tasks/index.mdx
