PushizoDocs
API reference

Surveys and NPS

Surveys and NPS — 10 operations (GET /v1/apps/{appId}/surveys, POST /v1/apps/{appId}/surveys, GET /v1/apps/{appId}/surveys/{surveyId}, …). Generated from the OpenAPI 3.1.0 contract.

Surveys and NPS/CSAT: definition, status, responses, report and server-side responses; the NPS score is written to a user property and can be used in segments.

Base URL: https://api.pushizo.com · Tag: surveys · Interactive docs (Scalar)

Operations

MethodPathOperation
GET/v1/apps/{appId}/surveysSurveys
POST/v1/apps/{appId}/surveysCreate a survey (draft)
GET/v1/apps/{appId}/surveys/{surveyId}Survey details
PATCH/v1/apps/{appId}/surveys/{surveyId}Update a survey (the linked in-app message is refreshed)
DELETE/v1/apps/{appId}/surveys/{surveyId}Delete a survey (along with its responses and the linked in-app message)
POST/v1/apps/{appId}/surveys/{surveyId}/statusActivate / close
POST/v1/apps/{appId}/surveys/{surveyId}/distribute/in-appIn-app distribution: turn the survey into an HTML in-app message (create/update, optionally publish)
GET/v1/apps/{appId}/surveys/{surveyId}/reportNPS / CSAT report
GET/v1/apps/{appId}/surveys/{surveyId}/responsesSurvey responses
POST/v1/apps/{appId}/surveys/{surveyId}/responsesServer-side survey response (linked to the user via external_id)

Details

Surveys

GET/v1/apps/{appId}/surveysTry it (interactive API docs, new tab)

Authentication: API key — scope analytics:read (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
limitqueryintegerNoDefault: 50; Range: 1–20050
cursorquerystringNoLength: 1–∞"eyJpZCI6Im1zZ18wMUpE…"
statusqueryenumNoValues: "draft", "active", "closed""draft"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SurveyPage

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].app_idstringYes
data[].namestringYes
data[].statusenumYesValues: "draft", "active", "closed"
data[].questionsarray<object>YesItems: 1–10
data[].questions[].idstringYes
data[].questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
data[].questions[].textmap<string, string>Yes
data[].questions[].requiredbooleanNo
data[].questions[].optionsarray<object>NoItems: 0–30
data[].questions[].low_labelmap<string, string>No
data[].questions[].high_labelmap<string, string>No
data[].questions[].placeholdermap<string, string>No
data[].settingsobjectYes
data[].settings.thank_youmap<string, string>No
data[].settings.submit_labelmap<string, string>No
data[].settings.write_propertiesbooleanNo
data[].settings.allow_multiplebooleanNo
data[].settings.default_languagestringNoLength: 2–10
data[].in_app_message_idstring | nullYes
data[].statsobjectYes
data[].stats.responsesintegerYes
data[].stats.npsnumber | nullYes
data[].stats.last_response_atstring | nullYes
data[].created_atstringYes
data[].updated_atstringYes
next_cursorstring | nullYes
has_morebooleanYes

Example response:

{
  "data": [
    {
      "name": "Sipariş bildirimleri",
      "status": "draft",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "questions": [
        {
          "type": "nps",
          "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
          "text": {},
          "required": true,
          "options": []
        }
      ],
      "settings": {
        "thank_you": {
          "tr": "Siparişiniz yola çıktı",
          "en": "Your order has shipped"
        },
        "submit_label": {
          "tr": "Siparişiniz yola çıktı",
          "en": "Your order has shipped"
        }
      },
      "in_app_message_id": "msg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "stats": {
        "responses": 1,
        "nps": 1.5,
        "last_response_at": "örnek"
      },
      "created_at": "örnek",
      "updated_at": "örnek"
    }
  ],
  "next_cursor": "eyJpZCI6Im1zZ18wMUpE…",
  "has_more": true
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X GET "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys?limit=50" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY"

Create a survey (draft)

POST/v1/apps/{appId}/surveysTry it (interactive API docs, new tab)

