---
title: "List mail a function sent"
method: GET
path: "/functions/{id}/activity"
tags: ["Functions"]
---

# List mail a function sent

`GET /functions/{id}/activity`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/functions/{id}/activity`
- Auth: HTTP bearer

The sends and replies the function made, newest first, each linked to the delivery and email that triggered it. Filter by delivery, email or type.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `cursor` string
- `limit` integer
- `delivery_id` union
  - string
  - string, uuid
- `email_id` string, uuid
- `type` 'email.sent' | 'email.replied'

## Response `200`

List mail a function sent

- object
  - `success` true, required
  - `data` ListFunctionActivityResult, required
    - `items` object[], required
      - `id` string, uuid, required
      - `function_id` string, uuid, required
      - `type` 'email.sent' | 'email.replied', required
      - `occurred_at` string, date-time, required
      - `status` string, required
      - `delivery_id` string, nullable, required
      - `email_id` string, uuid, nullable, required
      - `sent_email_id` string, uuid, nullable, required
      - `related_email_id` string, uuid, nullable, required
    - `next_cursor` string, nullable, required

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `404`: Resource not found
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

---

[API](https://skmtc.dev/primitive/apis/primitive-api.md) - [All operations](https://skmtc.dev/primitive/apis/primitive-api/llms.txt) - [OpenAPI document](https://skmtc.dev/primitive/apis/primitive-api/revisions/bce409c97acb?raw)
