ArticlesHappyOrNot API FAQ

15.1.2025Knowledge

HappyOrNot API (Application Program Interface) is an add-on feature. Your HappyOrNot contact person will be happy to give you more information about taking it into use.

You can find full documentation of HappyOrNot API in the following link: https://happyornot.github.io/docs/api/

What is the difference between API v1 and API v2?

HappyOrNot API 2.0 is based on the Open API standard. This makes it easier, faster and safer for our customers to build their own clients.

It has the following new features:

  • Data structures that intuitively suit BI applications.
  • Improved access and feature control​, where tokens can be restricted by time, organization hierarchy and feature visibility.
  • New data formats  (.csv and .json)
  • Support for all HappyOrNot features and the data they provide​, including demographics and contact request.

Can I automatically switch to API v2?

While the existing API v1 tokens remain to be in use for a while, API tokens and the API interfaces are not interchangeable. Thus you cannot use v1 tokens to access v2, and vice versa. Existing integrations using v1 need to be changed to utilize different interfaces from the v2. The new v2 contains much more data and security options that keeping the backward compatibility was not possible. 

Why can't I see all the tokens?

You can only see tokens for groups or experience points that you have access to. Contact your organization Admin to get access if you need it.

Why can't I create any more tokens?

If the Add new button is greyed out, it means that all the token included in your package are already in use. You can delete tokens that are no-longer in use, or extend the validity of expired ones, or contact your HappyOrNot contact to upgrage your API package.
 

API v1 FAQ

Note that the HappyOrNot API 1.0 is a legacy feature and the following instructions may not be valid anymore.
 

Does the API v1 support all HappyOrNot features?

No, certain features such as contact details and demographics are not supported in v1. We recommend that you switch to using API v2 to get access to full features. 
 

Does HappyOrNot API v1 work automatically with PowerBI?

No, HappyOrNot API does not work with PowerBI without an intergration code. If you want to create an integration with PowerBI, you need to switch to API v2.
 

Why does the link https://api.happy-or-not.com/v1/ give an error message in the browser?

The link https://api.happy-or-not.com/v1/ does not work in the web browser in itself. You need to use an online HTTP client, such as REST Client, Postman, or Paw.
 

Why doesn't the link https://api.happy-or-not.com/v1/surveys work?

The link https://api.happy-or-not.com/v1/surveys returns a 404 error because the API endpoint does not exist without the key part. The key is the identifier of the survey. Each experience point has a key of its own.

Therefore, the surveys API https://api.happy-or-not.com/v1/surveys/:key requires a valid survey identifier (the key).
 

How do I get the ID of the survey?

You can get the survey identifier (the key) by using the folders API or the questions API.

Folders API: https://happyornot.github.io/docs/api/folders/

Questions API: https://happyornot.github.io/docs/api/questions/

You can use either the questions API or the folders API to get the survey keys. It depends on the case, which one fits better. However, the questions API is more straightforward to use. Once you have fetched the required survey keys, you can fetch the feedback results from the survey.

a) With the questions API:

1. Get questions /v1/questions
2. Get surveys for a question /v1/questions/:key/surveys
3. Proceed to get results for surveys

b) With the folders API:

1. Get the first 2 subfolder levels /v1/folders?surveys=true

Note: The experience point hierarchy is based on a tree structure. If you use the folders endpoint, the first 2 experiencepoint levels are returned; the immediate subfolder level and the subsequent subfolder level after the requested experience point. The /v1/folders/:key endpoint can then be used to get any further subfolder levels.

2. If you have a deeper folder structure, you can also get more levels with /v1/folders/:key?surveys=true
3. Proceed to get results for surveys
 

In what format do I get API results data? Can I fetch it into an Excel file automatically?

It is not possible to fetch data directly from a customer API into Excel format. You can fetch data in JSON format only.

However, there are many JSON to Excel converters and plugins available, both free and commercial ones. You cal also open JSON files in some versions of Excel.

If you just want to open your results in Excel, instead of using the  API, you can export your results from Analytics as CSV or Excel file.

If you are planning to automate the code to fetch data from HappyOrNot API into Excel, you need to use one of the libraries or tools. The best tool for your needs depends on the operating system, the programming language, and the architecture that you are planning to use. The developer or vendor responsible for implementing the API integration must be equipped to create the conversion.


Can't find the information you're looking for? Email support@happy-or-not.com to contact our Support.