Authentication: API key — scope admin (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: CreateSurveyDto

FieldTypeRequiredDescription
namestringYesLength: 2–100
questionsarray<object>YesItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectNo
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10

Example:

{
  "name": "Sipariş bildirimleri",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true
  }
}

Responses

201 — Success.

Schema: Survey

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
statusenumYesValues: "draft", "active", "closed"
questionsarray<object>YesItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectYes
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10
in_app_message_idstring | nullYes
statsobjectYes
stats.responsesintegerYes
stats.npsnumber | nullYes
stats.last_response_atstring | nullYes
created_atstringYes
updated_atstringYes

Example response:

{
  "name": "Sipariş bildirimleri",
  "status": "draft",
  "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "high_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true,
    "allow_multiple": false
  },
  "in_app_message_id": "msg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "stats": {
    "responses": 1,
    "nps": 1.5,
    "last_response_at": "örnek"
  },
  "created_at": "örnek",
  "updated_at": "örnek"
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X POST "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Sipariş bildirimleri",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true
  }
}'

Survey details

GET/v1/apps/{appId}/surveys/{surveyId}Try it (interactive API docs, new tab)

Authentication: API key — scope analytics:read (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Survey

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
statusenumYesValues: "draft", "active", "closed"
questionsarray<object>YesItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectYes
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10
in_app_message_idstring | nullYes
statsobjectYes
stats.responsesintegerYes
stats.npsnumber | nullYes
stats.last_response_atstring | nullYes
created_atstringYes
updated_atstringYes

Example response:

{
  "name": "Sipariş bildirimleri",
  "status": "draft",
  "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "high_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true,
    "allow_multiple": false
  },
  "in_app_message_id": "msg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "stats": {
    "responses": 1,
    "nps": 1.5,
    "last_response_at": "örnek"
  },
  "created_at": "örnek",
  "updated_at": "örnek"
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X GET "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY"

Update a survey (the linked in-app message is refreshed)

PATCH/v1/apps/{appId}/surveys/{surveyId}Try it (interactive API docs, new tab)

Authentication: API key — scope admin (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: UpdateSurveyDto

FieldTypeRequiredDescription
namestringNoLength: 2–100
questionsarray<object>NoItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectNo
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10

Example:

{
  "name": "Sipariş bildirimleri",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true
  }
}

Responses

200 — Success.

Schema: Survey

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
statusenumYesValues: "draft", "active", "closed"
questionsarray<object>YesItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectYes
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10
in_app_message_idstring | nullYes
statsobjectYes
stats.responsesintegerYes
stats.npsnumber | nullYes
stats.last_response_atstring | nullYes
created_atstringYes
updated_atstringYes

Example response:

{
  "name": "Sipariş bildirimleri",
  "status": "draft",
  "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "high_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true,
    "allow_multiple": false
  },
  "in_app_message_id": "msg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "stats": {
    "responses": 1,
    "nps": 1.5,
    "last_response_at": "örnek"
  },
  "created_at": "örnek",
  "updated_at": "örnek"
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X PATCH "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Sipariş bildirimleri",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true
  }
}'

Delete a survey (along with its responses and the linked in-app message)

DELETE/v1/apps/{appId}/surveys/{surveyId}Try it (interactive API docs, new tab)

