PushizoDocs
API reference

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

MethodPathOperation
GET/v1/apps/{appId}/geofencesGeofences
POST/v1/apps/{appId}/geofencesCreate 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/schemaSQL views and limits
POST/v1/apps/{appId}/sql/queryRun a read-only SQL query
GET/v1/apps/{appId}/sql/runsSQL query log
GET/v1/apps/{appId}/sql/segmentsSQL segments
POST/v1/apps/{appId}/sql/segmentsSave the query result as a segment
PATCH/v1/apps/{appId}/sql/segments/{segmentId}Update a SQL segment
POST/v1/apps/{appId}/sql/segments/{segmentId}/refreshRefresh a SQL segment now
GET/v1/apps/{appId}/warehouse-segments/optionsWarehouse segment options and limits
GET/v1/apps/{appId}/warehouse-segments/connectionsWarehouse connections
POST/v1/apps/{appId}/warehouse-segments/connectionsCreate 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}/testTest a warehouse connection
POST/v1/apps/{appId}/warehouse-segments/previewPreview a warehouse query (dry run or sample)
GET/v1/apps/{appId}/warehouse-segments/segmentsWarehouse segments
POST/v1/apps/{appId}/warehouse-segments/segmentsCreate a warehouse segment
PATCH/v1/apps/{appId}/warehouse-segments/segments/{segmentId}Update a warehouse segment
POST/v1/apps/{appId}/warehouse-segments/segments/{segmentId}/refreshQueue a warehouse segment refresh
GET/v1/apps/{appId}/warehouse-segments/runsWarehouse query log
GET/v1/apps/{appId}/segmentsList segments
POST/v1/apps/{appId}/segmentsCreate a segment
POST/v1/apps/{appId}/segments/previewCount 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}/campaignsCampaigns that use the segment
POST/v1/apps/{appId}/segments/{segmentId}/refreshRecompute static segment memberships
POST/v1/apps/{appId}/segments/{segmentId}/estimateEstimated count

Details

Geofences

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: GeofenceList

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].app_idstringYes
data[].namestringYes
data[].latnumberYes
data[].lngnumberYes
data[].radius_mintegerYes
data[].cooldown_minutesintegerYes
data[].enabledbooleanYes
data[].enter_countintegerYes
data[].exit_countintegerYes
data[].inside_countintegerYes
data[].created_atstringYes
data[].updated_atstringYes

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

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

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

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: CreateGeofenceDto

FieldTypeRequiredDescription
namestringYesLength: 1–100
latnumberYesRange: -90–90
lngnumberYesRange: -180–180
radius_mintegerYesRange: 100–50000
cooldown_minutesintegerNoRange: 0–10080
enabledbooleanNo

Example:

{
  "name": "Sipariş bildirimleri",
  "lat": 1.5,
  "lng": 1.5,
  "radius_m": 100,
  "enabled": true,
  "cooldown_minutes": 1
}

Responses

201 — Success.

Schema: Geofence

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
latnumberYes
lngnumberYes
radius_mintegerYes
cooldown_minutesintegerYes
enabledbooleanYes
enter_countintegerYes
exit_countintegerYes
inside_countintegerYes
created_atstringYes
updated_atstringYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
geofenceIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Geofence

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
latnumberYes
lngnumberYes
radius_mintegerYes
cooldown_minutesintegerYes
enabledbooleanYes
enter_countintegerYes
exit_countintegerYes
inside_countintegerYes
created_atstringYes
updated_atstringYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
geofenceIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: UpdateGeofenceDto

FieldTypeRequiredDescription
namestringNoLength: 1–100
latnumberNoRange: -90–90
lngnumberNoRange: -180–180
radius_mintegerNoRange: 100–50000
cooldown_minutesintegerNoRange: 0–10080
enabledbooleanNo

Example:

{
  "name": "Sipariş bildirimleri",
  "enabled": true,
  "lat": 1.5,
  "lng": 1.5,
  "radius_m": 100
}

Responses

200 — Success.

Schema: Geofence

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
latnumberYes
lngnumberYes
radius_mintegerYes
cooldown_minutesintegerYes
enabledbooleanYes
enter_countintegerYes
exit_countintegerYes
inside_countintegerYes
created_atstringYes
updated_atstringYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
geofenceIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Ok

