You can save, edit, and share gRPC request-response pairs as examples. You can even create gRPC examples from scratch.
APIs can be complex, and so can the guidelines for using them. Examples help you understand APIs by capturing the request sent from the client and the response received from the server in a single visual snapshot. You can combine these snapshots in a request and store the request in a collection to illustrate how the API functions under different scenarios. Examples help API producers tell the world beautifully what their API is about.
This walkthrough creates and runs a unary request, then saves the response as a gRPC example.
If you are using the Postman web app, you must use the Postman Desktop Agent. See About the Postman Agent for more information.
In Postman, select New > gRPC to open a request in a new tab.
In the Enter Server URL field, enter grpc.postman-echo.com.
Click Select a method and select SayHello from the dropdown list.
![]()
Save the gRPC request to a collection.
gRPC examples can’t be saved unless the request is in a collection.
Click Invoke. A reply message appears in the response section.
Click
Save Response. The saved example opens in a new tab and you can see the saved example under the request in the sidebar.
![]()
This walkthrough edits a gRPC example.
Create a unary gRPC request, save it in a collection, and save a gRPC example.
Select the gRPC example in the sidebar.
In the Response section, from the Status code dropdown list, select 2 UNKNOWN. The response updates automatically.
The status codes are automatically populated based on the protobuf (protocol buffers) schema.
![]()
Click Save.
This walkthrough uses a streaming method to create a gRPC example. Note how streaming method messages differ from unary method messages.
Create a gRPC request with the LotsOfReplies method (or any streaming method) and save it in a collection.
In the sidebar, hover over the gRPC request you created and select
View more actions > Add example. An empty example opens in the workbench and appears below the request in the sidebar.
From the Add a Message dropdown list, select Message stream. This creates a sample message stream automatically using the message structure defined in the protobuf schema.
![]()
Click Save.
Create a gRPC request, save it in a collection, and save a gRPC example.
Select the gRPC example in the sidebar.
In the right sidebar, click
Documentation.
In the Add example description field, enter your documentation for the gRPC example. Your documentation automatically saves.
While invoking a request, you can work with message payloads stored in the examples. This not only enables you to test the example scenarios by yourself, but also speeds up your debugging workflow.
This walkthrough shows how you can invoke a client streaming request with messages stored in the examples:
Create a gRPC request with the LotsOfGreetings method, and save it in a collection.
Create an example for the request with two different "greeting" messages and save it.
![]()
Select the request and click Invoke.
Click the dropdown next to Use Example Message to view the messages you had saved for the request.
![]()
Select a message from the dropdown list. The selected message appears in the request’s Message tab.
Click Send.
Open the dropdown list again and select a different message.
Last modified: 2025/10/14