Skip to main content
This quickstart walks you through making your first successful API call to Honestly’s Export API — from obtaining your API key to pulling a live list of your surveys. By the end, you will have a working request you can adapt for employees, questions, scores, initiatives, and more.
1

Get your API key

API keys are issued by your dedicated Honestly Customer Success manager. If you don’t have one yet, email service@honestly.com to request access.Once you receive your key, store it as an environment variable rather than pasting it directly into your scripts:
You can then reference $HONESTLY_API_KEY in all subsequent requests, keeping the key out of your source code and version history.
2

Make your first request

With your key in hand, call the surveys endpoint to retrieve the list of surveys in your account:
A successful response will look similar to this:
The total_count field tells you the total number of surveys in your account, regardless of how many were returned in this page.
3

Paginate through results

All list endpoints use offset-based pagination controlled by two query parameters:
  • limit — the maximum number of records to return per page (e.g. 100)
  • offset — the number of records to skip before returning results (e.g. 100 to start at the second page)
To fetch the second page of surveys with a page size of 100:
To determine when you have reached the last page, compare the current offset plus the number of records returned in the response against the total_count value. When offset + count >= total_count, you have retrieved all available records.
4

Export employees and responses

The same request pattern — authenticate with X-Api-Key, paginate with limit and offset — works across all Export API resources:Refer to the API Reference section for full parameter details, filtering options, and response schemas for each endpoint.
Use the total_count field in every list response to calculate how many pages to fetch. See Pagination for a complete guide.