appgram / docs
Dashboard

API REFERENCE

Surveys

Distribute surveys and collect responses.

v1.0
16 endpoints Authentication →

Surveys

Get available surveys for user

Get active surveys that the user hasn't responded to yet

GET /api/v1/projects/{projectId}/surveys/available/{externalUserId}

Path parameters

projectId string path required

Project ID

externalUserId string path required

External user ID

GET /api/v1/projects/{projectId}/surveys/available/{externalUserId} bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/projects/{projectId}/surveys/available/{externalUserId}

Surveys

List surveys

Get list of surveys for a project with optional filtering by active status

GET /api/v1/surveys

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Query parameters

project_id string query required

Project ID

is_active boolean query

Filter by active status (true/false)

GET /api/v1/surveys bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/surveys \
  --header 'Authorization: Bearer <token>'

Surveys

Create survey

Create a new survey for a project

POST /api/v1/surveys

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Body

application/json
description string
name string required
project_id string required
slug string required
POST /api/v1/surveys bash
curl --request POST \
  --url https://api.appgram.dev/api/v1/surveys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "string",
  "name": "string",
  "project_id": "string",
  "slug": "string"
}'

Surveys

Delete survey node

Delete a survey node/question

DELETE /api/v1/surveys/nodes/{nodeId}

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

nodeId string path required

Survey node ID

DELETE /api/v1/surveys/nodes/{nodeId} bash
curl --request DELETE \
  --url https://api.appgram.dev/api/v1/surveys/nodes/{nodeId} \
  --header 'Authorization: Bearer <token>'
Response · 200 json
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "page": 0,
  "per_page": 0,
  "success": true,
  "total": 0,
  "total_pages": 0
}

Surveys

Update survey node

Update an existing survey node/question

PATCH /api/v1/surveys/nodes/{nodeId}

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

nodeId string path required

Survey node ID

Body

application/json
answer_no_node_id string
answer_yes_node_id string
branches object
is_required boolean
max_rating integer

For rating questions

min_rating integer

For rating questions

next_node_id string

Unified forward navigation for non-yes_no question types. `*interface{}` for Branches mirrors the Options pattern so the service can distinguish "field absent" (skip) from "field present but null/empty" (clear) on partial PATCH bodies.

options object

JSON array for multiple_choice/checkboxes

parent_id string
question string
question_type object
result_message string
sort_order integer
PATCH /api/v1/surveys/nodes/{nodeId} bash
curl --request PATCH \
  --url https://api.appgram.dev/api/v1/surveys/nodes/{nodeId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "answer_no_node_id": "string",
  "answer_yes_node_id": "string",
  "is_required": true,
  "max_rating": 0,
  "min_rating": 0,
  "next_node_id": "string",
  "parent_id": "string",
  "question": "string",
  "question_type": "yes_no",
  "result_message": "string",
  "sort_order": 0
}'

Surveys

Get survey response

Get a specific survey response with all its answers (admin only)

GET /api/v1/surveys/responses/{id}

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey response ID

GET /api/v1/surveys/responses/{id} bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/surveys/responses/{id} \
  --header 'Authorization: Bearer <token>'

Surveys

Get survey

Get a specific survey with all its nodes

GET /api/v1/surveys/{id}

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

GET /api/v1/surveys/{id} bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/surveys/{id} \
  --header 'Authorization: Bearer <token>'

Surveys

Delete survey

Delete a survey and all its associated nodes and responses

DELETE /api/v1/surveys/{id}

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

DELETE /api/v1/surveys/{id} bash
curl --request DELETE \
  --url https://api.appgram.dev/api/v1/surveys/{id} \
  --header 'Authorization: Bearer <token>'
Response · 200 json
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "page": 0,
  "per_page": 0,
  "success": true,
  "total": 0,
  "total_pages": 0
}

Surveys

Update survey

Update an existing survey's configuration

PATCH /api/v1/surveys/{id}

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

Body

application/json
description string
is_active boolean
name string
slug string
PATCH /api/v1/surveys/{id} bash
curl --request PATCH \
  --url https://api.appgram.dev/api/v1/surveys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "string",
  "is_active": true,
  "name": "string",
  "slug": "string"
}'