FieldTypeRequiredDescription
oktrueYes

Example response:

{
  "ok": true
}

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

Examples

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

SQL views and limits

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SqlSchema

FieldTypeRequiredDescription
viewsarray<object>Yes
views[].namestringYes
views[].columnsarray<object>Yes
views[].columns[].namestringYes
views[].columns[].typeenumYesValues: "text", "integer", "number", "boolean", "timestamp", "json"
limitsobjectYes
limits.query_maxintegerYes
limits.row_limit_defaultintegerYes
limits.row_limit_maxintegerYes
limits.timeout_default_msintegerYes
limits.timeout_max_msintegerYes
limits.segment_max_membersintegerYes
refresh_intervalsarray<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

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: RunSqlQueryDto

FieldTypeRequiredDescription
querystringYesLength: 1–20000
row_limitintegerNoRange: 1–5000
timeout_msintegerNoRange: 1000–30000

Example:

{
  "query": "ayse",
  "row_limit": 1,
  "timeout_ms": 1000
}

Responses

200 — Success.

Schema: SqlQueryResult

FieldTypeRequiredDescription
run_idstringYes
columnsarray<object>Yes
columns[].namestringYes
columns[].typeenum | "unknown"Yes
rowsarray<array<any>>Yes
row_countintegerYes
truncatedbooleanYes
duration_msintegerYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
segment_idquerystringNo"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
statusqueryenumNoValues: "ok", "rejected", "timeout", "failed""ok"
limitqueryintegerNoRange: 1–10050
cursorquerystringNo"eyJpZCI6Im1zZ18wMUpE…"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SqlRunList

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].segment_idstring | nullYes
data[].sourceenumYesValues: "panel", "api", "schedule"
data[].actor_idstring | nullYes
data[].querystringYes
data[].query_hashstringYes
data[].statusenumYesValues: "ok", "rejected", "timeout", "failed"
data[].reasonenum | nullYes
data[].errorstring | nullYes
data[].row_countintegerYes
data[].truncatedbooleanYes
data[].duration_msintegerYes
data[].created_atstringYes
next_cursorstring | nullYes
has_morebooleanYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SqlSegmentList

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].app_idstringYes
data[].namestringYes
data[].descriptionstring | nullYes
data[].definitionmap<string, any>Yes
data[].is_dynamicbooleanYes
data[].estimated_countinteger | nullYes
data[].estimated_atstring | nullYes
data[].created_bystring | nullYes
data[].created_atstringYes
data[].updated_atstringYes
data[].sqlobject | nullYes
data[].warehouseobject | nullYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: CreateSqlSegmentDto

FieldTypeRequiredDescription
namestringYesLength: 2–100
descriptionstring | nullNo
querystringYesLength: 1–20000
refresh_interval_minutesinteger | nullNo

Example:

{
  "name": "Sipariş bildirimleri",
  "query": "ayse",
  "description": "Sipariş durumu güncellemeleri",
  "refresh_interval_minutes": 1
}

Responses

201 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

PATCH/v1/apps/{appId}/sql/segments/{segmentId}Try it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: UpdateSqlSegmentDto

FieldTypeRequiredDescription
namestringNoLength: 2–100
descriptionstring | nullNo
querystringNoLength: 1–20000
refresh_interval_minutesinteger | nullNo

Example:

{
  "name": "Sipariş bildirimleri",
  "description": "Sipariş durumu güncellemeleri",
  "query": "ayse",
  "refresh_interval_minutes": 1
}

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

POST/v1/apps/{appId}/sql/segments/{segmentId}/refreshTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

GET/v1/apps/{appId}/warehouse-segments/optionsTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: WarehouseSegmentOptions

