Getting Started with the Qualtrics API
About the Qualtrics API
The Qualtrics API can be used to automate repetitive processes inside of Qualtrics or to pass information in and out of Qualtrics. For example, a Brand Administrator can use the Qualtrics API to automate the account creation process rather than create hundreds of accounts individually. Similarly, a user can automate contact list creation rather than manually compile and import contact lists. Qualtrics also has various API Solution Guides that can help you determine how best to use API for your needs.
API Access for Different Products
Qualtrics has a variety of different products that allow you to gather actionable data in real time. Some of these products include the Survey Platform, Site Intercept, and XM Directory (Target Audience). Once you’ve purchased the Qualtrics API feature, you’ll be able to use the API for any products that are a part of your license.
Here are links to the documentation for the latest version of the API for each of our products:
- For the latest APIs for most products, see Qualtrics API
- Site Intercept
Please note that we always recommend that our clients use the latest version of the API.
Understanding the Qualtrics v3 API
The Qualtrics v3 API is a REST API that allows you to communicate or query our system using a simple URL syntax. Communicating with the Qualtrics system can be thought of as a sequence of requests. You can request information to be sent to Qualtrics, updated, removed, or returned to your system. These requests can be made by either GET, POST, PUT, or DELETE requests, which return JSON responses.
Through these means, the Qualtrics API allows you to interact with parts of the Qualtrics system and integrate these areas with your CRM.
Getting Started
Passing Parameters
Parameters are the building blocks for your requests. Each API request requires several global parameters to be passed to Qualtrics, as well as more request-specific parameters and a few optional ones.
You will always need to pass the API token through the header of the request as X-API-TOKEN. Depending on the specific request being run, you may need to pass other parameters through the header, through the URL, or through the body of the request. When passing parameters through the body, you need to send the parameters as JSON. When using this method, you must specify a Content-Type (i.e., application/json or multipart/form-data).
Example: In the following POST example, in cURL we specify the Base URL, the Content-Type, and the Token in the header. The Survey ID and format of export are specified in the body.
curl -X POST -H 'X-API-TOKEN: yourapitokenhere' -H 'Content-Type: application/json' -d '{
"surveyId": "SV_012345678912345",
"format": "csv"
}' 'https://yourdatacenterid.qualtrics.com/API/v3/responseexports'
Generating an API Token
An API token will be required to access the Qualtrics API. Each user in a license must generate their own API token. Your account’s API token is required to authenticate each API request you create. Your token is used in place of your account’s password and helps enhance the security of your work. To authenticate, include your token under the HTTPS header X-API-TOKEN.
To generate an API token
- Click on the user settings icon in the top-right corner of your account.
- Select Account Settings.
- Click Qualtrics IDs on the navigation bar.
- In the box labeled API, click Generate Token.
Creating a Client Secret
- Click the user settings icon in the top right hand corner of your Qualtrics account.
- Select Account Settings.
- Navigate to Qualtrics IDs.
- Choose OAuth Client Manager.
- Click Create Client.
- Enter a client name.
- If desired, enter a contact email address.
- For Grant Type, choose Client Credentials.
- Click Create Client.
- Write down the Client ID and Client Secret and store them in a secure location.
Attention: Once you exit out of this window, the Client Secret is irretrievable. If you lose or forget your Client Secret, you will need to repeat the above process to generate a new one.