appgram / docs
Dashboard

API REFERENCE

Surveys

Manage surveys and collect responses.

v1.0
16 endpointsAuthentication →

Surveys

Get available surveys for user

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

Required API key scope: surveys:view.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired
externalUserIdstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

GET /api/v1/projects/{id}/surveys/available/{externalUserId}
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/projects/{id}/surveys/available/{externalUserId}' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": [
    {
      "description": "string",
      "id": "string",
      "name": "string",
      "number_of_questions": 0,
      "slug": "string"
    }
  ],
  "success": true
}

Surveys

List surveys

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

Required API key scope: surveys:view.

GET/api/v1/surveys

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Query parameters

is_activestringquery
project_idstringquery

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

GET /api/v1/surveys
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/surveys' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": [
    {
      "created_at": "1970-01-01T00:00:00.000Z",
      "description": "string",
      "id": "string",
      "is_active": true,
      "name": "string",
      "nodes": [
        {}
      ],
      "number_of_questions": 0,
      "number_of_responses": 0,
      "project_id": "string",
      "slug": "string",
      "updated_at": "1970-01-01T00:00:00.000Z"
    }
  ],
  "success": true
}

Surveys

Create survey

Create a new survey for a project

Required API key scope: surveys:manage.

POST/api/v1/surveys

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Body

application/json
descriptionstring
namestringrequired
project_idstringrequired
slugstringrequired

Responses

201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

POST /api/v1/surveys
curl --request POST \
  --url 'https://api.appgram.dev/api/v1/surveys' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "string",
  "name": "string",
  "project_id": "string",
  "slug": "string"
}'
Response · 201
{
  "data": {
    "created_at": "1970-01-01T00:00:00.000Z",
    "description": "string",
    "id": "string",
    "is_active": true,
    "name": "string",
    "nodes": [
      {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    ],
    "number_of_questions": 0,
    "project_id": "string",
    "slug": "string",
    "updated_at": "1970-01-01T00:00:00.000Z"
  },
  "success": true
}

Surveys

Delete survey node

Delete a survey node/question

Required API key scope: surveys:manage.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

nodeIdstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

DELETE /api/v1/surveys/nodes/{nodeId}
curl --request DELETE \
  --url 'https://api.appgram.dev/api/v1/surveys/nodes/{nodeId}' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": {
    "success": true
  },
  "success": true
}

Surveys

Update survey node

Update an existing survey node/question

Required API key scope: surveys:manage.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

nodeIdstringpathrequired

Body

application/json
answer_no_node_idstring
answer_yes_node_idstring
branchesarray

Conditional branches evaluated in order; each next_node_id must belong to the same survey.

is_requiredboolean
max_ratinginteger
min_ratinginteger
next_node_idstring
optionsarray

Choices for multiple_choice and checkboxes questions (validate_survey_node_options requires value and label); null for other types.

parent_idstring
questionstring
question_typestring
result_messagestring
sort_orderinteger

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

