Account
Plan details, workspace list and folders for the current user
Account
Account endpoints return information about the current subscription plan, the list of available workspaces and the folder structure. All requests require authorization via Authorization: Bearer YOUR_API_TOKEN.
Download the markdown version of the "Account" section for use in ChatGPT / other LLMs:
Subscription plan info GET /api/v3/service/tariff
Returns current subscription plan data: plan code, name, and remaining days.
Response
| Field | Type | Description |
|---|---|---|
| tariff.code | string | Plan code (e.g. free, pro) |
| tariff.name | string | Display name of the plan |
| tariff.days_left | integer|null | Days remaining on the plan; null for unlimited plans |
curl -X GET "https://api.surveyninja.io/api/v3/service/tariff" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" Response example:
{ "tariff": { "code": "pro", "name": "Pro", "days_left": 24 } } List workspaces GET /api/v3/service/workspaces
Returns a paginated list of workspaces available to the current user, with the role and plan of each workspace.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | integer | 1 | Page number |
| per_page | integer | 20 | Workspaces per page |
Response fields (array element)
| Field | Type | Description |
|---|---|---|
| id | integer | Workspace ID |
| name | string | Workspace name |
| role | string | Role of the current user (owner, admin, member) |
| tariff | string | Workspace plan code |
Response also includes standard pagination fields: total, current_page, last_page, per_page.
curl -X GET "https://api.surveyninja.io/api/v3/service/workspaces?page=1&per_page=20" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" Response example:
{ "data": [ { "id": 1, "name": "My workspace", "role": "owner", "tariff": "pro" }, { "id": 7, "name": "Team project", "role": "member", "tariff": "business" } ], "total": 2, "current_page": 1, "last_page": 1, "per_page": 20 } List folders GET /api/v3/service/folders
Returns a flat list of all folders for the current user, including the default folder. Folders are used to organize surveys within a workspace.
Response fields (array element)
| Field | Type | Description |
|---|---|---|
| id | integer | Folder ID |
| name | string | Folder name |
| is_default | boolean | true — default folder (new surveys without a specified folder go here) |
| pos | integer | Folder position in the list for sorting |
curl -X GET "https://api.surveyninja.io/api/v3/service/folders" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" Response example:
[ { "id": 1, "name": "General", "is_default": true, "pos": 0 }, { "id": 5, "name": "Marketing", "is_default": false, "pos": 1 }, { "id": 8, "name": "HR", "is_default": false, "pos": 2 } ]