FieldTypeRequiredDescription
typesarray<enum>Yes
id_typesarray<enum>Yes
snowflake_warehouse_sizesarray<enum>Yes
refresh_intervalsarray<integer>Yes
limitsobjectYes
limits.query_maxintegerYes
limits.timeout_default_secondsintegerYes
limits.timeout_min_secondsintegerYes
limits.timeout_max_secondsintegerYes
limits.max_rows_defaultintegerYes
limits.max_rows_maxintegerYes
limits.max_bytes_billed_defaultintegerYes
limits.max_bytes_billed_minintegerYes
limits.max_bytes_billed_maxintegerYes
limits.preview_sampleintegerYes
limits.connections_per_appintegerYes

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

GET/v1/apps/{appId}/warehouse-segments/connectionsTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: WarehouseSegmentConnectionList

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].app_idstringYes
data[].namestringYes
data[].typeenumYesValues: "bigquery", "snowflake", "databricks"
data[].configmap<string, any>Yes
data[].credentials_hintstringYes
data[].segment_countintegerYes
data[].last_tested_atstring | nullYes
data[].last_test_errorstring | nullYes
data[].created_atstringYes
data[].updated_atstringYes

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

POST/v1/apps/{appId}/warehouse-segments/connectionsTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: CreateWarehouseConnectionDto

FieldTypeRequiredDescription
namestringYesLength: 2–100
typeenumYesValues: "bigquery", "snowflake", "databricks"
configmap<string, any>Yes
credentialsmap<string, any>Yes

Example:

{
  "name": "Sipariş bildirimleri",
  "type": "bigquery",
  "config": {
    "key": "örnek"
  },
  "credentials": {
    "key": "örnek"
  }
}

Responses

201 — Success.

Schema: WarehouseSegmentConnection

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
typeenumYesValues: "bigquery", "snowflake", "databricks"
configmap<string, any>Yes
credentials_hintstringYes
segment_countintegerYes
last_tested_atstring | nullYes
last_test_errorstring | nullYes
created_atstringYes
updated_atstringYes

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

GET/v1/apps/{appId}/warehouse-segments/connections/{connectionId}Try it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
connectionIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: WarehouseSegmentConnection

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
typeenumYesValues: "bigquery", "snowflake", "databricks"
configmap<string, any>Yes
credentials_hintstringYes
segment_countintegerYes
last_tested_atstring | nullYes
last_test_errorstring | nullYes
created_atstringYes
updated_atstringYes

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

PATCH/v1/apps/{appId}/warehouse-segments/connections/{connectionId}Try it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
connectionIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: UpdateWarehouseConnectionDto

FieldTypeRequiredDescription
namestringNoLength: 2–100
configmap<string, any>No
credentialsmap<string, any>No

Example:

{
  "name": "Sipariş bildirimleri",
  "config": {
    "key": "örnek"
  },
  "credentials": {
    "key": "örnek"
  }
}

Responses

200 — Success.

Schema: WarehouseSegmentConnection

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
typeenumYesValues: "bigquery", "snowflake", "databricks"
configmap<string, any>Yes
credentials_hintstringYes
segment_countintegerYes
last_tested_atstring | nullYes
last_test_errorstring | nullYes
created_atstringYes
updated_atstringYes

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

DELETE/v1/apps/{appId}/warehouse-segments/connections/{connectionId}Try it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
connectionIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Ok

FieldTypeRequiredDescription
oktrueYes

Example response:

{
  "ok": true
}

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

Examples

curl -X DELETE "https://api.pushizo.com/v1/apps/app_01JD3W5Q7X9K2M4N6P8R0T1V3W/warehouse-segments/connections/seg_01JD3W5Q7X9K2M4N6P8R0T1V3W" \
  -H "Authorization: Bearer $PUSHIZO_API_KEY"

Test a warehouse connection

POST/v1/apps/{appId}/warehouse-segments/connections/{connectionId}/testTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
connectionIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: WarehouseSegmentConnectionTest

FieldTypeRequiredDescription
okbooleanYes
errorobject | nullYes

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)

POST/v1/apps/{appId}/warehouse-segments/previewTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: PreviewWarehouseQueryDto

FieldTypeRequiredDescription
connection_idstringYesLength: 1–∞
querystringYesLength: 1–20000
id_columnstringYes
id_typeenumNoValues: "external_id", "user_id"
limitsobjectNo
limits.timeout_secondsintegerNoRange: 10–600
limits.max_rowsintegerNoRange: 1–1000000
limits.max_bytes_billedintegerNoRange: 10485760–10995116277760
limits.max_warehouse_sizeenum | nullNo
modeenumNoValues: "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

