v2

latestOpenAPI 3.1.02026-07-312303692.4 MB
Event Type

Create Event Type

Create new or unarchive existing event type.

Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.

post/api/v1/event-type

Headers

idempotency-keystring

The request's idempotency key

Request body

namestring required

The event type's name

descriptionstring required
archivedboolean
deprecatedboolean
schemasobject nullable

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

groupNamestring nullable

The event type group's name

featureFlagsstring[] nullable
featureFlagstring nullable

Deprecated, use featureFlags instead.

Example request

{
  "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"
  ]
}

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"
  ]
}