Getting Started

Get started with SurveyNinja API in minutes

Overview

SurveyNinja API lets you create surveys, collect responses, and integrate survey functionality into your applications. The API follows REST principles and returns data in JSON format.

Base URL v3

https://api.surveyninja.io/api/v3/service

All new documentation below describes API v3 endpoints. Legacy paths /api/service and /api/v2/service belong to previous API versions.

Quick start

1

Get your API token

Log in to your SurveyNinja account and go to Settings → API. Create a new token to access the API.

Token example:

42|xK7mP9nQ2wL5eH8jR3vU6tY0iD4aF1bG
2

Make your first request

Test your connection by listing your surveys via API v3:

GET /quiz
curl -X GET https://api.surveyninja.io/api/v3/service/quiz \ -H "Authorization: Bearer YOUR_API_TOKEN"
3

Get survey data

Retrieve information about a specific survey:

GET /quiz/{id}
curl -X GET https://api.surveyninja.io/api/v3/service/quiz/123 \ -H "Authorization: Bearer YOUR_API_TOKEN"

Download the markdown version of the "Getting Started" section for use in ChatGPT / other LLMs:

What's next?

Authentication

Learn more about token types and authentication methods.

Learn more

Working with surveys

Explore all capabilities for creating and configuring surveys via API.

Learn more