ZeepNotti Docs

Segments

Define and resolve dynamic device segments for targeted notifications.

GET
/v1/apps/{app_id}/segments

Lists every segment belonging to the App, ordered by creation time.

Authorization

Path Parameters

app_id*string

App ID

Response Body

application/json

curl -X GET "https://example.com/v1/apps/string/segments"
[  {    "app_id": "string",    "created_at": "string",    "id": "string",    "name": "string",    "rules": {      "conditions": [        {          "eq": "string",          "exists": true,          "field": "string",          "neq": "string"        }      ],      "op": "string"    }  }]
POST
/v1/apps/{app_id}/segments

Creates a device segment (a named rule set) scoped to the App.

Authorization

Path Parameters

app_id*string

App ID

Request Body

application/json

Segment name and rules

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/apps/string/segments" \  -H "Content-Type: application/json" \  -d '{}'
{  "app_id": "string",  "created_at": "string",  "id": "string",  "name": "string",  "rules": {    "conditions": [      {        "eq": "string",        "exists": true,        "field": "string",        "neq": "string"      }    ],    "op": "string"  }}
GET
/v1/apps/{app_id}/segments/{id}

Fetches a single segment by ID, scoped to the App.

Authorization

Path Parameters

app_id*string

App ID

id*string

Segment ID

Response Body

application/json

curl -X GET "https://example.com/v1/apps/string/segments/string"
{  "app_id": "string",  "created_at": "string",  "id": "string",  "name": "string",  "rules": {    "conditions": [      {        "eq": "string",        "exists": true,        "field": "string",        "neq": "string"      }    ],    "op": "string"  }}
PATCH
/v1/apps/{app_id}/segments/{id}

Partially updates a segment's name and/or rules. Fields omitted from the request keep their existing value.

Authorization

Path Parameters

app_id*string

App ID

id*string

Segment ID

Request Body

application/json

Fields to update

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/v1/apps/string/segments/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "app_id": "string",  "created_at": "string",  "id": "string",  "name": "string",  "rules": {    "conditions": [      {        "eq": "string",        "exists": true,        "field": "string",        "neq": "string"      }    ],    "op": "string"  }}
DELETE
/v1/apps/{app_id}/segments/{id}

Deletes a segment by ID, scoped to the App.

Authorization

Path Parameters

app_id*string

App ID

id*string

Segment ID

Response Body

curl -X DELETE "https://example.com/v1/apps/string/segments/string"
Empty