# Submit user feedback POST https://app.unleash-instance.example.com/feedback Content-Type: application/json **Enterprise feature** Allows users to submit feedback. Reference: https://docs.getunleash.io/api/provide-feedback ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Submit user feedback version: endpoint_unstable.provideFeedback paths: /feedback: post: operationId: provide-feedback summary: Submit user feedback description: |- **Enterprise feature** Allows users to submit feedback. tags: - - subpackage_unstable parameters: - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: feedbackSchema content: application/json: schema: $ref: '#/components/schemas/feedbackSchema' requestBody: description: provideFeedbackSchema content: application/json: schema: $ref: '#/components/schemas/provideFeedbackSchema' components: schemas: provideFeedbackSchema: type: object properties: category: type: string description: The category of the feedback. userType: type: - string - 'null' description: The type of user providing the feedback. difficultyScore: type: - number - 'null' format: double description: A score indicating the difficulty experienced by the user. positive: type: - string - 'null' description: This field is for users to mention what they liked. areasForImprovement: type: - string - 'null' description: >- Details aspects of the service or product that could benefit from enhancements or modifications. Aids in pinpointing areas needing attention for improvement. required: - category feedbackSchema: type: object properties: id: type: number format: double description: The unique identifier of the feedback. createdAt: type: string format: date-time description: The date and time when the feedback was provided. category: type: string description: The category of the feedback. userType: type: - string - 'null' description: The type of user providing the feedback. difficultyScore: type: - number - 'null' format: double description: A score indicating the difficulty experienced by the user. positive: type: - string - 'null' description: This field is for users to mention what they liked. areasForImprovement: type: - string - 'null' description: >- Details aspects of the service or product that could benefit from enhancements or modifications. Aids in pinpointing areas needing attention for improvement. required: - id - createdAt - category - userType - difficultyScore - positive - areasForImprovement ``` ## SDK Code Examples ```python import requests url = "https://app.unleash-instance.example.com/feedback" payload = { "category": "UI/UX" } headers = { "Authorization": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/feedback'; const options = { method: 'POST', headers: {Authorization: '', 'Content-Type': 'application/json'}, body: '{"category":"UI/UX"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/feedback" payload := strings.NewReader("{\n \"category\": \"UI/UX\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/feedback") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"category\": \"UI/UX\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.unleash-instance.example.com/feedback") .header("Authorization", "") .header("Content-Type", "application/json") .body("{\n \"category\": \"UI/UX\"\n}") .asString(); ``` ```php request('POST', 'https://app.unleash-instance.example.com/feedback', [ 'body' => '{ "category": "UI/UX" }', 'headers' => [ 'Authorization' => '', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/feedback"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"category\": \"UI/UX\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "", "Content-Type": "application/json" ] let parameters = ["category": "UI/UX"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/feedback")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```