Segments
Segments — 34 operations (GET /v1/apps/{appId}/geofences, POST /v1/apps/{appId}/geofences, GET /v1/apps/{appId}/geofences/{geofenceId}, …). Generated from the OpenAPI 3.1.0 contract.
Dynamic/static segments, live preview with the condition AST and audience estimates.
Base URL: https://api.pushizo.com · Tag: segments · Interactive docs (Scalar)
Operations
| Method | Path | Operation |
|---|---|---|
GET | /v1/apps/{appId}/geofences | Geofences |
POST | /v1/apps/{appId}/geofences | Create a geofence |
GET | /v1/apps/{appId}/geofences/{geofenceId} | Geofence details |
PATCH | /v1/apps/{appId}/geofences/{geofenceId} | Update a geofence |
DELETE | /v1/apps/{appId}/geofences/{geofenceId} | Delete a geofence |
GET | /v1/apps/{appId}/sql/schema | SQL views and limits |
POST | /v1/apps/{appId}/sql/query | Run a read-only SQL query |
GET | /v1/apps/{appId}/sql/runs | SQL query log |
GET | /v1/apps/{appId}/sql/segments | SQL segments |
POST | /v1/apps/{appId}/sql/segments | Save the query result as a segment |
PATCH | /v1/apps/{appId}/sql/segments/{segmentId} | Update a SQL segment |
POST | /v1/apps/{appId}/sql/segments/{segmentId}/refresh | Refresh a SQL segment now |
GET | /v1/apps/{appId}/warehouse-segments/options | Warehouse segment options and limits |
GET | /v1/apps/{appId}/warehouse-segments/connections | Warehouse connections |
POST | /v1/apps/{appId}/warehouse-segments/connections | Create a warehouse connection |
GET | /v1/apps/{appId}/warehouse-segments/connections/{connectionId} | Warehouse connection details |
PATCH | /v1/apps/{appId}/warehouse-segments/connections/{connectionId} | Update a warehouse connection |
DELETE | /v1/apps/{appId}/warehouse-segments/connections/{connectionId} | Delete a warehouse connection |
POST | /v1/apps/{appId}/warehouse-segments/connections/{connectionId}/test | Test a warehouse connection |
POST | /v1/apps/{appId}/warehouse-segments/preview | Preview a warehouse query (dry run or sample) |
GET | /v1/apps/{appId}/warehouse-segments/segments | Warehouse segments |
POST | /v1/apps/{appId}/warehouse-segments/segments | Create a warehouse segment |
PATCH | /v1/apps/{appId}/warehouse-segments/segments/{segmentId} | Update a warehouse segment |
POST | /v1/apps/{appId}/warehouse-segments/segments/{segmentId}/refresh | Queue a warehouse segment refresh |
GET | /v1/apps/{appId}/warehouse-segments/runs | Warehouse query log |
GET | /v1/apps/{appId}/segments | List segments |
POST | /v1/apps/{appId}/segments | Create a segment |
POST | /v1/apps/{appId}/segments/preview | Count and sample users for a definition |
GET | /v1/apps/{appId}/segments/{segmentId} | Segment details |
PATCH | /v1/apps/{appId}/segments/{segmentId} | Update a segment |
DELETE | /v1/apps/{appId}/segments/{segmentId} | Delete a segment |
GET | /v1/apps/{appId}/segments/{segmentId}/campaigns | Campaigns that use the segment |
POST | /v1/apps/{appId}/segments/{segmentId}/refresh | Recompute static segment memberships |
POST | /v1/apps/{appId}/segments/{segmentId}/estimate | Estimated count |
Details
Geofences
Authentication: API key — scope analytics:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: GeofenceList
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].app_id | string | Yes | |
data[].name | string | Yes | |
data[].lat | number | Yes | |
data[].lng | number | Yes | |
data[].radius_m | integer | Yes | |
data[].cooldown_minutes | integer | Yes | |
data[].enabled | boolean | Yes | |
data[].enter_count | integer | Yes | |
data[].exit_count | integer | Yes | |
data[].inside_count | integer | Yes | |
data[].created_at | string | Yes | |
data[].updated_at | string | Yes |
Example response:
{
"data": [
{
"name": "Sipariş bildirimleri",
"enabled": true,
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"lat": 1.5,
"lng": 1.5,
"radius_m": 1,
"cooldown_minutes": 1,
"enter_count": 1,
"exit_count": 1,
"inside_count": 1,
"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/geofences" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Create a geofence
When a subscription that shares its location enters or leaves a geofence, geofence_enter and geofence_exit events are created.
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: CreateGeofenceDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Length: 1–100 |
lat | number | Yes | Range: -90–90 |
lng | number | Yes | Range: -180–180 |
radius_m | integer | Yes | Range: 100–50000 |
cooldown_minutes | integer | No | Range: 0–10080 |
enabled | boolean | No |
Example:
{
"name": "Sipariş bildirimleri",
"lat": 1.5,
"lng": 1.5,
"radius_m": 100,
"enabled": true,
"cooldown_minutes": 1
}Responses
201 — Success.
Schema: Geofence
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
lat | number | Yes | |
lng | number | Yes | |
radius_m | integer | Yes | |
cooldown_minutes | integer | Yes | |
enabled | boolean | Yes | |
enter_count | integer | Yes | |
exit_count | integer | Yes | |
inside_count | integer | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"enabled": true,
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"lat": 1.5,
"lng": 1.5,
"radius_m": 1,
"cooldown_minutes": 1,
"enter_count": 1,
"exit_count": 1,
"inside_count": 1,
"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/geofences" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"lat": 1.5,
"lng": 1.5,
"radius_m": 100,
"enabled": true,
"cooldown_minutes": 1
}'Geofence details
Authentication: API key — scope analytics:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
geofenceId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: Geofence
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
lat | number | Yes | |
lng | number | Yes | |
radius_m | integer | Yes | |
cooldown_minutes | integer | Yes | |
enabled | boolean | Yes | |
enter_count | integer | Yes | |
exit_count | integer | Yes | |
inside_count | integer | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"enabled": true,
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"lat": 1.5,
"lng": 1.5,
"radius_m": 1,
"cooldown_minutes": 1,
"enter_count": 1,
"exit_count": 1,
"inside_count": 1,
"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/geofences/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Update a geofence
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
geofenceId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: UpdateGeofenceDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Length: 1–100 |
lat | number | No | Range: -90–90 |
lng | number | No | Range: -180–180 |
radius_m | integer | No | Range: 100–50000 |
cooldown_minutes | integer | No | Range: 0–10080 |
enabled | boolean | No |
Example:
{
"name": "Sipariş bildirimleri",
"enabled": true,
"lat": 1.5,
"lng": 1.5,
"radius_m": 100
}Responses
200 — Success.
Schema: Geofence
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
lat | number | Yes | |
lng | number | Yes | |
radius_m | integer | Yes | |
cooldown_minutes | integer | Yes | |
enabled | boolean | Yes | |
enter_count | integer | Yes | |
exit_count | integer | Yes | |
inside_count | integer | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"enabled": true,
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"lat": 1.5,
"lng": 1.5,
"radius_m": 1,
"cooldown_minutes": 1,
"enter_count": 1,
"exit_count": 1,
"inside_count": 1,
"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/geofences/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"enabled": true,
"lat": 1.5,
"lng": 1.5,
"radius_m": 100
}'Delete a geofence
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
geofenceId | path | string | Yes | "seg_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/geofences/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"SQL views and limits
Authentication: API key — scope segments:read or users:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SqlSchema
| Field | Type | Required | Description |
|---|---|---|---|
views | array<object> | Yes | |
views[].name | string | Yes | |
views[].columns | array<object> | Yes | |
views[].columns[].name | string | Yes | |
views[].columns[].type | enum | Yes | Values: "text", "integer", "number", "boolean", "timestamp", "json" |
limits | object | Yes | |
limits.query_max | integer | Yes | |
limits.row_limit_default | integer | Yes | |
limits.row_limit_max | integer | Yes | |
limits.timeout_default_ms | integer | Yes | |
limits.timeout_max_ms | integer | Yes | |
limits.segment_max_members | integer | Yes | |
refresh_intervals | array<integer> | Yes |
Example response:
{
"views": [
{
"name": "Sipariş bildirimleri",
"columns": [
{
"name": "Sipariş bildirimleri",
"type": "text"
}
]
}
],
"limits": {
"query_max": 1,
"row_limit_default": 1,
"row_limit_max": 1,
"timeout_default_ms": 1,
"timeout_max_ms": 1,
"segment_max_members": 1
},
"refresh_intervals": [
1
]
}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/sql/schema" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Run a read-only SQL query
Authentication: API key — scope users:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: RunSqlQueryDto
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Length: 1–20000 |
row_limit | integer | No | Range: 1–5000 |
timeout_ms | integer | No | Range: 1000–30000 |
Example:
{
"query": "ayse",
"row_limit": 1,
"timeout_ms": 1000
}Responses
200 — Success.
Schema: SqlQueryResult
| Field | Type | Required | Description |
|---|---|---|---|
run_id | string | Yes | |
columns | array<object> | Yes | |
columns[].name | string | Yes | |
columns[].type | enum | "unknown" | Yes | |
rows | array<array<any>> | Yes | |
row_count | integer | Yes | |
truncated | boolean | Yes | |
duration_ms | integer | Yes |
Example response:
{
"run_id": "run_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"columns": [
{
"name": "Sipariş bildirimleri",
"type": "text"
}
],
"rows": [
[
"örnek"
]
],
"row_count": 1,
"truncated": true,
"duration_ms": 1
}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/sql/query" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "ayse",
"row_limit": 1,
"timeout_ms": 1000
}'SQL query log
Authentication: API key — scope segments:read or users:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segment_id | query | string | No | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
status | query | enum | No | Values: "ok", "rejected", "timeout", "failed" | "ok" |
limit | query | integer | No | Range: 1–100 | 50 |
cursor | query | string | No | "eyJpZCI6Im1zZ18wMUpE…" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SqlRunList
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].segment_id | string | null | Yes | |
data[].source | enum | Yes | Values: "panel", "api", "schedule" |
data[].actor_id | string | null | Yes | |
data[].query | string | Yes | |
data[].query_hash | string | Yes | |
data[].status | enum | Yes | Values: "ok", "rejected", "timeout", "failed" |
data[].reason | enum | null | Yes | |
data[].error | string | null | Yes | |
data[].row_count | integer | Yes | |
data[].truncated | boolean | Yes | |
data[].duration_ms | integer | Yes | |
data[].created_at | string | Yes | |
next_cursor | string | null | Yes | |
has_more | boolean | Yes |
Example response:
{
"data": [
{
"status": "ok",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"segment_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"source": "panel",
"actor_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"query_hash": "örnek",
"reason": "empty",
"error": "örnek",
"row_count": 1,
"truncated": true,
"duration_ms": 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/sql/runs?limit=50" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"SQL segments
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SqlSegmentList
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].app_id | string | Yes | |
data[].name | string | Yes | |
data[].description | string | null | Yes | |
data[].definition | map<string, any> | Yes | |
data[].is_dynamic | boolean | Yes | |
data[].estimated_count | integer | null | Yes | |
data[].estimated_at | string | null | Yes | |
data[].created_by | string | null | Yes | |
data[].created_at | string | Yes | |
data[].updated_at | string | Yes | |
data[].sql | object | null | Yes | |
data[].warehouse | object | null | Yes |
Example response:
{
"data": [
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}
]
}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/sql/segments" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Save the query result as a segment
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: CreateSqlSegmentDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Length: 2–100 |
description | string | null | No | |
query | string | Yes | Length: 1–20000 |
refresh_interval_minutes | integer | null | No |
Example:
{
"name": "Sipariş bildirimleri",
"query": "ayse",
"description": "Sipariş durumu güncellemeleri",
"refresh_interval_minutes": 1
}Responses
201 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/sql/segments" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"query": "ayse",
"description": "Sipariş durumu güncellemeleri",
"refresh_interval_minutes": 1
}'Update a SQL segment
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: UpdateSqlSegmentDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Length: 2–100 |
description | string | null | No | |
query | string | No | Length: 1–20000 |
refresh_interval_minutes | integer | null | No |
Example:
{
"name": "Sipariş bildirimleri",
"description": "Sipariş durumu güncellemeleri",
"query": "ayse",
"refresh_interval_minutes": 1
}Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/sql/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"description": "Sipariş durumu güncellemeleri",
"query": "ayse",
"refresh_interval_minutes": 1
}'Refresh a SQL segment now
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/sql/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W/refresh" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Warehouse segment options and limits
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: WarehouseSegmentOptions
| Field | Type | Required | Description |
|---|---|---|---|
types | array<enum> | Yes | |
id_types | array<enum> | Yes | |
snowflake_warehouse_sizes | array<enum> | Yes | |
refresh_intervals | array<integer> | Yes | |
limits | object | Yes | |
limits.query_max | integer | Yes | |
limits.timeout_default_seconds | integer | Yes | |
limits.timeout_min_seconds | integer | Yes | |
limits.timeout_max_seconds | integer | Yes | |
limits.max_rows_default | integer | Yes | |
limits.max_rows_max | integer | Yes | |
limits.max_bytes_billed_default | integer | Yes | |
limits.max_bytes_billed_min | integer | Yes | |
limits.max_bytes_billed_max | integer | Yes | |
limits.preview_sample | integer | Yes | |
limits.connections_per_app | integer | Yes |
Example response:
{
"types": [
"bigquery"
],
"id_types": [
"external_id"
],
"snowflake_warehouse_sizes": [
"X-Small"
],
"refresh_intervals": [
1
],
"limits": {
"query_max": 1,
"timeout_default_seconds": 1,
"timeout_min_seconds": 1,
"timeout_max_seconds": 1,
"max_rows_default": 1,
"max_rows_max": 1,
"max_bytes_billed_default": 1,
"max_bytes_billed_min": 1,
"max_bytes_billed_max": 1,
"preview_sample": 1,
"connections_per_app": 1
}
}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/warehouse-segments/options" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Warehouse connections
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: WarehouseSegmentConnectionList
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].app_id | string | Yes | |
data[].name | string | Yes | |
data[].type | enum | Yes | Values: "bigquery", "snowflake", "databricks" |
data[].config | map<string, any> | Yes | |
data[].credentials_hint | string | Yes | |
data[].segment_count | integer | Yes | |
data[].last_tested_at | string | null | Yes | |
data[].last_test_error | string | null | Yes | |
data[].created_at | string | Yes | |
data[].updated_at | string | Yes |
Example response:
{
"data": [
{
"name": "Sipariş bildirimleri",
"type": "bigquery",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"config": {
"key": "örnek"
},
"credentials_hint": "örnek",
"segment_count": 1,
"last_tested_at": "örnek",
"last_test_error": "ö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/warehouse-segments/connections" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Create a warehouse connection
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: CreateWarehouseConnectionDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Length: 2–100 |
type | enum | Yes | Values: "bigquery", "snowflake", "databricks" |
config | map<string, any> | Yes | |
credentials | map<string, any> | Yes |
Example:
{
"name": "Sipariş bildirimleri",
"type": "bigquery",
"config": {
"key": "örnek"
},
"credentials": {
"key": "örnek"
}
}Responses
201 — Success.
Schema: WarehouseSegmentConnection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
type | enum | Yes | Values: "bigquery", "snowflake", "databricks" |
config | map<string, any> | Yes | |
credentials_hint | string | Yes | |
segment_count | integer | Yes | |
last_tested_at | string | null | Yes | |
last_test_error | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"type": "bigquery",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"config": {
"key": "örnek"
},
"credentials_hint": "örnek",
"segment_count": 1,
"last_tested_at": "örnek",
"last_test_error": "ö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/warehouse-segments/connections" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"type": "bigquery",
"config": {
"key": "örnek"
},
"credentials": {
"key": "örnek"
}
}'Warehouse connection details
/v1/apps/{appId}/warehouse-segments/connections/{connectionId}Try it (interactive API docs, new tab)Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
connectionId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: WarehouseSegmentConnection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
type | enum | Yes | Values: "bigquery", "snowflake", "databricks" |
config | map<string, any> | Yes | |
credentials_hint | string | Yes | |
segment_count | integer | Yes | |
last_tested_at | string | null | Yes | |
last_test_error | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"type": "bigquery",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"config": {
"key": "örnek"
},
"credentials_hint": "örnek",
"segment_count": 1,
"last_tested_at": "örnek",
"last_test_error": "ö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/warehouse-segments/connections/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Update a warehouse connection
/v1/apps/{appId}/warehouse-segments/connections/{connectionId}Try it (interactive API docs, new tab)Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
connectionId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: UpdateWarehouseConnectionDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Length: 2–100 |
config | map<string, any> | No | |
credentials | map<string, any> | No |
Example:
{
"name": "Sipariş bildirimleri",
"config": {
"key": "örnek"
},
"credentials": {
"key": "örnek"
}
}Responses
200 — Success.
Schema: WarehouseSegmentConnection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
type | enum | Yes | Values: "bigquery", "snowflake", "databricks" |
config | map<string, any> | Yes | |
credentials_hint | string | Yes | |
segment_count | integer | Yes | |
last_tested_at | string | null | Yes | |
last_test_error | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"type": "bigquery",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"config": {
"key": "örnek"
},
"credentials_hint": "örnek",
"segment_count": 1,
"last_tested_at": "örnek",
"last_test_error": "ö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/warehouse-segments/connections/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"config": {
"key": "örnek"
},
"credentials": {
"key": "örnek"
}
}'Delete a warehouse connection
/v1/apps/{appId}/warehouse-segments/connections/{connectionId}Try it (interactive API docs, new tab)Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
connectionId | path | string | Yes | "seg_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/warehouse-segments/connections/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Test a warehouse connection
/v1/apps/{appId}/warehouse-segments/connections/{connectionId}/testTry it (interactive API docs, new tab)Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
connectionId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: WarehouseSegmentConnectionTest
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
error | object | null | Yes |
Example response:
{
"ok": true,
"error": {
"code": "örnek",
"message": "Takip bağlantısı içeride"
}
}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/warehouse-segments/connections/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W/test" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Preview a warehouse query (dry run or sample)
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: PreviewWarehouseQueryDto
| Field | Type | Required | Description |
|---|---|---|---|
connection_id | string | Yes | Length: 1–∞ |
query | string | Yes | Length: 1–20000 |
id_column | string | Yes | |
id_type | enum | No | Values: "external_id", "user_id" |
limits | object | No | |
limits.timeout_seconds | integer | No | Range: 10–600 |
limits.max_rows | integer | No | Range: 1–1000000 |
limits.max_bytes_billed | integer | No | Range: 10485760–10995116277760 |
limits.max_warehouse_size | enum | null | No | |
mode | enum | No | Values: "dry_run", "sample" |
Example:
{
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "değer",
"id_type": "external_id",
"limits": {
"timeout_seconds": 10,
"max_rows": 1,
"max_bytes_billed": 10485760
},
"mode": "dry_run"
}Responses
200 — Success.
Schema: WarehouseSegmentPreview
| Field | Type | Required | Description |
|---|---|---|---|
run_id | string | Yes | |
mode | enum | Yes | Values: "dry_run", "sample" |
estimated_bytes | number | null | Yes | |
max_bytes_billed | number | null | Yes | |
within_limit | boolean | Yes | |
sample | array<string> | null | Yes | |
sample_truncated | boolean | Yes | |
sample_matched | integer | null | Yes | |
duration_ms | integer | Yes |
Example response:
{
"run_id": "run_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"mode": "dry_run",
"estimated_bytes": 1.5,
"max_bytes_billed": 1.5,
"within_limit": true,
"sample": [
"örnek"
],
"sample_truncated": true,
"sample_matched": 1,
"duration_ms": 1
}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/warehouse-segments/preview" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "değer",
"id_type": "external_id",
"limits": {
"timeout_seconds": 10,
"max_rows": 1,
"max_bytes_billed": 10485760
},
"mode": "dry_run"
}'Warehouse segments
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: WarehouseSegmentList
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].app_id | string | Yes | |
data[].name | string | Yes | |
data[].description | string | null | Yes | |
data[].definition | map<string, any> | Yes | |
data[].is_dynamic | boolean | Yes | |
data[].estimated_count | integer | null | Yes | |
data[].estimated_at | string | null | Yes | |
data[].created_by | string | null | Yes | |
data[].created_at | string | Yes | |
data[].updated_at | string | Yes | |
data[].sql | object | null | Yes | |
data[].warehouse | object | null | Yes |
Example response:
{
"data": [
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}
]
}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/warehouse-segments/segments" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Create a warehouse segment
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: CreateWarehouseSegmentDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Length: 2–100 |
description | string | null | No | |
connection_id | string | Yes | Length: 1–∞ |
query | string | Yes | Length: 1–20000 |
id_column | string | Yes | |
id_type | enum | No | Values: "external_id", "user_id" |
refresh_interval_minutes | integer | null | No | |
limits | object | No | |
limits.timeout_seconds | integer | No | Range: 10–600 |
limits.max_rows | integer | No | Range: 1–1000000 |
limits.max_bytes_billed | integer | No | Range: 10485760–10995116277760 |
limits.max_warehouse_size | enum | null | No |
Example:
{
"name": "Sipariş bildirimleri",
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "değer",
"description": "Sipariş durumu güncellemeleri",
"id_type": "external_id",
"refresh_interval_minutes": 1,
"limits": {
"timeout_seconds": 10,
"max_rows": 1,
"max_bytes_billed": 10485760
}
}Responses
201 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/warehouse-segments/segments" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "değer",
"description": "Sipariş durumu güncellemeleri",
"id_type": "external_id",
"refresh_interval_minutes": 1,
"limits": {
"timeout_seconds": 10,
"max_rows": 1,
"max_bytes_billed": 10485760
}
}'Update a warehouse segment
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
Schema: UpdateWarehouseSegmentDto
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Length: 2–100 |
description | string | null | No | |
connection_id | string | No | Length: 1–∞ |
query | string | No | Length: 1–20000 |
id_column | string | No | |
id_type | enum | No | Values: "external_id", "user_id" |
refresh_interval_minutes | integer | null | No | |
limits | object | No | |
limits.timeout_seconds | integer | No | Range: 10–600 |
limits.max_rows | integer | No | Range: 1–1000000 |
limits.max_bytes_billed | integer | No | Range: 10485760–10995116277760 |
limits.max_warehouse_size | enum | null | No |
Example:
{
"name": "Sipariş bildirimleri",
"description": "Sipariş durumu güncellemeleri",
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "değer"
}Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/warehouse-segments/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"description": "Sipariş durumu güncellemeleri",
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "değer"
}'Queue a warehouse segment refresh
/v1/apps/{appId}/warehouse-segments/segments/{segmentId}/refreshTry it (interactive API docs, new tab)Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
202 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/warehouse-segments/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W/refresh" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Warehouse query log
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segment_id | query | string | No | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
connection_id | query | string | No | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
status | query | enum | No | Values: "ok", "rejected", "timeout", "failed" | "ok" |
limit | query | integer | No | Range: 1–100 | 50 |
cursor | query | string | No | "eyJpZCI6Im1zZ18wMUpE…" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: WarehouseSegmentRunList
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].segment_id | string | null | Yes | |
data[].connection_id | string | null | Yes | |
data[].warehouse_type | enum | Yes | Values: "bigquery", "snowflake", "databricks" |
data[].source | enum | Yes | Values: "panel", "api", "schedule" |
data[].actor_id | string | null | Yes | |
data[].query | string | Yes | |
data[].query_hash | string | Yes | |
data[].status | enum | Yes | Values: "ok", "rejected", "timeout", "failed" |
data[].reason | enum | null | Yes | |
data[].error | string | null | Yes | |
data[].row_count | integer | Yes | |
data[].matched_count | integer | null | Yes | |
data[].bytes_processed | number | null | Yes | |
data[].truncated | boolean | Yes | |
data[].duration_ms | integer | Yes | |
data[].created_at | string | Yes | |
next_cursor | string | null | Yes | |
has_more | boolean | Yes |
Example response:
{
"data": [
{
"status": "ok",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"segment_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"warehouse_type": "bigquery",
"source": "panel",
"actor_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"query_hash": "örnek",
"reason": "empty",
"error": "örnek",
"row_count": 1,
"matched_count": 1,
"bytes_processed": 1.5,
"truncated": true,
"duration_ms": 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/warehouse-segments/runs?limit=50" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"List segments
Authentication: API key — scope segments: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…" |
q | query | string | No | Length: 1–100 | "ayse" |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SegmentPage
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].app_id | string | Yes | |
data[].name | string | Yes | |
data[].description | string | null | Yes | |
data[].definition | map<string, any> | Yes | |
data[].is_dynamic | boolean | Yes | |
data[].estimated_count | integer | null | Yes | |
data[].estimated_at | string | null | Yes | |
data[].created_by | string | null | Yes | |
data[].created_at | string | Yes | |
data[].updated_at | string | Yes | |
data[].sql | object | null | Yes | |
data[].warehouse | object | null | Yes | |
next_cursor | string | null | Yes | |
has_more | boolean | Yes |
Example response:
{
"data": [
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}
],
"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/segments?limit=50" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Create a segment
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)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Length: 2–100 |
description | string | null | No | Length: 0–500 |
definition | object | Yes | Filter AST: all/any/none groups and { field, op, value } conditions (docs/plan/05 §5.7). |
definition.all | array<object> | No | |
definition.any | array<object> | No | |
definition.none | array<object> | No | |
is_dynamic | boolean | No |
Example:
{
"name": "Sipariş bildirimleri",
"definition": {
"all": [
{}
],
"any": [
{}
],
"none": [
{}
]
},
"description": "Sipariş durumu güncellemeleri",
"is_dynamic": true
}Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/segments" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"definition": {
"all": [
{}
],
"any": [
{}
],
"none": [
{}
]
},
"description": "Sipariş durumu güncellemeleri",
"is_dynamic": true
}'Count and sample users for a definition
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
definition | object | Yes | Filter AST: all/any/none groups and { field, op, value } conditions (docs/plan/05 §5.7). |
definition.all | array<object> | No | |
definition.any | array<object> | No | |
definition.none | array<object> | No | |
limit | integer | No | Range: 1–50 |
Example:
{
"definition": {
"all": [
{}
],
"any": [
{}
],
"none": [
{}
]
},
"limit": 50
}Responses
200 — Success.
Schema: SegmentPreview
| Field | Type | Required | Description |
|---|---|---|---|
subscriptions | integer | Yes | |
users | integer | Yes | |
sampled | boolean | Yes | |
sample | array<object> | Yes | |
sample[].id | string | Yes | |
sample[].external_id | string | null | Yes | |
sample[].tags | map<string, string> | Yes | |
sample[].last_active_at | string | Yes |
Example response:
{
"subscriptions": 1,
"users": 1,
"sampled": true,
"sample": [
{
"tags": {
"plan": "pro",
"city": "Istanbul"
},
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"external_id": "user_42",
"last_active_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/segments/preview" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"definition": {
"all": [
{}
],
"any": [
{}
],
"none": [
{}
]
},
"limit": 50
}'Segment details
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Update a segment
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Length: 2–100 |
description | string | null | No | Length: 0–500 |
definition | object | No | Filter AST: all/any/none groups and { field, op, value } conditions (docs/plan/05 §5.7). |
definition.all | array<object> | No | |
definition.any | array<object> | No | |
definition.none | array<object> | No | |
is_dynamic | boolean | No |
Example:
{
"name": "Sipariş bildirimleri",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"all": [
{}
],
"any": [
{}
],
"none": [
{}
]
},
"is_dynamic": true
}Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sipariş bildirimleri",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"all": [
{}
],
"any": [
{}
],
"none": [
{}
]
},
"is_dynamic": true
}'Delete a segment
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_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/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Campaigns that use the segment
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SegmentCampaigns
| Field | Type | Required | Description |
|---|---|---|---|
data | array<object> | Yes | |
data[].id | string | Yes | |
data[].name | string | Yes | |
data[].status | string | Yes | |
data[].type | string | Yes | |
data[].usage | enum | Yes | Values: "include", "exclude" |
data[].created_at | string | Yes |
Example response:
{
"data": [
{
"name": "Sipariş bildirimleri",
"type": "örnek",
"status": "örnek",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"usage": "include",
"created_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/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W/campaigns" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Recompute static segment memberships
Authentication: API key — scope admin (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: Segment
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
app_id | string | Yes | |
name | string | Yes | |
description | string | null | Yes | |
definition | map<string, any> | Yes | |
is_dynamic | boolean | Yes | |
estimated_count | integer | null | Yes | |
estimated_at | string | null | Yes | |
created_by | string | null | Yes | |
created_at | string | Yes | |
updated_at | string | Yes | |
sql | object | null | Yes | |
warehouse | object | null | Yes |
Example response:
{
"name": "Sipariş bildirimleri",
"id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"app_id": "app_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"description": "Sipariş durumu güncellemeleri",
"definition": {
"key": "örnek"
},
"is_dynamic": true,
"estimated_count": 1,
"estimated_at": "örnek",
"created_by": "örnek",
"created_at": "örnek",
"updated_at": "örnek",
"sql": {
"query": "ayse",
"refresh_interval_minutes": 1,
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek"
},
"warehouse": {
"connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"query": "ayse",
"id_column": "örnek",
"id_type": "external_id",
"limits": {
"timeout_seconds": 1,
"max_rows": 1,
"max_bytes_billed": 1.5,
"max_warehouse_size": "X-Small"
},
"refresh_interval_minutes": 1,
"refresh_state": "queued",
"refresh_requested_at": "örnek",
"refreshed_at": "örnek",
"member_count": 1,
"last_error": "örnek",
"bytes_processed": 1.5
}
}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/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W/refresh" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Estimated count
Authentication: API key — scope segments:read (admin includes every scope).
Parameters
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
segmentId | path | string | Yes | "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" | |
force | query | enum | No | true: skip the cache, full count. Values: "true", "false" | "true" |
appId | path | string | Yes | "app_01JD3W5Q7X9K2M4N6P8R0T1V3W" |
Responses
200 — Success.
Schema: SegmentEstimate
| Field | Type | Required | Description |
|---|---|---|---|
segment_id | string | null | Yes | |
subscriptions | integer | Yes | |
users | integer | Yes | |
estimated_at | string | Yes | |
cached | boolean | Yes | |
sampled | boolean | Yes |
Example response:
{
"subscriptions": 1,
"segment_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
"users": 1,
"estimated_at": "örnek",
"cached": true,
"sampled": 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 POST "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/segments/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W/estimate" \
-H "Authorization: Bearer $PUSHIZO_API_KEY"Event definitions
Event definitions — 4 operations (GET /v1/apps/{appId}/events/definitions, GET /v1/apps/{appId}/events/definitions/{name}, PATCH /v1/apps/{appId}/events/definitions/{name}, …). Generated from the OpenAPI 3.1.0 contract.
Templates
Templates — 10 operations (GET /v1/apps/{appId}/templates, POST /v1/apps/{appId}/templates, GET /v1/apps/{appId}/templates/{templateId}, …). Generated from the OpenAPI 3.1.0 contract.