FieldTypeRequiredDescription
run_idstringYes
modeenumYesValues: "dry_run", "sample"
estimated_bytesnumber | nullYes
max_bytes_billednumber | nullYes
within_limitbooleanYes
samplearray<string> | nullYes
sample_truncatedbooleanYes
sample_matchedinteger | nullYes
duration_msintegerYes

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

GET/v1/apps/{appId}/warehouse-segments/segmentsTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: WarehouseSegmentList

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].app_idstringYes
data[].namestringYes
data[].descriptionstring | nullYes
data[].definitionmap<string, any>Yes
data[].is_dynamicbooleanYes
data[].estimated_countinteger | nullYes
data[].estimated_atstring | nullYes
data[].created_bystring | nullYes
data[].created_atstringYes
data[].updated_atstringYes
data[].sqlobject | nullYes
data[].warehouseobject | nullYes

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

POST/v1/apps/{appId}/warehouse-segments/segmentsTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: CreateWarehouseSegmentDto

FieldTypeRequiredDescription
namestringYesLength: 2–100
descriptionstring | nullNo
connection_idstringYesLength: 1–∞
querystringYesLength: 1–20000
id_columnstringYes
id_typeenumNoValues: "external_id", "user_id"
refresh_interval_minutesinteger | nullNo
limitsobjectNo
limits.timeout_secondsintegerNoRange: 10–600
limits.max_rowsintegerNoRange: 1–1000000
limits.max_bytes_billedintegerNoRange: 10485760–10995116277760
limits.max_warehouse_sizeenum | nullNo

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

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

PATCH/v1/apps/{appId}/warehouse-segments/segments/{segmentId}Try it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

Schema: UpdateWarehouseSegmentDto

FieldTypeRequiredDescription
namestringNoLength: 2–100
descriptionstring | nullNo
connection_idstringNoLength: 1–∞
querystringNoLength: 1–20000
id_columnstringNo
id_typeenumNoValues: "external_id", "user_id"
refresh_interval_minutesinteger | nullNo
limitsobjectNo
limits.timeout_secondsintegerNoRange: 10–600
limits.max_rowsintegerNoRange: 1–1000000
limits.max_bytes_billedintegerNoRange: 10485760–10995116277760
limits.max_warehouse_sizeenum | nullNo

Example:

{
  "name": "Sipariş bildirimleri",
  "description": "Sipariş durumu güncellemeleri",
  "connection_id": "seg_01JD3W5Q7X9K2M4N6P8R0T1V3W",
  "query": "ayse",
  "id_column": "değer"
}

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

POST/v1/apps/{appId}/warehouse-segments/segments/{segmentId}/refreshTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

202 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

GET/v1/apps/{appId}/warehouse-segments/runsTry it (interactive API docs, new tab)

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

Parameters

NameInTypeRequiredDescriptionExample
segment_idquerystringNo"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
connection_idquerystringNo"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
statusqueryenumNoValues: "ok", "rejected", "timeout", "failed""ok"
limitqueryintegerNoRange: 1–10050
cursorquerystringNo"eyJpZCI6Im1zZ18wMUpE…"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: WarehouseSegmentRunList

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].segment_idstring | nullYes
data[].connection_idstring | nullYes
data[].warehouse_typeenumYesValues: "bigquery", "snowflake", "databricks"
data[].sourceenumYesValues: "panel", "api", "schedule"
data[].actor_idstring | nullYes
data[].querystringYes
data[].query_hashstringYes
data[].statusenumYesValues: "ok", "rejected", "timeout", "failed"
data[].reasonenum | nullYes
data[].errorstring | nullYes
data[].row_countintegerYes
data[].matched_countinteger | nullYes
data[].bytes_processednumber | nullYes
data[].truncatedbooleanYes
data[].duration_msintegerYes
data[].created_atstringYes
next_cursorstring | nullYes
has_morebooleanYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
limitqueryintegerNoDefault: 50; Range: 1–20050
cursorquerystringNoLength: 1–∞"eyJpZCI6Im1zZ18wMUpE…"
qquerystringNoLength: 1–100"ayse"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SegmentPage

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].app_idstringYes
data[].namestringYes
data[].descriptionstring | nullYes
data[].definitionmap<string, any>Yes
data[].is_dynamicbooleanYes
data[].estimated_countinteger | nullYes
data[].estimated_atstring | nullYes
data[].created_bystring | nullYes
data[].created_atstringYes
data[].updated_atstringYes
data[].sqlobject | nullYes
data[].warehouseobject | nullYes
next_cursorstring | nullYes
has_morebooleanYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

