---
title: "Deactivate an event schema"
method: POST
path: "/event_schema/{event_schema_name}/deactivate"
tags: ["Event Schemas"]
---

# Deactivate an event schema

`POST /event_schema/{event_schema_name}/deactivate`

You can deactivate an event schema using this API. In case you have an activate usage meter associated with the event schema, you will need to deactivate it first and then try deactivating the event schema.

## Path parameters

- `event_schema_name` string, required

## 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

---

[API](https://skmtc.net/togaihq/apis/togai-apis.md) · [All operations](https://skmtc.net/togaihq/apis/togai-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/togaihq/togai-apis/revisions/442f5d8f4aa0/schema)
