---
title: "load an AsyncAPI specification"
method: PUT
path: "/mockserver/asyncapi"
tags: ["asyncapi"]
---

# load an AsyncAPI specification

`PUT /mockserver/asyncapi`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/asyncapi`
- Auth: none declared

Loads an AsyncAPI specification (JSON or YAML), or a { spec, brokerConfig } document, to mock the described message broker. Requires the mockserver-async module on the classpath.

## Request body

- object: an AsyncAPI specification (JSON/YAML) or a { spec, brokerConfig } document

## Response `201`

AsyncAPI specification loaded

- object

## Other responses

- `400`: empty or invalid AsyncAPI specification
- `501`: AsyncAPI messaging module is not available on the classpath

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
