v2

latestOpenAPI 3.1.02026-07-312303692.4 MB
Event Type

Upsert Event Type

Create or update an event type.

put/api/v1/event-type/{event_type_name}

Path parameters

event_type_namestring required

The event type's name

Example:user.signup

The event type's name

Request body

descriptionstring required
archivedboolean
deprecatedboolean
schemasobject nullable

The schema for the event type for a specific version as a JSON schema.

featureFlagsstring[] nullable
featureFlagstring nullable

Deprecated, use featureFlags instead.

groupNamestring nullable

The event type group's name

Example request

{
  "description": "A user has signed up",
  "schemas": {
    "1": {
      "title": "Invoice Paid Event",
      "description": "An invoice was paid by a user",
      "type": "object",
      "properties": {
        "invoiceId": {
          "description": "The invoice id",
          "type": "string"
        },
        "userId": {
          "description": "The user id",
          "type": "string"
        }
      },
      "required": [
        "invoiceId",
        "userId"
      ]
    }
  },
  "featureFlags": [
    "cool-new-feature"
  ],
  "groupName": "user"
}

Response

namestring required

The event type's name

descriptionstring required
archivedboolean
deprecatedboolean required
schemasobject nullable

The schema for the event type for a specific version as a JSON schema.

createdAtstring date-time required
updatedAtstring date-time required
groupNamestring nullable

The event type group's name

featureFlagsstring[] nullable
featureFlagstring nullable

Example response

{
  "name": "user.signup",
  "description": "A user has signed up",
  "schemas": {
    "1": {
      "title": "Invoice Paid Event",
      "description": "An invoice was paid by a user",
      "type": "object",
      "properties": {
        "invoiceId": {
          "description": "The invoice id",
          "type": "string"
        },
        "userId": {
          "description": "The user id",
          "type": "string"
        }
      },
      "required": [
        "invoiceId",
        "userId"
      ]
    }
  },
  "groupName": "user",
  "featureFlags": [
    "cool-new-feature"
  ]
}