PATCH /api/v1/surveys/nodes/{nodeId}
curl --request PATCH \
  --url 'https://api.appgram.dev/api/v1/surveys/nodes/{nodeId}' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "answer_no_node_id": "string",
  "answer_yes_node_id": "string",
  "branches": [
    {
      "condition": {
        "type": "equals"
      },
      "next_node_id": "string"
    }
  ],
  "is_required": true,
  "max_rating": 0,
  "min_rating": 0,
  "next_node_id": "string",
  "options": [
    {
      "label": "string",
      "value": "string"
    }
  ],
  "parent_id": "string",
  "question": "string",
  "question_type": "checkboxes",
  "result_message": "string",
  "sort_order": 0
}'
Response · 200
{
  "data": {
    "answer_no_node_id": "string",
    "answer_yes_node_id": "string",
    "branches": [
      {
        "condition": {},
        "next_node_id": "string"
      }
    ],
    "children": [
      {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    ],
    "created_at": "1970-01-01T00:00:00.000Z",
    "id": "string",
    "is_required": true,
    "max_rating": 0,
    "min_rating": 0,
    "next_node_id": "string",
    "no_node": {
      "answer_no_node_id": "string",
      "answer_yes_node_id": "string",
      "branches": [
        {}
      ],
      "children": [
        {}
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "id": "string",
      "is_required": true,
      "max_rating": 0,
      "min_rating": 0,
      "next_node_id": "string",
      "no_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      },
      "options": [
        {}
      ],
      "parent_id": "string",
      "question": "string",
      "question_type": "checkboxes",
      "result_message": "string",
      "sort_order": 0,
      "survey": {
        "created_at": "1970-01-01T00:00:00.000Z",
        "description": "string",
        "id": "string",
        "is_active": true,
        "name": "string",
        "nodes": [],
        "number_of_questions": 0,
        "number_of_responses": 0,
        "project": {},
        "project_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "survey_id": "string",
      "updated_at": "1970-01-01T00:00:00.000Z",
      "yes_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    },
    "options": [
      {
        "label": "string",
        "value": "string"
      }
    ],
    "parent_id": "string",
    "question": "string",
    "question_type": "checkboxes",
    "result_message": "string",
    "sort_order": 0,
    "survey": {
      "created_at": "1970-01-01T00:00:00.000Z",
      "description": "string",
      "id": "string",
      "is_active": true,
      "name": "string",
      "nodes": [
        {}
      ],
      "number_of_questions": 0,
      "number_of_responses": 0,
      "project": {
        "captcha_enabled": true,
        "color": "string",
        "created_at": "1970-01-01T00:00:00.000Z",
        "custom_domain": "string",
        "description": "string",
        "icon_url": "string",
        "id": "string",
        "is_launched": true,
        "name": "string",
        "organization_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "project_id": "string",
      "slug": "string",
      "updated_at": "1970-01-01T00:00:00.000Z"
    },
    "survey_id": "string",
    "updated_at": "1970-01-01T00:00:00.000Z",
    "yes_node": {
      "answer_no_node_id": "string",
      "answer_yes_node_id": "string",
      "branches": [
        {}
      ],
      "children": [
        {}
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "id": "string",
      "is_required": true,
      "max_rating": 0,
      "min_rating": 0,
      "next_node_id": "string",
      "no_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      },
      "options": [
        {}
      ],
      "parent_id": "string",
      "question": "string",
      "question_type": "checkboxes",
      "result_message": "string",
      "sort_order": 0,
      "survey": {
        "created_at": "1970-01-01T00:00:00.000Z",
        "description": "string",
        "id": "string",
        "is_active": true,
        "name": "string",
        "nodes": [],
        "number_of_questions": 0,
        "number_of_responses": 0,
        "project": {},
        "project_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "survey_id": "string",
      "updated_at": "1970-01-01T00:00:00.000Z",
      "yes_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    }
  },
  "success": true
}

Surveys

Get survey response

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

Required API key scope: surveys:view.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

GET /api/v1/surveys/responses/{id}
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/surveys/responses/{id}' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": {
    "answers": [
      {
        "answer": "string",
        "answer_options": [],
        "answer_text": "string",
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "node": {},
        "node_id": "string",
        "response_id": "string"
      }
    ],
    "created_at": "1970-01-01T00:00:00.000Z",
    "external_user_id": "string",
    "fingerprint": "string",
    "id": "string",
    "metadata": {},
    "survey_id": "string"
  },
  "success": true
}

Surveys

Get survey

Get a specific survey with all its nodes

Required API key scope: surveys:view.

GET/api/v1/surveys/{id}

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

GET /api/v1/surveys/{id}
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": {
    "created_at": "1970-01-01T00:00:00.000Z",
    "description": "string",
    "id": "string",
    "is_active": true,
    "name": "string",
    "nodes": [
      {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    ],
    "number_of_questions": 0,
    "number_of_responses": 0,
    "project_id": "string",
    "slug": "string",
    "updated_at": "1970-01-01T00:00:00.000Z"
  },
  "success": true
}

Surveys

Delete survey

Delete a survey and all its associated nodes and responses

Required API key scope: surveys:manage.

DELETE/api/v1/surveys/{id}

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

DELETE /api/v1/surveys/{id}
curl --request DELETE \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": {
    "success": true
  },
  "success": true
}

Surveys

Update survey

Update an existing survey's configuration

Required API key scope: surveys:manage.

PATCH/api/v1/surveys/{id}

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Body

application/json
descriptionstring
is_activeboolean
namestring
slugstring

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

PATCH /api/v1/surveys/{id}
curl --request PATCH \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "string",
  "is_active": true,
  "name": "string",
  "slug": "string"
}'
Response · 200
{
  "data": {
    "created_at": "1970-01-01T00:00:00.000Z",
    "description": "string",
    "id": "string",
    "is_active": true,
    "name": "string",
    "nodes": [
      {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    ],
    "number_of_questions": 0,
    "project_id": "string",
    "slug": "string",
    "updated_at": "1970-01-01T00:00:00.000Z"
  },
  "success": true
}

Surveys

Get survey analytics

Get analytics and statistics for a survey (admin only)

Required API key scope: surveys:view.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

GET /api/v1/surveys/{id}/analytics
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}/analytics' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": {},
  "success": true
}

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.

Required API key scope: surveys:view.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Query parameters

formatstringquery

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

POST /api/v1/surveys/{id}/export
curl --request POST \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}/export' \
  --header 'x-api-key: <api-key>'
