Svix Event Type API

Event types are identifiers denoting the type of message being sent. Event types are primarily used to decide which events are sent to which endpoint.

Operations 10

GET /api/v1/event-type List Event Types #
POST /api/v1/event-type Create Event Type #
POST /api/v1/event-type/import/openapi Event Type Import From Openapi #
GET /api/v1/event-type/{event_type_name} Get Event Type #
PUT /api/v1/event-type/{event_type_name} Upsert Event Type #
DELETE /api/v1/event-type/{event_type_name} Delete Event Type #
PATCH /api/v1/event-type/{event_type_name} Patch Event Type #
GET /api/v1/event-type/{event_type_name}/retry-schedule Get Retry Schedule #
PUT /api/v1/event-type/{event_type_name}/retry-schedule Set Retry Schedule #
POST /api/v1/event-type/export/openapi Event Type Export From Openapi #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/svix-event-type-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

svix-event-type-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Svix Event Type API
  description: 'Welcome to the Svix API documentation!


    Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/)


    # Introduction


    This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com).


    ## Main concepts


    In Svix you have four important entities you will be interacting with:


    - `messages`: these are the webhooks being sent. They can have contents and a few other properties.

    - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform.

    - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type).

    - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint.



    ## Authentication


    Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys).


    <SecurityDefinitions />



    ## Code samples


    The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/).



    ## Idempotency


    Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.


    To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Your idempotency key should not begin with the string `auto_`, which is reserved for internal use by the client libraries.


    Svix''s idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result for a period of up to 12 hours.


    Please note that idempotency is only supported for `POST` requests.



    ## Cross-Origin Resource Sharing


    This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.

    '
  version: 1.922.0
  x-logo:
    url: https://www.svix.com/static/img/brand-padded.svg
    altText: Svix Logo
servers:
- url: https://api.eu.svix.com
  description: The Svix EU region
- url: https://api.us.svix.com
  description: The Svix US region
- url: https://api.ca.svix.com
  description: The Svix Canada region
- url: https://api.au.svix.com
  description: The Svix Australia region
- url: https://api.in.svix.com
  description: The Svix India region
tags:
- name: Event Type
  description: Event types are identifiers denoting the type of message being sent. Event types are primarily used to decide which events are sent to which endpoint.
