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
curl https://<SUBDOMAIN>.uservoice.com/api/v2/admin/feedback_records \
  -X "POST" \
  -H "Authorization: Bearer <TOKEN>" \
  -d "body=We'd really like it if you could add the ability to export data in Excel format" \
  -d "links.user_email=yourUser@example.com" \

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
Success
Response Code: 200
id: 194823

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
Failure
Response Code: 422
Missing body

Or, if your API token is missing or incorrect, the response will look like:

1
2
3
Failure
Response Code: 401
Invalid API token

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

Didn’t find what you’re looking for?

Check out the UserVoice Help Center for more documentation.

Explore the Help Center