# Save and Document WebSocket Requests in Collections

Earlier this year, we added support for [WebSocket](https://blog.postman.com/postman-supports-websocket-apis/ "https://blog.postman.com/postman-supports-websocket-apis/") and [Socket.IO](https://blog.postman.com/postman-now-supports-socket-io/ "https://blog.postman.com/postman-now-supports-socket-io/"), enabling debugging and testing for these new request types. Since then, we have been working towards adding the ability to document and save WebSocket requests within [Postman Collections](https://www.postman.com/collection/ "https://www.postman.com/collection/").

We are excited to announce that with our latest release, you can now save and document your WebSocket requests within a collection. This capability is built as a foundation for our upcoming improvements to support more synchronous and asynchronous protocols.

**Related: [Postman Collection best practices](https://blog.postman.com/document-your-api-like-a-pro-postman-collection-best-practices/)**

## Saving a WebSocket request in a collection

From a WebSocket request tab, click **Save** in the header(or, `⌘ + S`) to open the request save modal. You will notice that it asks to create a new collection for saving WebSocket requests.

Click **Create collection** and name your new WebSocket collection. Finally, name your request and click **Save**.

 ![Saving a WebSocket request in a collection](https://blog.postman.com/wp-content/uploads/2021/10/save-websocket-request.gif)How to save a WebSocket request in a collectionFor the moment, you will need to create a new collection and exclusively store WebSocket requests in them.

## Saving WebSocket messages

A WebSocket request is incomplete without the messages that the API accepts. To save your very first message, click **Save Message** and give your message a meaningful name, then hit **Enter**.

 ![Saving WebSocket message to a request](https://blog.postman.com/wp-content/uploads/2021/10/save-websocket-message.gif)How to save WebSocket messagesTo draft a new message, switch back to the **Compose Message** and author a new message.

**Pro Tip:** You can save messages from the messages stream as well by hovering over a message and clicking the save icon.

## Documenting your WebSocket APIs

As you’re probably familiar with, a Postman Collection also acts as your [API documentation](https://www.postman.com/api-platform/api-documentation/), and these collections are no different. You can document your collection and requests to help your API consumers better understand the APIs.

In a request tab, you can access the documentation from the context bar on the right. You will notice your API documentation is autogenerated from the saved request and the messages:

 ![Documenting WebSocket request](https://blog.postman.com/wp-content/uploads/2021/10/websocket-documentation.gif)WebSocket API documentationFor Socket.IO requests, you can supercharge your API documentation with the help of events. In the **Events** tab, add the events associated with the request and in the documentation view, the saved messages automatically get categorized by the event names.

 ![Documenting Socket.IO request ](https://blog.postman.com/wp-content/uploads/2021/10/socket.io-documentation.gif)Socket.IO API documentation## What’s next?

The ability to save and document WebSocket APIs was, in fact, the most requested feature after our initial WebSocket release. It is still the first step for [asynchronous APIs](https://blog.postman.com/understanding-asynchronous-apis/) to nestle within the [API lifecycle](https://www.postman.com/api-platform/api-lifecycle/), and we’ll be incrementally adding support for more features like scripting, testing, and forking.

We would love to hear your continued feedback so that we can keep creating and evolving what helps you to build faster and better. We invite you to participate in the [Postman Community forum](https://go.pstmn.io/websocket-feedback "https://go.pstmn.io/websocket-feedback") discussion around WebSocket support and follow our [GitHub issue tracker](https://github.com/postmanlabs/postman-app-support/issues?q=label:websocket "https://github.com/postmanlabs/postman-app-support/issues?q=label:websocket") link in order to talk to us about improvements, ideas, and issues. Finally, we’re excited to see your WebSocket APIs, so share them in [public workspaces](https://blog.postman.com/introducing-postman-public-workspaces/ "https://blog.postman.com/introducing-postman-public-workspaces/").

[**Try Postman now**](https://www.postman.com/downloads/)