Authentication: API key — scope admin (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Ok

FieldTypeRequiredDescription
oktrueYes

Example response:

{
  "ok": true
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X DELETE "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY"

Activate / close

POST/v1/apps/{appId}/surveys/{surveyId}/statusTry it (interactive API docs, new tab)

Authentication: API key — scope admin (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: SurveyStatusDto

FieldTypeRequiredDescription
statusenumYesValues: "draft", "active", "closed"

Example:

{
  "status": "draft"
}

Responses

200 — Success.

Schema: Survey

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
statusenumYesValues: "draft", "active", "closed"
questionsarray<object>YesItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectYes
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10
in_app_message_idstring | nullYes
statsobjectYes
stats.responsesintegerYes
stats.npsnumber | nullYes
stats.last_response_atstring | nullYes
created_atstringYes
updated_atstringYes

Example response:

{
  "name": "Sipariş bildirimleri",
  "status": "draft",
  "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "high_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true,
    "allow_multiple": false
  },
  "in_app_message_id": "msg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "stats": {
    "responses": 1,
    "nps": 1.5,
    "last_response_at": "örnek"
  },
  "created_at": "örnek",
  "updated_at": "örnek"
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X POST "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W/status" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "draft"
}'

In-app distribution: turn the survey into an HTML in-app message (create/update, optionally publish)

POST/v1/apps/{appId}/surveys/{surveyId}/distribute/in-appTry it (interactive API docs, new tab)

Authentication: API key — scope admin (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: SurveyInAppDto

FieldTypeRequiredDescription
triggersarray<object>NoItems: 1–5
audienceobjectNo
audience.included_segmentsarray<string>NoItems: 0–20
audience.excluded_segmentsarray<string>NoItems: 0–20
audience.global_control_exemptbooleanNo
frequencyobjectNo
frequency.max_impressionsintegerNoRange: 1–1000
frequency.min_interval_secondsintegerNoRange: 0–31536000
frequency.stop_after_interactionbooleanNo
layoutenumNoValues: "modal", "banner_bottom", "fullscreen"
publishbooleanNo

Example:

{
  "triggers": [
    {
      "kind": "session_start"
    }
  ],
  "audience": {
    "included_segments": [
      "örnek"
    ],
    "excluded_segments": [
      "örnek"
    ],
    "global_control_exempt": true
  },
  "frequency": {
    "max_impressions": 1,
    "min_interval_seconds": 1,
    "stop_after_interaction": true
  },
  "layout": "modal",
  "publish": true
}

Responses

200 — Success.

Schema: Survey

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
statusenumYesValues: "draft", "active", "closed"
questionsarray<object>YesItems: 1–10
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].textmap<string, string>Yes
questions[].requiredbooleanNo
questions[].optionsarray<object>NoItems: 0–30
questions[].options[].valuestringYesLength: 1–100
questions[].options[].labelmap<string, string>Yes
questions[].low_labelmap<string, string>No
questions[].high_labelmap<string, string>No
questions[].placeholdermap<string, string>No
settingsobjectYes
settings.thank_youmap<string, string>No
settings.submit_labelmap<string, string>No
settings.write_propertiesbooleanNo
settings.allow_multiplebooleanNo
settings.default_languagestringNoLength: 2–10
in_app_message_idstring | nullYes
statsobjectYes
stats.responsesintegerYes
stats.npsnumber | nullYes
stats.last_response_atstring | nullYes
created_atstringYes
updated_atstringYes

Example response:

{
  "name": "Sipariş bildirimleri",
  "status": "draft",
  "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "text": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "required": true,
      "options": [
        {
          "value": "user_42",
          "label": {}
        }
      ],
      "low_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      },
      "high_label": {
        "tr": "Siparişiniz yola çıktı",
        "en": "Your order has shipped"
      }
    }
  ],
  "settings": {
    "thank_you": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "submit_label": {
      "tr": "Siparişiniz yola çıktı",
      "en": "Your order has shipped"
    },
    "write_properties": true,
    "allow_multiple": false
  },
  "in_app_message_id": "msg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "stats": {
    "responses": 1,
    "nps": 1.5,
    "last_response_at": "örnek"
  },
  "created_at": "örnek",
  "updated_at": "örnek"
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X POST "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W/distribute/in-app" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "triggers": [
    {
      "kind": "session_start"
    }
  ],
  "audience": {
    "included_segments": [
      "örnek"
    ],
    "excluded_segments": [
      "örnek"
    ],
    "global_control_exempt": true
  },
  "frequency": {
    "max_impressions": 1,
    "min_interval_seconds": 1,
    "stop_after_interaction": true
  },
  "layout": "modal",
  "publish": true
}'

NPS / CSAT report

GET/v1/apps/{appId}/surveys/{surveyId}/reportTry it (interactive API docs, new tab)

