# List function triggers

> GET /v1/functions/{functionId}/triggers

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

## Parameters

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

## Responses

### 200

Triggers for the function.

- `triggers` (object[], required)
  - `id` (string, required)
  - `functionId` (string, required)
  - `eventType` (string, required): Event type that fires the function. See GET /v1/functions/event-types for the supported list. The special type `cron` fires on a schedule instead of a messaging event and carries a `cron` expression.
  - `senderId` (string, nullable): Restrict the trigger to a single sender. Null means all senders in the project.
  - `active` (boolean, required)
  - `createdAt` (string<date-time>, required)
  - `updatedAt` (string<date-time>, required)
  - `cron` (string, nullable): 5-field cron expression (minute hour day-of-month month day-of-week), evaluated in UTC. Present only on `cron` triggers.
  - `nextRunAt` (string<date-time>, nullable): Next scheduled fire time. Present only on `cron` triggers.
  - `lastRunAt` (string<date-time>, nullable): Last time the schedule fired. Null until the first fire.

### 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/triggers" \
  -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.triggers.list("function_abc123");

console.log(result);
```
