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

archivedboolean
deprecatedboolean
descriptionstring required
featureFlagsstring[] nullable
groupNamestring nullable

The event type group's name

namestring required

The event type's name

schemasobject nullable

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

Example request

{
  "description": "A user has signed up",
  "featureFlags": [
    "cool-new-feature"
  ],
  "groupName": "user",
  "name": "user.signup",
  "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"
      ]
    }
  }
}

Response

archivedboolean
createdAtstring date-time required
deprecatedboolean required
descriptionstring required
featureFlagstring nullable
featureFlagsstring[] nullable
groupNamestring nullable

The event type group's name

namestring required

The event type's name

schemasobject nullable

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

updatedAtstring date-time required

Example response

{
  "description": "A user has signed up",
  "featureFlags": [
    "cool-new-feature"
  ],
  "groupName": "user",
  "name": "user.signup",
  "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"
      ]
    }
  }
}

Changes

Changed in 1 of the 5 revisions of this API.1