---
title: "SDK: loops"
description: "The loops 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: loops

{/* 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 `loops` area has 7 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/)).

## loopsArchive

Archive a loop so it stops firing (issue triage class)

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/loops/{loopId}/archive`

```ts
loopsArchive(args: { tenantId: string; projectId: string; loopId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<LoopDefinition>
```

## loopsCreate

Define a scheduled or event-triggered loop (issue triage class)

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/loops`
- Needs an approval for agents: class `issue_triage`

```ts
loopsCreate(args: { tenantId: string; projectId: string; body: CreateLoopRequest }, options?: CallOptions): Promise<LoopDefinition>
```

## loopsDelete

Delete a loop: it is archived and can be restored for 30 days, then removed (issue triage class)

- Request: `DELETE` on `/v1/tenants/{tenantId}/projects/{projectId}/loops/{loopId}`
- Needs an approval for agents: class `issue_triage`

```ts
loopsDelete(args: { tenantId: string; projectId: string; loopId: string }, options?: CallOptions): Promise<LoopDefinition>
```

## loopsFire

Run a loop now through a bounded kit run

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/loops/{loopId}/fire`

```ts
loopsFire(args: { tenantId: string; projectId: string; loopId: string; body: FireLoopRequest }, options?: CallOptions): Promise<LoopRun>
```

## loopsList

List loops; archived=true lists the archived ones that can still be restored

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

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

## loopsRestore

Restore an archived loop within 30 days (issue triage class)

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/loops/{loopId}/restore`

```ts
loopsRestore(args: { tenantId: string; projectId: string; loopId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<LoopDefinition>
```

## loopsUpdate

Change a loop (issue triage class)

- Request: `PATCH` on `/v1/tenants/{tenantId}/projects/{projectId}/loops/{loopId}`
- Needs an approval for agents: class `issue_triage`

```ts
loopsUpdate(args: { tenantId: string; projectId: string; loopId: string; body: UpdateLoopRequest }, options?: CallOptions): Promise<LoopDefinition>
```

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