Response · 200
"string"

Surveys

List survey nodes

Get all nodes (questions) for a survey

Required API key scope: surveys:view.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

GET /api/v1/surveys/{id}/nodes
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}/nodes' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": [
    {
      "answer_no_node_id": "string",
      "answer_yes_node_id": "string",
      "branches": [
        {}
      ],
      "children": [
        {}
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "id": "string",
      "is_required": true,
      "max_rating": 0,
      "min_rating": 0,
      "next_node_id": "string",
      "no_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      },
      "options": [
        {}
      ],
      "parent_id": "string",
      "question": "string",
      "question_type": "checkboxes",
      "result_message": "string",
      "sort_order": 0,
      "survey": {
        "created_at": "1970-01-01T00:00:00.000Z",
        "description": "string",
        "id": "string",
        "is_active": true,
        "name": "string",
        "nodes": [],
        "number_of_questions": 0,
        "number_of_responses": 0,
        "project": {},
        "project_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "survey_id": "string",
      "updated_at": "1970-01-01T00:00:00.000Z",
      "yes_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    }
  ],
  "success": true
}

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)

Required API key scope: surveys:manage.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Body

application/json
answer_no_node_idstring
answer_yes_node_idstring
branchesarray

Conditional branches evaluated in order; each next_node_id must belong to the same survey.

is_requiredboolean
max_ratinginteger
min_ratinginteger
next_node_idstring
optionsarray

Choices for multiple_choice and checkboxes questions (validate_survey_node_options requires value and label); null for other types.

parent_idstring
questionstringrequired
question_typestringrequired
result_messagestring
sort_orderinteger
survey_idstring

Responses

201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

