router := gin.Default() api := router.Group("/api")
api.POST("/users", func(c *gin.Context) { // your logic to create a new user goes here })
api.POST("/users/:id", func(c *gin.Context) { id := c.Param("id") // your logic to update the user with ID=id goes here })In both examples, we define a route that begins with `/api/users` and handles POST requests. The second example includes a URL parameter `:id` which allows us to update a specific user depending on the value of the `id` parameter.