Surveys

Get survey analytics

Get analytics and statistics for a survey (admin only)

GET /api/v1/surveys/{id}/analytics

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

GET /api/v1/surveys/{id}/analytics bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/surveys/{id}/analytics \
  --header 'Authorization: Bearer <token>'
Response · 200 json
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "page": 0,
  "per_page": 0,
  "success": true,
  "total": 0,
  "total_pages": 0
}

Surveys

Export survey responses

Export all responses for a survey as a downloadable file (admin only). Wide CSV (one row per response, one column per question) or nested JSON.

POST /api/v1/surveys/{id}/export

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

Query parameters

format string query

Export format

POST /api/v1/surveys/{id}/export bash
curl --request POST \
  --url https://api.appgram.dev/api/v1/surveys/{id}/export \
  --header 'Authorization: Bearer <token>'

Surveys

List survey nodes

Get all nodes (questions) for a survey

GET /api/v1/surveys/{id}/nodes

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

GET /api/v1/surveys/{id}/nodes bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/surveys/{id}/nodes \
  --header 'Authorization: Bearer <token>'

Surveys

Create survey node

Create a new question/node in a survey with support for multiple question types (yes_no, short_answer, paragraph, multiple_choice, checkboxes, rating)

POST /api/v1/surveys/{id}/nodes

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

Body

application/json
answer_no_node_id string
answer_yes_node_id string

Legacy binary navigation (for yes_no questions)

branches object
is_required boolean
max_rating integer

For rating questions

min_rating integer

For rating questions

next_node_id string

Unified forward navigation for non-yes_no question types. See models.SurveyNode for shape + persistence notes.

options object

JSON array for multiple_choice/checkboxes

parent_id string
question string required
question_type object required
result_message string
sort_order integer
survey_id string
POST /api/v1/surveys/{id}/nodes bash
curl --request POST \
  --url https://api.appgram.dev/api/v1/surveys/{id}/nodes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "answer_no_node_id": "string",
  "answer_yes_node_id": "string",
  "is_required": true,
  "max_rating": 0,
  "min_rating": 0,
  "next_node_id": "string",
  "parent_id": "string",
  "question": "string",
  "result_message": "string",
  "sort_order": 0,
  "survey_id": "string"
}'

Surveys

List survey responses

Get paginated list of survey responses for a survey (admin only)

GET /api/v1/surveys/{id}/responses

Authorizations

Authorization string header required

Bearer token — an API key prefixed with app_. Create one in the dashboard under Settings → Developer → API Keys.

Path parameters

id string path required

Survey ID

Query parameters

page integer query

Page number

per_page integer query

Items per page

GET /api/v1/surveys/{id}/responses bash
curl --request GET \
  --url https://api.appgram.dev/api/v1/surveys/{id}/responses \
  --header 'Authorization: Bearer <token>'
Response · 200 json
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "page": 0,
  "per_page": 0,
  "success": true,
  "total": 0,
  "total_pages": 0
}

Portal - Surveys

Submit survey response

Submit a completed survey response with all answers (public endpoint, no authentication required)

POST /portal/surveys/{id}/responses

Path parameters

id string path required

Survey ID

Body

application/json
answers array required
external_user_id string
fingerprint string required
metadata object
POST /portal/surveys/{id}/responses bash
curl --request POST \
  --url https://api.appgram.dev/portal/surveys/{id}/responses \
  --header 'Content-Type: application/json' \
  --data '{
  "answers": [
    {
      "answer": "string",
      "answer_text": "string",
      "node_id": "string"
    }
  ],
  "external_user_id": "string",
  "fingerprint": "string"
}'

Portal - Surveys

Get survey for taking

Get a survey by slug for users to take. Only returns active surveys (public endpoint, no authentication required)

GET /portal/surveys/{slug}

Path parameters

slug string path required

Survey slug

Query parameters

project_id string query required

Project ID

GET /portal/surveys/{slug} bash
curl --request GET \
  --url https://api.appgram.dev/portal/surveys/{slug}