---
title: "Get an event schema"
method: GET
path: "/event_schema/{event_schema_name}"
tags: ["Event Schemas"]
---

# Get an event schema

`GET /event_schema/{event_schema_name}`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/event_schema/{event_schema_name}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/event_schema/:event_schema_name/get.ts> (a function with typed inputs; its response is checked against the schema)

Get an event schema

## Path parameters

- `event_schema_name` string, required

## Query parameters

- `version` integer

## Response `200`

Response for Create and Get event schema requests

- EventSchema: Structure of an event schema
  - `name` string, required: Name of the event. Must be unique for an organization.
  - `description` string: Description of the event
  - `version` integer, required: Version of event schema
  - `status` 'DRAFT' | 'ACTIVE' | 'INACTIVE' | 'ARCHIVED': Status of event schema * DRAFT - Schema is in draft state * ACTIVE - Schema is currently active * INACTIVE - Schema is currently inactive * ARCHIVED - Older version of event schema
  - `attributes` EventAttributeSchema[]
    - `name` string, required: Name of the event attribute.
    - `defaultUnit` string: Unit for the attribute
  - `dimensions` DimensionsSchema[]
    - `name` string, required: Name of the event dimension
  - `filterFields` string[]
  - `featureDetails` FeatureDetails: details of feature associated with event schema with attribute name
    - `featureId` string, required
    - `attributeName` string, required
  - `enrichments` Enrichments
    - `dependencies` Dependency[]
      - `type` 'SETTING', required
      - `key` string, required
      - `name` string, required
    - `fields` Field[], required
      - `name` string, required
      - `type` 'ATTRIBUTE' | 'DIMENSION', required
      - `enrichmentType` 'VALUE' | 'JSON_LOGIC' | 'JSON_LOGIC_FROM_DEPENDENCY', required
      - `value` string, required
      - `order` integer, required
  - `eventIdTemplate` string: Template used to generate event id based on event payload
  - `eventLevelRevenue` boolean
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response
- `default`: Error response

## Changes

- **2024-05-27** `2b8be460ec6a`: 1 info
  - added the optional property `filterFields` to the response with the `200` status
- **2024-03-01** `6fb940b0dad9`: 1 info
  - added the optional property `eventIdTemplate` to the response with the `200` status
- **2023-10-06** `4d0b22a4b65c`: 1 info
  - added the optional property `eventLevelRevenue` to the response with the `200` status
- **2023-09-02** `6b13f6f47735`: 3 warning
  - removed the optional property `eventIdTemplate` from the response with the `200` status
  - removed the optional property `eventLevelRevenue` from the response with the `200` status
  - removed the optional property `filterFields` from the response with the `200` status

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/event_schema/:event_schema_name/get.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
