Event Type

Create Event Type

Changed on

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

Request

  • Base URL
    https://api.eu.svix.com
  • URL
    https://api.eu.svix.com/api/v1/event-type
  • Auth
    HTTP bearer

Headers

idempotency-keystring

The request's idempotency key

Request body

archivedboolean
deprecatedboolean
descriptionstring required
descriptionTranslationsobject nullable

Translated descriptions keyed by BCP 47 language tag.

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",
  "descriptionTranslations": {
    "en": "A user has signed up",
    "es": "Un usuario se ha registrado",
    "pt-BR": "Um usuário se cadastrou"
  },
  "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
descriptionTranslationsobject nullable

Translated descriptions keyed by BCP 47 language tag.

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",
  "descriptionTranslations": {
    "en": "A user has signed up",
    "es": "Un usuario se ha registrado",
    "pt-BR": "Um usuário se cadastrou"
  },
  "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

    • warning

      the request property's maxLength was set to 4096

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • warning

      removed the request property