---
title: "EventWolf API: Event types"
description: "List event types, get an event type, register an event type, check a schema, or deprecate an event type, with the EventWolf API."
url: "https://agentpost.tools/docs/eventwolf/reference/event-types"
kind: reference
---

# Event types

The registry of your event types: a description, a JSON Schema for `data` with its versions, the data paths that hold references, and the types EventWolf has seen that nobody registered.

[Event types](/docs/eventwolf/concepts/event-types.md) explains schemas, versions, reference paths, and observed types.

Paths are relative to `https://api.agentpost.tools/v1/events`, and every request follows the [API basics](/docs/platform/api-basics.md). [Who may call](/docs/eventwolf/reference.md#who-may-call) explains each kind of caller.

## List event types

`GET /event-types`

Registered and observed types.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](/docs/platform/api-basics.md#lists) has the rule.

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `origin` | `string` | No | One of `"registered"` or `"observed"`. |
| `status` | `"active"` or `"deprecated"` | No |  |
| `after` | `string` | No | 1–500 characters. |
| `limit` | `integer` | No | 1–200; default `50`. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `eventTypes` | [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object) array | Always |  |
| `next` | `string` | When set |  |

### Errors

-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl 'https://api.agentpost.tools/v1/events/event-types?origin=registered' \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "eventTypes": [
    {
      "type": "request.assigned",
      "origin": "registered",
      "description": "A support request was assigned to someone.",
      "refPaths": {
        "assignee.id": {
          "type": "user"
        }
      },
      "schema": {
        "version": 1,
        "jsonSchema": {
          "type": "object",
          "required": ["assignee"],
          "properties": {
            "summary": {
              "type": "string"
            },
            "assignee": {
              "type": "object",
              "required": ["id"],
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "versions": [
        {
          "version": 1,
          "jsonSchema": {
            "type": "object",
            "required": ["assignee"],
            "properties": {
              "summary": {
                "type": "string"
              },
              "assignee": {
                "type": "object",
                "required": ["id"],
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "createdAt": "2026-11-02T14:05:00.000Z"
        }
      ],
      "status": "active",
      "firstSeenAt": "2026-11-02T14:05:00.000Z",
      "lastSeenAt": "2026-11-12T09:41:07.000Z",
      "createdAt": "2026-11-02T14:05:00.000Z",
      "updatedAt": "2026-11-02T14:05:00.000Z",
      "updatedBy": "key:backend"
    }
  ]
}
```

## Get an event type

`GET /event-types/:type`

One type, with every version of its schema.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | Yes | An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `eventType` | [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object) | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/events/event-types/request.assigned \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "eventType": {
    "type": "request.assigned",
    "origin": "registered",
    "description": "A support request was assigned to someone.",
    "refPaths": {
      "assignee.id": {
        "type": "user"
      }
    },
    "schema": {
      "version": 1,
      "jsonSchema": {
        "type": "object",
        "required": ["assignee"],
        "properties": {
          "summary": {
            "type": "string"
          },
          "assignee": {
            "type": "object",
            "required": ["id"],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "versions": [
      {
        "version": 1,
        "jsonSchema": {
          "type": "object",
          "required": ["assignee"],
          "properties": {
            "summary": {
              "type": "string"
            },
            "assignee": {
              "type": "object",
              "required": ["id"],
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            }
          }
        },
        "createdAt": "2026-11-02T14:05:00.000Z"
      }
    ],
    "status": "active",
    "firstSeenAt": "2026-11-02T14:05:00.000Z",
    "lastSeenAt": "2026-11-12T09:41:07.000Z",
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-02T14:05:00.000Z",
    "updatedBy": "key:backend"
  }
}
```

## Register an event type

`PUT /event-types/:type`

Registers a type or updates it; a field you leave out keeps its value. A schema different from the current one becomes a new version, and events published after it must match it.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | Yes | An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object). |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | `string` or `null` | No |  |
| `schema` | `object` or `null` | No |  |
| `refPaths` | `object` or `null` | No |  |
| `refPaths.{key}.type` | `string` | Yes | 1–100 characters. |
| `status` | `"active"` or `"deprecated"` | No |  |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `eventType` | [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object) | Always |  |

### Errors

-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)
-   [`stale_version`](/docs/eventwolf/errors.md#stale_version) (409)
-   [`payload_too_large`](/docs/eventwolf/errors.md#payload_too_large) (413)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X PUT https://api.agentpost.tools/v1/events/event-types/request.assigned \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "A support request was assigned to someone.",
    "schema": {
      "type": "object",
      "required": [
        "assignee"
      ],
      "properties": {
        "summary": {
          "type": "string"
        },
        "assignee": {
          "type": "object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "string"
            }
          }
        }
      }
    },
    "refPaths": {
      "assignee.id": {
        "type": "user"
      }
    }
  }'
```

```json title="Response"
{
  "eventType": {
    "type": "request.assigned",
    "origin": "registered",
    "description": "A support request was assigned to someone.",
    "refPaths": {
      "assignee.id": {
        "type": "user"
      }
    },
    "schema": {
      "version": 1,
      "jsonSchema": {
        "type": "object",
        "required": ["assignee"],
        "properties": {
          "summary": {
            "type": "string"
          },
          "assignee": {
            "type": "object",
            "required": ["id"],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "versions": [
      {
        "version": 1,
        "jsonSchema": {
          "type": "object",
          "required": ["assignee"],
          "properties": {
            "summary": {
              "type": "string"
            },
            "assignee": {
              "type": "object",
              "required": ["id"],
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            }
          }
        },
        "createdAt": "2026-11-02T14:05:00.000Z"
      }
    ],
    "status": "active",
    "firstSeenAt": "2026-11-02T14:05:00.000Z",
    "lastSeenAt": "2026-11-12T09:41:07.000Z",
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-02T14:05:00.000Z",
    "updatedBy": "key:backend"
  }
}
```

## Check a schema

`POST /event-types/:type/validate`

Checks 1 to 200 items against a schema and answers with one result per item in order. The check writes nothing. To check stored events, read them with `GET /events` and send one item per event, with its `data` if it has any.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** not taken. This route writes nothing, so it takes no `Idempotency-Key`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | Yes | An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object). |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `schema` | `object` | No |  |
| `items` | `object[]` | Yes | 1–200 items. |
| `items[].data` | `any` | No |  |

### Response

`200 OK`, with [`EventTypeValidateResponse`](/docs/eventwolf/reference/event-types.md#the-eventtypevalidateresponse-object).

### Errors

-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)
-   [`payload_too_large`](/docs/eventwolf/errors.md#payload_too_large) (413)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/events/event-types/request.assigned/validate \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "schema": {
      "type": "object",
      "required": [
        "assignee"
      ],
      "properties": {
        "summary": {
          "type": "string"
        },
        "assignee": {
          "type": "object",
          "required": [
            "id",
            "team"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "team": {
              "type": "string"
            }
          }
        }
      }
    },
    "items": [
      {
        "data": {
          "assignee": {
            "id": "u_ben"
          }
        }
      }
    ]
  }'
```

```json title="Response"
{
  "schema": {
    "from": "request"
  },
  "items": [
    {
      "valid": false,
      "issues": ["data.assignee must have required property 'team'"]
    }
  ]
}
```

## Deprecate an event type

`POST /event-types/:type/deprecate`

Marks a type deprecated. Its events are still accepted; the mark tells producers to move off it.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | Yes | An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `eventType` | [`EventTypeRecord`](/docs/eventwolf/reference/event-types.md#the-eventtyperecord-object) | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/events/event-types/request.assigned/deprecate \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "eventType": {
    "type": "request.assigned",
    "origin": "registered",
    "description": "A support request was assigned to someone.",
    "refPaths": {
      "assignee.id": {
        "type": "user"
      }
    },
    "schema": {
      "version": 1,
      "jsonSchema": {
        "type": "object",
        "required": ["assignee"],
        "properties": {
          "summary": {
            "type": "string"
          },
          "assignee": {
            "type": "object",
            "required": ["id"],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "versions": [
      {
        "version": 1,
        "jsonSchema": {
          "type": "object",
          "required": ["assignee"],
          "properties": {
            "summary": {
              "type": "string"
            },
            "assignee": {
              "type": "object",
              "required": ["id"],
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            }
          }
        },
        "createdAt": "2026-11-02T14:05:00.000Z"
      }
    ],
    "status": "deprecated",
    "firstSeenAt": "2026-11-02T14:05:00.000Z",
    "lastSeenAt": "2026-11-12T09:41:07.000Z",
    "createdAt": "2026-11-02T14:05:00.000Z",
    "updatedAt": "2026-11-13T09:30:00.000Z",
    "updatedBy": "key:backend"
  }
}
```

## The EventTypeRecord object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `type` | `string` | Always |  |
| `origin` | `string` | Always | `observed`: first seen in accept mode, with nothing registered. One of `"registered"` or `"observed"`. |
| `description` | `string` | When set |  |
| `refPaths` | `object` | When set |  |
| `refPaths.{key}.type` | `string` | Always |  |
| `schema` | `object` | When set |  |
| `schema.version` | `number` | Always |  |
| `schema.jsonSchema` | `object` | Always |  |
| `versions` | `object[]` | Always |  |
| `versions[].version` | `number` | Always |  |
| `versions[].jsonSchema` | `object` | Always |  |
| `versions[].createdAt` | `string` | Always |  |
| `status` | `"active"` or `"deprecated"` | Always |  |
| `firstSeenAt` | `string` | When set |  |
| `lastSeenAt` | `string` | When set |  |
| `createdAt` | `string` | Always |  |
| `updatedAt` | `string` | Always |  |
| `updatedBy` | `string` | When set |  |

```json title="The EventTypeRecord object"
{
  "type": "request.assigned",
  "origin": "registered",
  "description": "A support request was assigned to someone.",
  "refPaths": {
    "assignee.id": {
      "type": "user"
    }
  },
  "schema": {
    "version": 1,
    "jsonSchema": {
      "type": "object",
      "required": ["assignee"],
      "properties": {
        "summary": {
          "type": "string"
        },
        "assignee": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "id": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "versions": [
    {
      "version": 1,
      "jsonSchema": {
        "type": "object",
        "required": ["assignee"],
        "properties": {
          "summary": {
            "type": "string"
          },
          "assignee": {
            "type": "object",
            "required": ["id"],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        }
      },
      "createdAt": "2026-11-02T14:05:00.000Z"
    }
  ],
  "status": "active",
  "firstSeenAt": "2026-11-02T14:05:00.000Z",
  "lastSeenAt": "2026-11-12T09:41:07.000Z",
  "createdAt": "2026-11-02T14:05:00.000Z",
  "updatedAt": "2026-11-02T14:05:00.000Z",
  "updatedBy": "key:backend"
}
```

## The EventTypeValidateResponse object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `schema` | `object` | Always | Which schema the check used. |
| `schema.from` | `string` | Always | One of `"request"` or `"registered"`. |
| `schema.version` | `number` | When set | With `from: "registered"`. |
| `items` | `object[]` | Always | One result per item, in the order given. |
| `items[].valid` | `boolean` | Always |  |
| `items[].issues` | `string[]` | Always |  |

```json title="The EventTypeValidateResponse object"
{
  "schema": {
    "from": "request"
  },
  "items": [
    {
      "valid": false,
      "issues": ["data.assignee must have required property 'team'"]
    }
  ]
}
```
