---
title: 'Upload Event Types using our new Github Action'
authors: ['lucho']
date: 2023-11-21T12:00:00
tags: ['news', 'product']
summary: 'Keep your Svix Event Types up-to-date in your CI/CD pipeline with this Github Action.'
---

![Cover image](./cover.png)

<div className="lead">
  Svix is the enterprise ready webhooks sending service. With Svix, you can build a secure,
  reliable, and scalable webhook platform in minutes. Looking to send webhooks?{' '}
  <a href="https://www.svix.com">Give it a try!</a>
</div>

The key to providing an easy webhook integration experience for your users lies in your event types. The first thing your users are interested in seeing when integrating with you is what events you send and what information those events provide.
You should consider event types (and their schemas) as part of your API. Hence, they need to be accurate and up to date.

The best way to keep your Svix event types up to date is to make the update a part of your CI/CD process. That way, their names and schemas are always in sync with the latest version of your code.
We've created a new [Github Action](https://github.com/features/actions) to let you do exactly that.

The new [Upload Event Types to Svix Action](https://github.com/marketplace/actions/upload-event-types-to-svix) lets you upload an OpenAPI spec to Svix
to automatically create or update event types based on the [`webhooks`](https://spec.openapis.org/oas/v3.1.0#openapi-object) section of your docs.

## Usage

The action is available on the [Github Marketplace](https://github.com/marketplace/actions/upload-event-types-to-svix).

![Github Action in Marketplace](./marketplace-action.png)

All you need to do is add this to your deployment Github workflow:

```yml
- name: Upload Event Types to Svix
  uses: svix/svix-event-type-import-action@v1.0.0
  with:
    openapi-file: 'path/to/your/openapi-spec.yml' # can be a .json too
    svix-api-key: ${{ secrets.SVIX_API_KEY }}
```

And that's it. Your event types will be continuously updated as you update your OpenAPI spec and run your CI/CD pipeline.

Behind the scenes, this action uses the [event type import endpoint](https://api.svix.com/docs#tag/Event-Type/operation/v1.event-type.import-openapi) provided by Svix API.

To learn more about importing event types from your OpenAPI specification, check out [our docs](https://docs.svix.com/event-types#upload-openapi-specification).

---

For more content like this, make sure to follow us on [Twitter](https://twitter.com/SvixHQ), [Mastodon](https://mastodon.social/@svixhq), [Github](https://github.com/svix) or [RSS](https://www.svix.com/blog/rss/) for the latest updates for the [Svix webhook service](https://www.svix.com), or join the discussion on [our community Slack](https://www.svix.com/slack/).