FieldTypeRequiredDescription
namestringYesLength: 2–100
descriptionstring | nullNoLength: 0–500
definitionobjectYesFilter AST: all/any/none groups and { field, op, value } conditions (docs/plan/05 §5.7).
definition.allarray<object>No
definition.anyarray<object>No
definition.nonearray<object>No
is_dynamicbooleanNo

Example:

{
  "name": "Sipariş bildirimleri",
  "definition": {
    "all": [
      {}
    ],
    "any": [
      {}
    ],
    "none": [
      {}
    ]
  },
  "description": "Sipariş durumu güncellemeleri",
  "is_dynamic": true
}

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

FieldTypeRequiredDescription
definitionobjectYesFilter AST: all/any/none groups and { field, op, value } conditions (docs/plan/05 §5.7).
definition.allarray<object>No
definition.anyarray<object>No
definition.nonearray<object>No
limitintegerNoRange: 1–50

Example:

{
  "definition": {
    "all": [
      {}
    ],
    "any": [
      {}
    ],
    "none": [
      {}
    ]
  },
  "limit": 50
}

Responses

200 — Success.

Schema: SegmentPreview

FieldTypeRequiredDescription
subscriptionsintegerYes
usersintegerYes
sampledbooleanYes
samplearray<object>Yes
sample[].idstringYes
sample[].external_idstring | nullYes
sample[].tagsmap<string, string>Yes
sample[].last_active_atstringYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Request body (required)

FieldTypeRequiredDescription
namestringNoLength: 2–100
descriptionstring | nullNoLength: 0–500
definitionobjectNoFilter AST: all/any/none groups and { field, op, value } conditions (docs/plan/05 §5.7).
definition.allarray<object>No
definition.anyarray<object>No
definition.nonearray<object>No
is_dynamicbooleanNo

Example:

{
  "name": "Sipariş bildirimleri",
  "description": "Sipariş durumu güncellemeleri",
  "definition": {
    "all": [
      {}
    ],
    "any": [
      {}
    ],
    "none": [
      {}
    ]
  },
  "is_dynamic": true
}

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Ok

FieldTypeRequiredDescription
oktrueYes

Example response:

{
  "ok": true
}

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

Examples

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

Campaigns that use the segment

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

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SegmentCampaigns

FieldTypeRequiredDescription
dataarray<object>Yes
data[].idstringYes
data[].namestringYes
data[].statusstringYes
data[].typestringYes
data[].usageenumYesValues: "include", "exclude"
data[].created_atstringYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: Segment

FieldTypeRequiredDescription
idstringYes
app_idstringYes
namestringYes
descriptionstring | nullYes
definitionmap<string, any>Yes
is_dynamicbooleanYes
estimated_countinteger | nullYes
estimated_atstring | nullYes
created_bystring | nullYes
created_atstringYes
updated_atstringYes
sqlobject | nullYes
warehouseobject | nullYes

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

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

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

Parameters

NameInTypeRequiredDescriptionExample
segmentIdpathstringYes"seg_01JD3W5Q7X9K2M4N6P8R0T1V3W"
forcequeryenumNotrue: skip the cache, full count. Values: "true", "false""true"
appIdpathstringYes"app_01JD3W5Q7X9K2M4N6P8R0T1V3W"

Responses

200 — Success.

Schema: SegmentEstimate

FieldTypeRequiredDescription
segment_idstring | nullYes
subscriptionsintegerYes
usersintegerYes
estimated_atstringYes
cachedbooleanYes
sampledbooleanYes

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"

On this page