Authentication: API key — scope analytics:read (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
daysqueryintegerNoRange: 1–3651
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SurveyReport

FieldTypeRequiredDescription
survey_idstringYes
daysintegerYes
responsesintegerYes
npsobjectYes
nps.responsesintegerYes
nps.promotersintegerYes
nps.passivesintegerYes
nps.detractorsintegerYes
nps.npsnumber | nullYes
csatobjectYes
csat.responsesintegerYes
csat.averagenumber | nullYes
csat.distributionmap<string, integer>Yes
trendarray<object>Yes
trend[].datestringYes
trend[].responsesintegerYes
trend[].promotersintegerYes
trend[].passivesintegerYes
trend[].detractorsintegerYes
trend[].npsnumber | nullYes
channelsmap<string, integer>Yes
questionsarray<object>Yes
questions[].idstringYes
questions[].typeenumYesValues: "nps", "csat", "single_choice", "multiple_choice", "text"
questions[].countsmap<string, integer>Yes

Example response:

{
  "channels": {
    "key": 150
  },
  "survey_id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "days": 1,
  "responses": 1,
  "nps": {
    "responses": 1,
    "promoters": 1,
    "passives": 1,
    "detractors": 1,
    "nps": 1.5
  },
  "csat": {
    "responses": 1,
    "average": 1.5,
    "distribution": {
      "key": 150
    }
  },
  "trend": [
    {
      "date": "örnek",
      "responses": 1,
      "promoters": 1,
      "passives": 1,
      "detractors": 1,
      "nps": 1.5
    }
  ],
  "questions": [
    {
      "type": "nps",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "counts": {
        "key": 150
      }
    }
  ]
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X GET "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W/report" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY"

Survey responses

GET/v1/apps/{appId}/surveys/{surveyId}/responsesTry it (interactive API docs, new tab)

Authentication: API key — scope users:read (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
limitqueryintegerNoDefault: 50; Range: 1–20050
cursorquerystringNoLength: 1–∞"eyJpZCI6Im1zZ18wMUpE…"
text_questionquerystringNoLength: 0–40"örnek"
nps_categoryqueryenumNoValues: "promoter", "passive", "detractor""promoter"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SurveyResponsePage

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].survey_idstringYes
data[].user_idstring | nullYes
data[].visitor_idstring | nullYes
data[].channelenumYesValues: "in_app", "web", "email", "api", "sdk"
data[].answersmap<string, number | string | array<string>>Yes
data[].nps_scoreinteger | nullYes
data[].nps_categoryenum | nullYes
data[].csat_scoreinteger | nullYes
data[].created_atstringYes
next_cursorstring | nullYes
has_morebooleanYes

Example response:

{
  "data": [
    {
      "channel": "in_app",
      "id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "survey_id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "user_id": "usr_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "visitor_id": "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W",
      "answers": {
        "key": 149.9
      },
      "nps_score": 1,
      "nps_category": "promoter",
      "csat_score": 1,
      "created_at": "örnek"
    }
  ],
  "next_cursor": "eyJpZCI6Im1zZ18wMUpE…",
  "has_more": true
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X GET "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W/responses?limit=50" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY"

Server-side survey response (linked to the user via external_id)

POST/v1/apps/{appId}/surveys/{surveyId}/responsesTry it (interactive API docs, new tab)

Authentication: API key — scope users:write (admin includes every scope).

Parameters

NameInTypeRequiredDescriptionExample
surveyIdpathstringYes"srv_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: PublicSurveyResponseDto

FieldTypeRequiredDescription
answersmap<string, string | boolean | number | array<string>>Yes
external_idstringNoLength: 1–128

Example:

{
  "answers": {
    "key": "user_42"
  },
  "external_id": "user_42"
}

Responses

201 — Success.

Schema: SurveyResponseResult

FieldTypeRequiredDescription
oktrueYes
response_idstring | nullYes
duplicatebooleanYes
thank_youstringYes

Example response:

{
  "ok": true,
  "response_id": "srs_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "duplicate": true,
  "thank_you": "örnek"
}

Errors use the common envelope (error.code, message, details, request_id): error catalog. Every response carries X-RateLimit-* headers (rate limits).

Examples

curl -X POST "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/surveys/srv_01JD3W5Q7X9K2M4N6P8R0T1V3W/responses" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "answers": {
    "key": "user_42"
  },
  "external_id": "user_42"
}'

On this page