--- url: "https://asyncapi.com/docs/getting-started/hello-world" titulek: "Hello world | AsyncAPI Initiative for event-driven APIs" h1: "Hello world" popis: "Let's define an application that's capable of receiving a \"hello {name}\" message: Let's get into the details of this sample AsyncAPI document: The first line of the specification starts with the doc" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 02:45:51" znaku: 3610 slov: 468 kodovani: "utf-8" sha256: "5aae571cae57a4df24fb5f59cdee0774aba939028d3fe434a1bdf17501b3a33d" --- # Hello world Found an error? Have a suggestion?[Edit this page on GitHub](https://github.com/asyncapi/website/blob/master/markdown/docs/tutorials/getting-started/hello-world.md) Let's define an application that's capable of receiving a `"hello {name}"` message: ``` asyncapi: 3.1.0 info: title: Hello world application version: '0.1.0' channels: hello: address: 'hello' messages: sayHelloMessage: payload: type: string pattern: '^hello .+$' operations: receiveHello: action: 'receive' channel: $ref: '#/channels/hello' ``` Let's get into the details of this sample AsyncAPI document: ``` asyncapi: 3.1.0 info: title: Hello world application version: '0.1.0' channels: hello: address: 'hello' messages: sayHelloMessage: payload: type: string pattern: '^hello .+$' operations: receiveHello: action: 'receive' channel: $ref: '#/channels/hello' ``` The first line of the specification starts with the document type `asyncapi` and the version (3.1.0). That line doesn't have to be the first one, but it's a best practice. ``` asyncapi: 3.1.0 info: title: Hello world application version: '0.1.0' channels: hello: address: 'hello' messages: sayHelloMessage: payload: type: string pattern: '^hello .+$' operations: receiveHello: action: 'receive' channel: $ref: '#/channels/hello' ``` The `info` object contains the minimum required information about the application. It contains the `title`, which is a memorable name for the API, and the `version`. While it's not mandatory, it's strongly recommended to change the version whenever you make changes to the API. ``` asyncapi: 3.1.0 info: title: Hello world application version: '0.1.0' channels: hello: address: 'hello' messages: sayHelloMessage: payload: type: string pattern: '^hello .+$' operations: receiveHello: action: 'receive' channel: $ref: '#/channels/hello' ``` The `channels` section of the specification houses all of the mediums where messages flow through. For example, some systems use `topic`, `event name` or `routing key`. Different kinds of information flow through each channel similar to the analogy of TV channels. You only have one channel called `hello`, and you see what message is available in this channel and how it must be structured. The `payload` object defines that the message must be a string and match the given regular expression in a string format such as `hello {name}`. ``` asyncapi: 3.1.0 info: title: Hello world application version: '0.1.0' channels: hello: address: 'hello' messages: sayHelloMessage: payload: type: string pattern: '^hello .+$' operations: receiveHello: action: 'receive' channel: $ref: '#/channels/hello' ``` The `operations` section is where you describe what the application is doing. Each operation has a unique identifier for example, `receiveHello`. In the above example, you see that the `Hello world application` is a consumer listening to the `sayHelloMessage` message from the `hello` channel. In other words, you can say that the `Hello world application` subscribes to the `hello` topic to `receive` the `sayHelloMessage` message. That AsyncAPI document describes what the `Hello world application` is doing, not what others can do with it. [Go BackComing from OpenAPI](/docs/tutorials/getting-started/coming-from-openapi) [Up NextRequest/reply pattern](/docs/tutorials/getting-started/request-reply) Was this helpful? Help us improve the docs by sharing your feedback. [Submit Feedback](https://github.com/asyncapi/website/issues/new?template=docs-feedback.yml&title=Docs%20Feedback%3A%20%2Fdocs%2Ftutorials%2Fgetting-started%2Fhello-world&labels=%F0%9F%93%91%20docs) OR [Create Issue on GitHub](https://github.com/asyncapi/website/issues/new/choose)