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
| Method | Path | Operation |
|---|---|---|
GET | /v1/apps/{appId}/surveys | Surveys |
POST | /v1/apps/{appId}/surveys | Create 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}/status | Activate / close |
POST | /v1/apps/{appId}/surveys/{surveyId}/distribute/in-app | In-app distribution: turn the survey into an HTML in-app message (create/update, optionally publish) |
GET | /v1/apps/{appId}/surveys/{surveyId}/report | NPS / CSAT report |
GET | /v1/apps/{appId}/surveys/{surveyId}/responses | Survey responses |
POST | /v1/apps/{appId}/surveys/{surveyId}/responses | Server-side survey response (linked to the user via external_id) |
Details
Surveys
Authentication: API key — scope analytics:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
limit | query | integer | No | Default: 50; Range: 1–200 | 50 |
cursor | query | string | No | Length: 1–∞ | "eyJpZCI6Im1zZ18wMUpE…" |
status | query | enum | No | Values: "draft", "active", "closed" | "draft" |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SurveyPage
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].app_id | string | Yes | |
data[].name | string | Yes | |
data[].status | enum | Yes | Values: "draft", "active", "closed" |
data[].questions | array<object> | Yes | Items: 1–10 |
data[].questions[].id | string | Yes | |
data[].questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
data[].questions[].text | map<string, string> | Yes | |
data[].questions[].required | boolean | No | |
data[].questions[].options | array<object> | No | Items: 0–30 |
data[].questions[].low_label | map<string, string> | No | |
data[].questions[].high_label | map<string, string> | No | |
data[].questions[].placeholder | map<string, string> | No | |
data[].settings | object | Yes | |
data[].settings.thank_you | map<string, string> | No | |
data[].settings.submit_label | map<string, string> | No | |
data[].settings.write_properties | boolean | No | |
data[].settings.allow_multiple | boolean | No | |
data[].settings.default_language | string | No | Length: 2–10 |
data[].in_app_message_id | string | null | Yes | |
data[].stats | object | Yes | |
data[].stats.responses | integer | Yes | |
data[].stats.nps | number | null | Yes | |
data[].stats.last_response_at | string | null | Yes | |
data[].created_at | string | Yes | |
data[].updated_at | string | Yes | |
next_cursor | string | null | Yes | |
has_more | boolean | Yes |
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)
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: CreateSurveyDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Length: 2–100 |
questions | array<object> | Yes | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | No | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
status | enum | Yes | Values: "draft", "active", "closed" |
questions | array<object> | Yes | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | Yes | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 2–10 |
in_app_message_id | string | null | Yes | |
stats | object | Yes | |
stats.responses | integer | Yes | |
stats.nps | number | null | Yes | |
stats.last_response_at | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
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
Authentication: API key — scope analytics:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: Survey
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
status | enum | Yes | Values: "draft", "active", "closed" |
questions | array<object> | Yes | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | Yes | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 2–10 |
in_app_message_id | string | null | Yes | |
stats | object | Yes | |
stats.responses | integer | Yes | |
stats.nps | number | null | Yes | |
stats.last_response_at | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
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)
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: UpdateSurveyDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Length: 2–100 |
questions | array<object> | No | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | No | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
status | enum | Yes | Values: "draft", "active", "closed" |
questions | array<object> | Yes | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | Yes | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 2–10 |
in_app_message_id | string | null | Yes | |
stats | object | Yes | |
stats.responses | integer | Yes | |
stats.nps | number | null | Yes | |
stats.last_response_at | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
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)
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: Ok
| Field | Type | Required | Description |
|---|---|---|---|
ok | true | Yes |
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
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: SurveyStatusDto
| Field | Type | Required | Description |
|---|---|---|---|
status | enum | Yes | Values: "draft", "active", "closed" |
Example:
{
"status": "draft"
}Responses
200 — Success.
Schema: Survey
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
status | enum | Yes | Values: "draft", "active", "closed" |
questions | array<object> | Yes | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | Yes | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 2–10 |
in_app_message_id | string | null | Yes | |
stats | object | Yes | |
stats.responses | integer | Yes | |
stats.nps | number | null | Yes | |
stats.last_response_at | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
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)
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: SurveyInAppDto
| Field | Type | Required | Description |
|---|---|---|---|
triggers | array<object> | No | Items: 1–5 |
audience | object | No | |
audience.included_segments | array<string> | No | Items: 0–20 |
audience.excluded_segments | array<string> | No | Items: 0–20 |
audience.global_control_exempt | boolean | No | |
frequency | object | No | |
frequency.max_impressions | integer | No | Range: 1–1000 |
frequency.min_interval_seconds | integer | No | Range: 0–31536000 |
frequency.stop_after_interaction | boolean | No | |
layout | enum | No | Values: "modal", "banner_bottom", "fullscreen" |
publish | boolean | No |
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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
status | enum | Yes | Values: "draft", "active", "closed" |
questions | array<object> | Yes | Items: 1–10 |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].text | map<string, string> | Yes | |
questions[].required | boolean | No | |
questions[].options | array<object> | No | Items: 0–30 |
questions[].options[].value | string | Yes | Length: 1–100 |
questions[].options[].label | map<string, string> | Yes | |
questions[].low_label | map<string, string> | No | |
questions[].high_label | map<string, string> | No | |
questions[].placeholder | map<string, string> | No | |
settings | object | Yes | |
settings.thank_you | map<string, string> | No | |
settings.submit_label | map<string, string> | No | |
settings.write_properties | boolean | No | |
settings.allow_multiple | boolean | No | |
settings.default_language | string | No | Length: 2–10 |
in_app_message_id | string | null | Yes | |
stats | object | Yes | |
stats.responses | integer | Yes | |
stats.nps | number | null | Yes | |
stats.last_response_at | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
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
Authentication: API key — scope analytics:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
days | query | integer | No | Range: 1–365 | 1 |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SurveyReport
| Field | Type | Required | Description |
|---|---|---|---|
survey_id | string | Yes | |
days | integer | Yes | |
responses | integer | Yes | |
nps | object | Yes | |
nps.responses | integer | Yes | |
nps.promoters | integer | Yes | |
nps.passives | integer | Yes | |
nps.detractors | integer | Yes | |
nps.nps | number | null | Yes | |
csat | object | Yes | |
csat.responses | integer | Yes | |
csat.average | number | null | Yes | |
csat.distribution | map<string, integer> | Yes | |
trend | array<object> | Yes | |
trend[].date | string | Yes | |
trend[].responses | integer | Yes | |
trend[].promoters | integer | Yes | |
trend[].passives | integer | Yes | |
trend[].detractors | integer | Yes | |
trend[].nps | number | null | Yes | |
channels | map<string, integer> | Yes | |
questions | array<object> | Yes | |
questions[].id | string | Yes | |
questions[].type | enum | Yes | Values: "nps", "csat", "single_choice", "multiple_choice", "text" |
questions[].counts | map<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
Authentication: API key — scope users:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
limit | query | integer | No | Default: 50; Range: 1–200 | 50 |
cursor | query | string | No | Length: 1–∞ | "eyJpZCI6Im1zZ18wMUpE…" |
text_question | query | string | No | Length: 0–40 | "örnek" |
nps_category | query | enum | No | Values: "promoter", "passive", "detractor" | "promoter" |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SurveyResponsePage
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].survey_id | string | Yes | |
data[].user_id | string | null | Yes | |
data[].visitor_id | string | null | Yes | |
data[].channel | enum | Yes | Values: "in_app", "web", "email", "api", "sdk" |
data[].answers | map<string, number | string | array<string>> | Yes | |
data[].nps_score | integer | null | Yes | |
data[].nps_category | enum | null | Yes | |
data[].csat_score | integer | null | Yes | |
data[].created_at | string | Yes | |
next_cursor | string | null | Yes | |
has_more | boolean | Yes |
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)
Authentication: API key — scope users:write (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
surveyId | path | string | Yes | "srv_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: PublicSurveyResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
answers | map<string, string | boolean | number | array<string>> | Yes | |
external_id | string | No | Length: 1–128 |
Example:
{
"answers": {
"key": "user_42"
},
"external_id": "user_42"
}Responses
201 — Success.
Schema: SurveyResponseResult
| Field | Type | Required | Description |
|---|---|---|---|
ok | true | Yes | |
response_id | string | null | Yes | |
duplicate | boolean | Yes | |
thank_you | string | Yes |
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"
}'Forms
Forms — 7 operations (GET /v1/apps/{appId}/forms, POST /v1/apps/{appId}/forms, GET /v1/apps/{appId}/forms/{formId}, …). Generated from the OpenAPI 3.1.0 contract.
Landing pages
Landing pages — 10 operations (GET /v1/apps/{appId}/landing-pages, POST /v1/apps/{appId}/landing-pages, GET /v1/apps/{appId}/landing-pages/{pageId}, …). Generated from the OpenAPI 3.1.0 contract.