POST /api/v1/surveys/{id}/nodes
curl --request POST \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}/nodes' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "answer_no_node_id": "string",
  "answer_yes_node_id": "string",
  "branches": [
    {
      "condition": {
        "type": "equals"
      },
      "next_node_id": "string"
    }
  ],
  "is_required": true,
  "max_rating": 0,
  "min_rating": 0,
  "next_node_id": "string",
  "options": [
    {
      "label": "string",
      "value": "string"
    }
  ],
  "parent_id": "string",
  "question": "string",
  "question_type": "checkboxes",
  "result_message": "string",
  "sort_order": 0,
  "survey_id": "string"
}'
Response · 201
{
  "data": {
    "answer_no_node_id": "string",
    "answer_yes_node_id": "string",
    "branches": [
      {
        "condition": {},
        "next_node_id": "string"
      }
    ],
    "children": [
      {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    ],
    "created_at": "1970-01-01T00:00:00.000Z",
    "id": "string",
    "is_required": true,
    "max_rating": 0,
    "min_rating": 0,
    "next_node_id": "string",
    "no_node": {
      "answer_no_node_id": "string",
      "answer_yes_node_id": "string",
      "branches": [
        {}
      ],
      "children": [
        {}
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "id": "string",
      "is_required": true,
      "max_rating": 0,
      "min_rating": 0,
      "next_node_id": "string",
      "no_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      },
      "options": [
        {}
      ],
      "parent_id": "string",
      "question": "string",
      "question_type": "checkboxes",
      "result_message": "string",
      "sort_order": 0,
      "survey": {
        "created_at": "1970-01-01T00:00:00.000Z",
        "description": "string",
        "id": "string",
        "is_active": true,
        "name": "string",
        "nodes": [],
        "number_of_questions": 0,
        "number_of_responses": 0,
        "project": {},
        "project_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "survey_id": "string",
      "updated_at": "1970-01-01T00:00:00.000Z",
      "yes_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    },
    "options": [
      {
        "label": "string",
        "value": "string"
      }
    ],
    "parent_id": "string",
    "question": "string",
    "question_type": "checkboxes",
    "result_message": "string",
    "sort_order": 0,
    "survey": {
      "created_at": "1970-01-01T00:00:00.000Z",
      "description": "string",
      "id": "string",
      "is_active": true,
      "name": "string",
      "nodes": [
        {}
      ],
      "number_of_questions": 0,
      "number_of_responses": 0,
      "project": {
        "captcha_enabled": true,
        "color": "string",
        "created_at": "1970-01-01T00:00:00.000Z",
        "custom_domain": "string",
        "description": "string",
        "icon_url": "string",
        "id": "string",
        "is_launched": true,
        "name": "string",
        "organization_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "project_id": "string",
      "slug": "string",
      "updated_at": "1970-01-01T00:00:00.000Z"
    },
    "survey_id": "string",
    "updated_at": "1970-01-01T00:00:00.000Z",
    "yes_node": {
      "answer_no_node_id": "string",
      "answer_yes_node_id": "string",
      "branches": [
        {}
      ],
      "children": [
        {}
      ],
      "created_at": "1970-01-01T00:00:00.000Z",
      "id": "string",
      "is_required": true,
      "max_rating": 0,
      "min_rating": 0,
      "next_node_id": "string",
      "no_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      },
      "options": [
        {}
      ],
      "parent_id": "string",
      "question": "string",
      "question_type": "checkboxes",
      "result_message": "string",
      "sort_order": 0,
      "survey": {
        "created_at": "1970-01-01T00:00:00.000Z",
        "description": "string",
        "id": "string",
        "is_active": true,
        "name": "string",
        "nodes": [],
        "number_of_questions": 0,
        "number_of_responses": 0,
        "project": {},
        "project_id": "string",
        "slug": "string",
        "updated_at": "1970-01-01T00:00:00.000Z"
      },
      "survey_id": "string",
      "updated_at": "1970-01-01T00:00:00.000Z",
      "yes_node": {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey": {},
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    }
  },
  "success": true
}

Surveys

List survey responses

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

Required API key scope: surveys:view.

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

Authorizations

x-api-key (header)required

Request examples show the credential location. Use a server-side key with the permissions required by this operation.

Path parameters

idstringpathrequired

Query parameters

pagestringquery
per_pagestringquery

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

GET /api/v1/surveys/{id}/responses
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/surveys/{id}/responses' \
  --header 'x-api-key: <api-key>'
Response · 200
{
  "data": {
    "page": 0,
    "per_page": 0,
    "responses": [
      {
        "answers": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "external_user_id": "string",
        "fingerprint": "string",
        "id": "string",
        "metadata": {},
        "survey": {},
        "survey_id": "string"
      }
    ],
    "total": 0
  },
  "success": true
}

Surveys

Submit survey response

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

POST/portal/surveys/{id}/responses

Authorizations

None

No management API key is required. Supply the project context and any customer credential listed in this operation.

Path parameters

idstringpathrequired

Body

application/json
answersarrayrequired
external_user_idstring
fingerprintstringrequired
metadataobject

Responses

201

Created

400

Bad Request

POST /portal/surveys/{id}/responses
curl --request POST \
  --url 'https://api.appgram.dev/portal/surveys/{id}/responses' \
  --header 'Content-Type: application/json' \
  --data '{
  "answers": [
    {
      "answer": "string",
      "answer_options": [
        "string"
      ],
      "answer_text": "string",
      "node_id": "string"
    }
  ],
  "external_user_id": "string",
  "fingerprint": "string",
  "metadata": {}
}'
Response · 201
{
  "data": {
    "created_at": "1970-01-01T00:00:00.000Z",
    "id": "string",
    "survey_id": "string"
  },
  "success": true
}

Surveys

Get a survey to answer

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

GET/portal/surveys/{slug}

Authorizations

None

No management API key is required. Supply the project context and any customer credential listed in this operation.

Path parameters

slugstringpathrequired

Query parameters

project_idstringquery

Responses

200

OK

400

Bad Request

404

Not Found

GET /portal/surveys/{slug}
curl --request GET \
  --url 'https://api.appgram.dev/portal/surveys/{slug}?project_id=<project_id>'
Response · 200
{
  "data": {
    "created_at": "1970-01-01T00:00:00.000Z",
    "description": "string",
    "id": "string",
    "is_active": true,
    "name": "string",
    "nodes": [
      {
        "answer_no_node_id": "string",
        "answer_yes_node_id": "string",
        "branches": [],
        "children": [],
        "created_at": "1970-01-01T00:00:00.000Z",
        "id": "string",
        "is_required": true,
        "max_rating": 0,
        "min_rating": 0,
        "next_node_id": "string",
        "no_node": {},
        "options": [],
        "parent_id": "string",
        "question": "string",
        "question_type": "checkboxes",
        "result_message": "string",
        "sort_order": 0,
        "survey_id": "string",
        "updated_at": "1970-01-01T00:00:00.000Z",
        "yes_node": {}
      }
    ],
    "number_of_questions": 0,
    "project_id": "string",
    "slug": "string",
    "updated_at": "1970-01-01T00:00:00.000Z"
  },
  "success": true
}
—