Skip to main content
  • Customer Experience
    Customer Experience
  • Employee Experience
    Employee Experience
  • Brand Experience
    Brand Experience
  • Product Experience
    Product Experience
  • Core XM
    Core XM
  • Design XM
    Design XM

Web Service Task

What's on This Page:

Was this helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!

About the Web Service Task

The Web Service task is useful if you are adept at API and would like to trigger different workflows within the Qualtrics software, or to an external web service, when the respondent finishes the survey. For example, if your survey collects the respondent’s contact information, then a web service task can use the create contact API call to add the respondent to a contact list.

We also recommend visiting these web service-related pages for more assistance and background:

Qtip: This page contains references to Qualtrics’ API, which is a feature that requires special permission to access. If you are interested in obtaining access to this feature, please reach out to your Brand Administrator for more information.
Attention: Setting up a web service often requires advanced programming knowledge. Although our support team is happy to help with the basics of putting information into the web service, we cannot provide support on the programming aspects.

Setting Up a Web Service Task

Depending on how you prefer to format your body parameters, the setup will slightly differ. If you are using JSON or XML format, enter your body in the Body section. If you’d prefer URL-encoded, you can add parameters as a query string to the URL field.

  1. Create a workflow (or select an existing one) in your survey or in the global Workflows page.
    navigating to workflows in the global navigation and creating a new workflwo
  2. Click Create a workflow
  3. Determine the schedule or the event that triggers your task. (See a comparison.)
    choosing a scheduled workflow
  4. Click Get started and follow the directions to set up the initial conditions for your workflow.
  5. Click Add task and select Web Service.
    the webservice event
  6. Choose your authentication method. Your options include:
    choosing the authentication type and clicking next

    • Authenticate: Perform an authenticated web service request. Your authentication options include basic (with a password and username), API key, and OAuth.
    • Non-authenticated: Perform a web service request without authentication.
  7. Click Next.
  8. If you selected an authenticated request, select your authorization credentials from the list, or click Add User Account to add new credentials. See Adding Authorization Credentials for more information.
    adding a user account, or choosing an existing one

    Qtip: You’ll be able to select any credentials you’ve previously added, or credentials added by a Brand Administrator in the Extensions tab.
  9. Click Next.
  10. Choose your web service’s Request method. See Web Service Methods for more information about each method.
    choosing the request and entering a URL

    Qtip: If you’re using the Qualtrics API, the documentation will tell you what type of request to use.
    Attention: WebService tasks do not allow any URL redirects for non-GET requests. Only one redirect is allowed for GET requests.
  11. Enter the URL for your request.
  12. If desired, add headers to your request by typing in the header Key and Value. Headers carry metadata related to the request. Click Add header to add additional headers. To remove a header, click the trash can icon next to the header.
    Qtip: Use the piped text icon, {a}, to insert Piped Text to pull in values from survey responses or previous tasks in the workflow.
    Attention: If using the Qualtrics API, you must include your API token through the header. See Adding a Header for Qualtrics API Requests for more information.
  13. Determine how you want to specify the body of your request. You can add the body as Key-value pairs or Free text.
    adding body parameters into the web service
  14. Choose the format of your body. Options include JSON, URL Encoded, XML, and Plain Text.
    Qtip: Plain Text can only be specified as Free text.
  15. If you selected Key-value pairs, add the Key and its associated Value. Click Add key-value pair to add additional parameters.
    adding a key-value pair to the body request
  16. If you selected Free Text, enter your body parameters in your selected format.
    the body field to determining what data is sent with the request
  17. To test your web service, enter values for your web service’ variables and click Run test.
    testing a value for a variable

    Qtip: After clicking Run test, the result of your request will appear, letting you know if it was successful or not, and the resulting JSON or XML if it was successful.
  18. Add JSON or XML paths for referencing the results of your web service in piped text, to be used with other tasks in your workflow, such as a code task. If you tested your web service, you may automatically have values here, as Qualtrics will automatically pull them out of the results.
    mapping JSON paths to the webservice task

    Qtip: Click Add custom path to add additional paths, or click the trash can next to a path to delete it.
  19. If desired, add a Task summary at the top of your task. This is a description explaining the goal of the task.
    adding a task summary and then clicking Save
  20. When finished setting up your workflow, click Save.

Adding Authorization Credentials

This section covers how to add authorization credentials for the web service task. You can add credentials using the Basic, API Key, or OAuth method. To add credentials, click Add user account from the credential selection window.


adding a new basic authentication account

  1. Give your credentials a Name. This is for your organizational purposes only.
  2. Choose Basic as the connection type.
  3. Enter the Username required for authentication.
  4. Enter the Password for authentication.
  5. Click Connect account.


adding a new api account

  1. Give your account a Name. This is for your organizational purposes only.
  2. Choose API key as the connection type.
  3. Enter the API Token used for authentication.
  4. Click Connect account.


adding a new oauth account

  1. Give your account a Name. This is for your own organizational purposes only.
  2. Choose OAuth as the connection type.
  3. Choose your Grant type, or how the access token is retrieved. You may choose:
    • Authorization code
    • Client credentials
  4. Enter the Client ID and Client secret.
  5. Enter the Token endpoint.
  6. If you selected authorization code as the grant type, enter the Authorization endpoint.
  7. Click Connect account.

Editing & Deleting Credentials

To edit your credential’s name, click the pencil icon next to the account. To delete credentials, click the trash can icon next to the account.
the edit and delete button next to an account

Qtip: You can only edit or delete credentials you’ve added yourself.
Warning: Be careful when deleting credentials! Any workflows that use the credentials will stop working when the credentials are deleted.

Adding a Header for Qualtrics API Requests

When using the Qualtrics API, you must include your API token as a header in your web service.

  1. Set up your web service task, select your credentials, and choose your request.
    adding an api token as a header
  2. In the Headers section, enter X-API-TOKEN as the Key.
  3. For the value, click the piped text icon, {a}.
  4. Select your credentials from the list.
    selecting the API token field for the token header