# Get function

> GET /v1/functions/{functionId}

`GET https://api.zavu.dev/v1/functions/{functionId}`

## Parameters

- `functionId` (path, string, required): Zavu Function ID.

## Responses

### 200

Function details.

- `function` (object, required): A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to messaging events or HTTP requests.
  - `id` (string, required)
  - `slug` (string, required): URL-safe identifier, unique per project.
  - `name` (string, required)
  - `description` (string, nullable)
  - `runtime` (string, required): Runtime the function is deployed on. One of: `nodejs24`.
  - `status` (string, required): Lifecycle status of a Zavu Function. One of: `draft`, `bundling`, `deploying`, `active`, `failed`, `disabled`.
  - `timeoutSec` (integer, required): Per-invocation timeout in seconds.
  - `memoryMb` (integer, required): Memory allocation in MB.
  - `httpEnabled` (boolean, required): Whether the function can be invoked over HTTPS via its public URL.
  - `publicUrl` (string<uri>, nullable): HTTPS endpoint, present only while httpEnabled is true. Null otherwise, including for a function that was previously exposed — the stored URL stops serving the moment HTTP is turned off, so it is never returned.
  - `dependencies` (object, required): npm dependencies installed in the function bundle. Keys are package names, values are semver ranges.
    - `{key}` (string)
  - `activeDeploymentId` (string, nullable): ID of the deployment currently serving traffic.
  - `createdAt` (string<date-time>, required)
  - `updatedAt` (string<date-time>, required)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Function not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/functions/function_abc123" \
  -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.functions.retrieve("function_abc123");

console.log(result);
```
