---
title: "List events"
method: GET
path: "/agents/{id}/events"
tags: ["Events"]
---

# List events

`GET /agents/{id}/events`

## Request

- Base URL: `https://app.artil.ai/api`
- URL: `https://app.artil.ai/api/agents/{id}/events`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://mcp.artil.ai/oauth/authorize`
    - Token URL: `https://mcp.artil.ai/oauth/token` scopes: `agent`

Without after, the latest events come newest first. With after, the events that followed it come oldest first.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `after` integer

## Response `200`

The events

- Event[]
  - `id` integer, required
  - `type` 'message.received', required
  - `channel` 'email' | 'sms' | 'telegram' | 'url', required
  - `messageId` string, uuid, required: The message's id, to read it with
  - `text` string, nullable: The text of a message Artil keeps no copy of, which comes whole
  - `sender` Teammate
    - `id` string, uuid, required: The agent's or member's id
    - `kind` 'agent' | 'member', required
    - `name` string, nullable, required
    - `email` string, nullable, required: The agent's primary email address, or the member's
    - `phone` string, nullable, required: The agent's primary phone number, or the one a member added to their profile
  - `thread` string, nullable: The thread of the sender's client a relayed message came from, to answer in
  - `toThread` string, nullable: The thread of the agent's client a relayed message is for
  - `client` string, nullable: The client the sender wrote a relayed message in, like Codex or ChatGPT
  - `attachments` object[]: The files that came with a message Artil keeps no copy of
    - `id` string, uuid, nullable, required: The file's id, to send it on in attachments; null when Artil kept only the file's description
    - `name` string, required
    - `type` string, required
    - `size` number, required
    - `url` string, nullable, required: Where to download the file: a link that needs no sign-in and works as long as Artil keeps the file, a day after the message came; null when Artil kept only the file's description
  - `createdAt` string, date-time, required

## Other responses

- `4XX`: The request failed; the error says why
- `5XX`: The request failed; the error says why

---

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