Importing Feedback with UserVoice Admin API
Here is a simple way to get a piece of feedback along with the email address of the user who supplied it into your UserVoice instance via the API.
Sending data to UserVoice via the API requires a trusted API client. You can create a client and generate the needed API token by following this guide. You’ll need the token that you create in the step below. This token is usable for any UserVoice Admin API command - you only need to generate it once.
Sending feedback to UserVoice
This curl command is a POST request that creates a feedback_record. Substitute <SUBDOMAIN> for your UserVoice subdomain and <TOKEN> for your API token.
1 2 3 4 5 | |
Response
When you run this command and everything goes according to plan, you will receive a success message and the ID of the feedback record that was created. It will look like:
1 2 3 | |
If something goes wrong, the appropriate HTTP response code and a descriptive error message will be returned.
For example, if the record did not include a body:
1 2 3 | |
Or, if your API token is missing or incorrect, the response will look like:
1 2 3 | |
Additional Information
To see the full set of options for creating feedback_records using the API, see the Admin API Reference
A full script written in Ruby implementing the above can be found in the Ruby tutorial