# List functions

> The project's functions, newest first.

`GET https://api.zavu.dev/v2/functions`

The project's functions, newest first.

## Parameters

- `limit` (query, integer)
- `cursor` (query, string)

## Responses

### 200

A page of functions.

- `items` (object[], required)
  - `id` (string, required)
  - `slug` (string, required)
  - `name` (string, required)
  - `description` (string, nullable)
  - `runtime` (string, required)
  - `status` (string, required) One of: `draft`, `deploying`, `active`, `failed`, `disabled`.
  - `enabled` (boolean, required): True only while a version is live and not paused (`status: active`). A draft, a failed first deploy, a deploy in progress or a pause are all `false`.
  - `timeoutSec` (integer, required)
  - `memoryMb` (integer, required) One of: `128`, `256`, `512`, `1024`.
  - `architecture` (string, required): arm64 is the default and the cheaper one; x86_64 bills each invocation at 1.25x units. Applied on the next deploy. One of: `arm64`, `x86_64`.
  - `httpEnabled` (boolean, required)
  - `publicUrl` (string<uri>, nullable): Null while `httpEnabled` is false: the URL does not serve then.
  - `activeDeploymentId` (string, nullable)
  - `createdAt` (string<date-time>, required)
  - `updatedAt` (string<date-time>, required)
  - `paused` (boolean, required): The customer paused it. A deploy, a git push or a rollback does not resume it. Pausing stops event triggers; the HTTP endpoint has its own switch, `httpEnabled`, and the tools of the agents it declares keep answering.
- `nextCursor` (string, required, nullable)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object): Machine-readable context. Keys that mean the same thing everywhere: - `errors`: present on every `400 invalid_request` for an invalid body or query parameter, `[{path, message, ...}]`, `path` naming the field (`["to"]`, `["contacts", 2, "recipient"]`, `["limit"]`). - `recommendation`: one sentence saying what to do next. - `dashboardUrl`: the dashboard screen that fixes it. - `connect`: on `409 no_channel`, the channels this project can connect to reach the recipient, each `{type, request, note, available, dashboardUrl?}`; `request` is the exact call (`POST /v2/channels` with its body, or `POST /v2/numbers`), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). `available: false` says why in `note` (one-way SMS closed until business verification is approved). - `address` / `from`: the address the error is about, under the name the request used for it.
  - `errors` (object[])
    - `path` (object[], required)
    - `message` (string, required)
    - `code` (string)

## Example

```bash
curl -X GET "https://api.zavu.dev/v2/functions" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.v2.functions.list();

console.log(result);
```
