TEASEDocs
API ReferenceLandings

Update a geo-segment

Update a draft segment's name, countries, default flag, conditions, A/B, or language. Only provided fields change. Exactly one default segment is always enforced. Requires a write-scoped key.

Authorization

bearerAuth
AuthorizationBearer <token>

Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.

In: header

Path Parameters

domain*string

The domain hostname.

segment_id*string

The segment id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

PATCH
/api/admin/segments/{domain}/{segment_id}
curl -X PATCH "https://example.com/api/admin/segments/string/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Tier 1 (EN)",    "countries": [      "US",      "GB",      "CA",      "AU"    ]  }'
{  "segment_id": "s_1a2b3c4d",  "domain": "links.creator.com",  "name": "Tier 1 (EN)",  "countries": [    "US",    "GB",    "CA",    "AU"  ],  "position": 0,  "is_default": false,  "match": null,  "ab": null,  "lang": "en"}
{  "detail": {    "code": "segment_default_required",    "message": "Нельзя снять флаг по умолчанию: выберите другой сегмент по умолчанию"  }}
{  "detail": "auth required"}
{  "detail": {    "code": "segment_not_found",    "message": "Сегмент 's_1a2b3c4d' не найден в домене links.creator.com"  }}