Orishare
Api
GET
/segments
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/segments"
{  "data": [    {      "id": "string",      "name": "string",      "kind": "static",      "definition": null,      "members": 0,      "version": 0,      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/segments
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Header Parameters

Idempotency-Key?string

Required by the API on this route (400 idempotency_key_required without it); the official clients generate a UUID when you omit it.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/segments" \  -H "Content-Type: application/json" \  -d '{    "name": "vip",    "kind": "static"  }'
{  "id": "string",  "name": "string",  "kind": "static",  "definition": null,  "members": 0,  "version": 0,  "created_at": "string",  "updated_at": "string"}
GET
/segments/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/segments/string"
{  "id": "string",  "name": "string",  "kind": "static",  "definition": null,  "members": 0,  "version": 0,  "created_at": "string",  "updated_at": "string"}
PATCH
/segments/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/segments/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "kind": "static",  "definition": null,  "members": 0,  "version": 0,  "created_at": "string",  "updated_at": "string"}
DELETE
/segments/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/segments/string"
Empty
GET
/segments/{id}/members
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/segments/string/members"
{  "data": [    {      "segment_id": "string",      "customer_id": "string",      "created_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/segments/{id}/members
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/segments/string/members" \  -H "Content-Type: application/json" \  -d '{    "customer_ids": [      "string"    ]  }'
{  "added": 0,  "memberships": [    {      "segment_id": "string",      "customer_id": "string",      "created_at": "string"    }  ]}
DELETE
/segments/{id}/members/{customer_id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length
customer_id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/segments/string/members/string"
Empty
GET
/segments/{id}/eligibility/{customer_id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length
customer_id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/segments/string/eligibility/string"
{  "segment": "string",  "customer_id": "string",  "eligible": true,  "kind": "static",  "operands": null}