paths:
  /api/v1/event-type:
    get:
      tags:
      - Event Type
      summary: List Event Types
      description: Return the list of event types.
      operationId: v1.event-type.list
      parameters:
      - in: query
        name: limit
        description: Limit the number of returned items
        schema:
          description: Limit the number of returned items
          type: integer
          format: uint64
          maximum: 250
          minimum: 1.0
        style: form
      - in: query
        name: iterator
        description: The iterator returned from a prior invocation
        schema:
          description: The iterator returned from a prior invocation
          type: string
          maxLength: 256
          pattern: ^[a-zA-Z0-9\-_.]+$
          nullable: true
          example: user.signup
        style: form
      - in: query
        name: order
        description: The sorting order of the returned items
        schema:
          description: The sorting order of the returned items
          $ref: '#/components/schemas/Ordering'
          nullable: true
        style: form
      - in: query
        name: include_archived
        description: When `true` archived (deleted but not expunged) items are included in the response.
        schema:
          description: When `true` archived (deleted but not expunged) items are included in the response.
          type: boolean
          default: false
        style: form
      - in: query
        name: with_content
        description: When `true` the full item (including the schema) is included in the response.
        schema:
          description: When `true` the full item (including the schema) is included in the response.
          type: boolean
          default: false
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse_EventTypeOut_'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-codeSamples:
      - lang: TypeScript
        label: JavaScript
        source: const response = await svix.eventType.list();
      - lang: TypeScript
        label: TypeScript
        source: const response = await svix.eventType.list();
      - lang: Python
        label: Python
        source: response = svix.event_type.list()
      - lang: Python
        label: Python (Async)
        source: response = await svix.event_type.list()
      - lang: Go
        label: Go
        source: response, err := svix.EventType.List(ctx, nil)
      - lang: Kotlin
        label: Kotlin
        source: val response = svix.eventType.list()
      - lang: Java
        label: Java
        source: var response = svix.getEventType().list();
      - lang: Ruby
        label: Ruby
        source: response = svix.event_type.list
      - lang: Rust
        label: Rust
        source: let response = svix.event_type().list(None).await?;
      - lang: C#
        label: C#
        source: var response = svix.EventType.List();
      - lang: PHP
        label: PHP
        source: $response = $svix->eventType->list();
      - lang: Shell
        label: CLI
        source: svix event-type list
      - lang: Shell
        label: cURL
        source: "curl -X 'GET' \\\n  'https://api.eu.svix.com/api/v1/event-type' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json'"
    post:
      tags:
      - Event Type
      summary: Create Event Type
      description: '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.'
      operationId: v1.event-type.create
      parameters:
      - in: header
        name: idempotency-key
        description: The request's idempotency key
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventTypeIn'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTypeOut'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-codeSamples:
      - lang: TypeScript
        label: JavaScript
        source: "const response = await svix.eventType.create({\n  name: \"user.signup\",\n  description: \"A user has signed up\",\n  archived: true,\n  deprecated: true,\n  schemas: {\n    \"1\": {\n      description: \"An invoice was paid by a user\",\n      properties: {\n        invoiceId: { description: \"The invoice id\", type: \"string\" },\n        userId: { description: \"The user id\", type: \"string\" },\n      },\n      required: [\"invoiceId\", \"userId\"],\n      title: \"Invoice Paid Event\",\n      type: \"object\",\n    },\n  },\n  groupName: \"user\",\n  featureFlags: [\"cool-new-feature\"],\n});"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.eventType.create({\n  name: \"user.signup\",\n  description: \"A user has signed up\",\n  archived: true,\n  deprecated: true,\n  schemas: {\n    \"1\": {\n      description: \"An invoice was paid by a user\",\n      properties: {\n        invoiceId: { description: \"The invoice id\", type: \"string\" },\n        userId: { description: \"The user id\", type: \"string\" },\n      },\n      required: [\"invoiceId\", \"userId\"],\n      title: \"Invoice Paid Event\",\n      type: \"object\",\n    },\n  },\n  groupName: \"user\",\n  featureFlags: [\"cool-new-feature\"],\n});"
      - lang: Python
        label: Python
        source: "response = svix.event_type.create(\n    EventTypeIn(\n        name=\"user.signup\",\n        description=\"A user has signed up\",\n        archived=True,\n        deprecated=True,\n        schemas={\n            \"1\": {\n                \"description\": \"An invoice was paid by a user\",\n                \"properties\": {\n                    \"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"},\n                    \"userId\": {\"description\": \"The user id\", \"type\": \"string\"},\n                },\n                \"required\": [\"invoiceId\", \"userId\"],\n                \"title\": \"Invoice Paid Event\",\n                \"type\": \"object\",\n            }\n        },\n        group_name=\"user\",\n        feature_flags=[\n            \"cool-new-feature\",\n        ],\n    ),\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.event_type.create(\n    EventTypeIn(\n        name=\"user.signup\",\n        description=\"A user has signed up\",\n        archived=True,\n        deprecated=True,\n        schemas={\n            \"1\": {\n                \"description\": \"An invoice was paid by a user\",\n                \"properties\": {\n                    \"invoiceId\": {\"description\": \"The invoice id\", \"type\": \"string\"},\n                    \"userId\": {\"description\": \"The user id\", \"type\": \"string\"},\n                },\n                \"required\": [\"invoiceId\", \"userId\"],\n                \"title\": \"Invoice Paid Event\",\n                \"type\": \"object\",\n            }\n        },\n        group_name=\"user\",\n        feature_flags=[\n            \"cool-new-feature\",\n        ],\n    ),\n)"
      - lang: Go
        label: Go
        source: "response, err := svix.EventType.Create(\n\tctx,\n\tEventTypeIn{\n\t\tName:         \"user.signup\",\n\t\tDescription:  \"A user has signed up\",\n\t\tArchived:     new(true),\n\t\tDeprecated:   new(true),\n\t\tSchemas:      nil,\n\t\tGroupName:    new(\"user\"),\n\t\tFeatureFlags: []string{\"cool-new-feature\"},\n\t},\n\tnil,\n)"
      - lang: Kotlin
        label: Kotlin
        source: "val response =\n    svix.eventType.create(\n        EventTypeIn(\n            name = \"user.signup\",\n            description = \"A user has signed up\",\n            archived = true,\n            deprecated = true,\n            schemas = mapOf(),\n            groupName = \"user\",\n            featureFlags = setOf(\"cool-new-feature\"),\n        )\n    )"
      - lang: Java
        label: Java
        source: "var response = svix.getEventType()\n        .create(new EventTypeIn()\n            .name(\"user.signup\")\n            .description(\"A user has signed up\")\n            .archived(true)\n            .deprecated(true)\n            .schemas(Map.of())\n            .groupName(\"user\")\n            .featureFlags(Set.of(\"cool-new-feature\")));"
      - lang: Ruby
        label: Ruby
        source: "response = svix\n  .event_type\n  .create(\n    {\n      name: \"user.signup\",\n      description: \"A user has signed up\",\n      archived: true,\n      deprecated: true,\n      schemas: {},\n      groupName: \"user\",\n      featureFlags: [\"cool-new-feature\"]\n    }\n  )"
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .event_type()\n    .create(\n        EventTypeIn {\n            name: \"user.signup\".to_string(),\n            description: \"A user has signed up\".to_string(),\n            archived: Some(true),\n            deprecated: Some(true),\n            schemas: Some(\n                serde_json::json!(\n                    { \"1\" : { \"description\" : \"An invoice was paid by a user\",\n                    \"properties\" : { \"invoiceId\" : { \"description\" :\n                    \"The invoice id\", \"type\" : \"string\" }, \"userId\" : { \"description\"\n                    : \"The user id\", \"type\" : \"string\" } }, \"required\" :\n                    [\"invoiceId\", \"userId\"], \"title\" : \"Invoice Paid Event\", \"type\" :\n                    \"object\" } }\n                ),\n            ),\n            group_name: Some(\"user\".to_string()),\n            feature_flags: Some(vec![\"cool-new-feature\".to_string()]),\n        },\n        None,\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.EventType.Create(\n    new EventTypeIn\n    {\n        Name = \"user.signup\",\n        Description = \"A user has signed up\",\n        Archived = true,\n        Deprecated = true,\n        Schemas = new Dictionary<string, string> { },\n        GroupName = \"user\",\n        FeatureFlags = [\"cool-new-feature\"],\n    }\n);"
      - lang: PHP
        label: PHP
        source: "$response = $svix->eventType->create(\n    EventTypeIn::create(\n        name: \"user.signup\",\n        description: \"A user has signed up\"\n    )\n    ->withArchived(true)\n    ->withDeprecated(true)\n    ->withGroupName(\"user\")\n    ->withFeatureFlags([\"cool-new-feature\"])\n);"
      - lang: Shell
        label: CLI
        source: "svix event-type create '{\n    \"name\": \"user.signup\",\n    \"description\": \"A user has signed up\",\n    \"archived\": true,\n    \"deprecated\": true,\n    \"schemas\": {\n      \"1\": {\n        \"description\": \"An invoice was paid by a user\",\n        \"properties\": {\n          \"invoiceId\": {\n            \"description\": \"The invoice id\",\n            \"type\": \"string\"\n          },\n          \"userId\": {\n            \"description\": \"The user id\",\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"invoiceId\",\n          \"userId\"\n        ],\n        \"title\": \"Invoice Paid Event\",\n        \"type\": \"object\"\n      }\n    },\n    \"groupName\": \"user\",\n    \"featureFlags\": [\n      \"cool-new-feature\"\n    ]\n  }'"
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\n  'https://api.eu.svix.com/api/v1/event-type' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"name\": \"user.signup\",\n    \"description\": \"A user has signed up\",\n    \"archived\": true,\n    \"deprecated\": true,\n    \"schemas\": {\n      \"1\": {\n        \"description\": \"An invoice was paid by a user\",\n        \"properties\": {\n          \"invoiceId\": {\n            \"description\": \"The invoice id\",\n            \"type\": \"string\"\n          },\n          \"userId\": {\n            \"description\": \"The user id\",\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"invoiceId\",\n          \"userId\"\n        ],\n        \"title\": \"Invoice Paid Event\",\n        \"type\": \"object\"\n      }\n    },\n    \"groupName\": \"user\",\n    \"featureFlags\": [\n      \"cool-new-feature\"\n    ]\n  }'"
  /api/v1/event-type/import/openapi:
    post:
      tags:
      - Event Type
      summary: Event Type Import From Openapi
      description: 'Given an OpenAPI spec, create new or update existing event types.


        If an existing `archived` event type is updated, it will be unarchived.

        The importer will convert all webhooks found in the either the `webhooks` or `x-webhooks`

        top-level.'
      operationId: v1.event-type.import-openapi
      parameters:
      - in: header
        name: idempotency-key
        description: The request's idempotency key
        schema:
          type: string
        style: simple
      requestBody:
        description: 'Import a list of event types from webhooks defined in an OpenAPI spec.


          The OpenAPI spec can be specified as either `spec` given the spec as a JSON object, or as `specRaw` (a `string`) which will be parsed as YAML or JSON by the server. Sending neither or both is invalid, resulting in a `400` **Bad Request**.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventTypeImportOpenApiIn'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventTypeImportOpenApiOut'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-codeSamples:
      - lang: TypeScript
        label: JavaScript
        source: "const response = await svix.eventType.importOpenapi({\n  dryRun: true,\n  replaceAll: true,\n  spec: {\n    info: { title: \"Webhook Example\", version: \"1.0.0\" },\n    openapi: \"3.1.0\",\n    webhooks: {\n      \"pet.new\": {\n        post: {\n          requestBody: {\n            content: {\n              \"application/json\": {\n                schema: {\n                  properties: {\n                    id: { format: \"int64\", type: \"integer\" },\n                    name: { type: \"string\" },\n                    tag: { type: \"string\" },\n                  },\n                  required: [\"id\", \"name\"],\n                },\n              },\n            },\n            description: \"Information about a new pet in the system\",\n          },\n          responses: {\n            \"200\": {\n              description:\n                \"Return a 200 status to indicate that the data was received successfully\",\n            },\n          },\n        },\n      },\n    },\n  },\n  specRaw: \"sample string\",\n});"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.eventType.importOpenapi({\n  dryRun: true,\n  replaceAll: true,\n  spec: {\n    info: { title: \"Webhook Example\", version: \"1.0.0\" },\n    openapi: \"3.1.0\",\n    webhooks: {\n      \"pet.new\": {\n        post: {\n          requestBody: {\n            content: {\n              \"application/json\": {\n                schema: {\n                  properties: {\n                    id: { format: \"int64\", type: \"integer\" },\n                    name: { type: \"string\" },\n                    tag: { type: \"string\" },\n                  },\n                  required: [\"id\", \"name\"],\n                },\n              },\n            },\n            description: \"Information about a new pet in the system\",\n          },\n          responses: {\n            \"200\": {\n              description:\n                \"Return a 200 status to indicate that the data was received successfully\",\n            },\n          },\n        },\n      },\n    },\n  },\n  specRaw: \"sample string\",\n});"
      - lang: Python
        label: Python
        source: "response = svix.event_type.import_openapi(\n    EventTypeImportOpenApiIn(\n        dry_run=True,\n        replace_all=True,\n        spec={\n            \"info\": {\"title\": \"Webhook Example\", \"version\": \"1.0.0\"},\n            \"openapi\": \"3.1.0\",\n            \"webhooks\": {\n                \"pet.new\": {\n                    \"post\": {\n                        \"requestBody\": {\n                            \"content\": {\n                                \"application/json\": {\n                                    \"schema\": {\n                                        \"properties\": {\n                                            \"id\": {\n                                                \"format\": \"int64\",\n                                                \"type\": \"integer\",\n                                            },\n                                            \"name\": {\"type\": \"string\"},\n                                            \"tag\": {\"type\": \"string\"},\n                                        },\n                                        \"required\": [\"id\", \"name\"],\n                                    }\n                                }\n                            },\n                            \"description\": \"Information about a new pet in the system\",\n                        },\n                        \"responses\": {\n                            \"200\": {\n                                \"description\": \"Return a 200 status to indicate that the data was received successfully\"\n                            }\n                        },\n                    }\n                }\n            },\n        },\n        spec_raw=\"sample string\",\n    ),\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.event_type.import_openapi(\n    EventTypeImportOpenApiIn(\n        dry_run=True,\n        replace_all=True,\n        spec={\n            \"info\": {\"title\": \"Webhook Example\", \"version\": \"1.0.0\"},\n            \"openapi\": \"3.1.0\",\n            \"webhooks\": {\n                \"pet.new\": {\n                    \"post\": {\n                        \"requestBody\": {\n                            \"content\": {\n                                \"application/json\": {\n                                    \"schema\": {\n                                        \"properties\": {\n                                            \"id\": {\n                                                \"format\": \"int64\",\n                                                \"type\": \"integer\",\n                                            },\n                                            \"name\": {\"type\": \"string\"},\n                                            \"tag\": {\"type\": \"string\"},\n                                        },\n                                        \"required\": [\"id\", \"name\"],\n                                    }\n                                }\n                            },\n                            \"description\": \"Information about a new pet in the system\",\n                        },\n                        \"responses\": {\n                            \"200\": {\n                                \"description\": \"Return a 200 status to indicate that the data was received successfully\"\n                            }\n                        },\n                    }\n                }\n            },\n        },\n        spec_raw=\"sample string\",\n    ),\n)"
      - lang: Go
        label: Go
        source: "response, err := svix.EventType.ImportOpenapi(\n\tctx,\n\tEventTypeImportOpenApiIn{\n\t\tDryRun:     new(true),\n\t\tReplaceAll: new(true),\n\t\tSpec:       nil,\n\t\tSpecRaw:    new(\"sample string\"),\n\t},\n\tnil,\n)"
      - lang: Kotlin
        label: Kotlin
        source: "val response =\n    svix.eventType.importOpenapi(\n        EventTypeImportOpenApiIn(\n            dryRun = true,\n            replaceAll = true,\n            spec = mapOf(),\n            specRaw = \"sample string\",\n        )\n    )"
      - lang: Java
        label: Java
        source: "var response = svix.getEventType()\n        .importOpenapi(new EventTypeImportOpenApiIn()\n            .dryRun(true)\n            .replaceAll(true)\n            .spec(Map.of())\n            .specRaw(\"sample string\"));"
      - lang: Ruby
        label: Ruby
        source: 'response = svix.event_type.import_openapi({dryRun: true, replaceAll: true, spec: {}, specRaw: "sample string"})'
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .event_type()\n    .import_openapi(\n        EventTypeImportOpenApiIn {\n            dry_run: Some(true),\n            replace_all: Some(true),\n            spec: Some(\n                serde_json::json!(\n                    { \"info\" : { \"title\" : \"Webhook Example\", \"version\" : \"1.0.0\" },\n                    \"openapi\" : \"3.1.0\", \"webhooks\" : { \"pet.new\" : { \"post\" : {\n                    \"requestBody\" : { \"content\" : { \"application/json\" : { \"schema\" :\n                    { \"properties\" : { \"id\" : { \"format\" : \"int64\", \"type\" :\n                    \"integer\" }, \"name\" : { \"type\" : \"string\" }, \"tag\" : { \"type\" :\n                    \"string\" } }, \"required\" : [\"id\", \"name\"] } } }, \"description\" :\n                    \"Information about a new pet in the system\" }, \"responses\" : {\n                    \"200\" : { \"description\" :\n                    \"Return a 200 status to indicate that the data was received successfully\"\n                    } } } } } }\n                ),\n            ),\n            spec_raw: Some(\"sample string\".to_string()),\n        },\n        None,\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.EventType.ImportOpenapi(\n    new EventTypeImportOpenApiIn\n    {\n        DryRun = true,\n        ReplaceAll = true,\n        Spec = new Dictionary<string, string> { },\n        SpecRaw = \"sample string\",\n    }\n);"
      - lang: PHP
        label: PHP
        source: "$response = $svix->eventType->importOpenapi(\n    EventTypeImportOpenApiIn::create()\n    ->withDryRun(true)\n    ->withReplaceAll(true)\n    ->withSpecRaw(\"sample string\")\n);"
      - lang: Shell
        label: CLI
        source: "svix event-type import-openapi '{\n    \"dryRun\": true,\n    \"replaceAll\": true,\n    \"spec\": {\n      \"info\": {\n        \"title\": \"Webhook Example\",\n        \"version\": \"1.0.0\"\n      },\n      \"openapi\": \"3.1.0\",\n      \"webhooks\": {\n        \"pet.new\": {\n          \"post\": {\n            \"requestBody\": {\n              \"content\": {\n                \"application/json\": {\n                  \"schema\": {\n                    \"properties\": {\n                      \"id\": {\n                        \"format\": \"int64\",\n                        \"type\": \"integer\"\n                      },\n                      \"name\": {\n                        \"type\": \"string\"\n                      },\n                      \"tag\": {\n                        \"type\": \"string\"\n                      }\n                    },\n                    \"required\": [\n                      \"id\",\n                      \"name\"\n                    ]\n                  }\n                }\n              },\n              \"description\": \"Information about a new pet in the system\"\n            },\n            \"responses\": {\n              \"200\": {\n                \"description\": \"Return a 200 status to indicate that the data was received successfully\"\n              }\n            }\n          }\n        }\n      }\n    },\n    \"specRaw\": \"sample string\"\n  }'"
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\n  'https://api.eu.svix.com/api/v1/event-type/import/openapi' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"dryRun\": true,\n    \"replaceAll\": true,\n    \"spec\": {\n      \"info\": {\n        \"title\": \"Webhook Example\",\n        \"version\": \"1.0.0\"\n      },\n      \"openapi\": \"3.1.0\",\n      \"webhooks\": {\n        \"pet.new\": {\n          \"post\": {\n            \"requestBody\": {\n          

# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/svix/refs/heads/main/openapi/svix-event-type-api-openapi.yml