viakite
Dashboard

API/Goals and settings/Change a segment; its owner or `analytics.manage`

Change a segment; its owner or `analytics.manage`

PATCH/v1/projects/{project}/segments/{segment}

Absent fields stay as they are; sharing needs analytics.manage.

Secret keyus.api.vk.viabio.me

Path parameters

projectstringrequired
The project's id (prj_…).
segmentstringrequired
The segment's id.

Body

namestringup to 100 chars
visibilitystring
Personal (only its owner sees it) or shared with the team.
personalshared
matchstring
allany
filtersSegmentFilter[]1–20 items
One filter of a segment.
Show 3 fields
dimensionstringrequiredup to 255 chars
operatorstringrequired
isis_notcontainsstarts_withregex
valuesstring[]required1–100 items

Responses

The Segment.

idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
project_idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
owner_idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
visibilitystringrequired
Personal (only its owner sees it) or shared with the team.
personalshared
namestringrequired
matchstringrequired
allany
filtersSegmentFilter[]required
One filter of a segment.
Show 3 fields
dimensionstringrequiredup to 255 chars
operatorstringrequired
isis_notcontainsstarts_withregex
valuesstring[]required1–100 items
created_atstring · date-timerequired
A time in UTC, ISO 8601.
updated_atstring · date-timerequired
A time in UTC, ISO 8601.
Example response
1{
2 "id": "seg_01JD8Q2M4W9XK3T7B5",
3 "project_id": "prj_01JD8Q2M4W9XK3T7B5",
4 "owner_id": "id_01JD8Q2M4W9XK3T7B5",
5 "visibility": "personal",
6 "name": "Production",
7 "match": "all",
8 "filters": [
9 {
10 "dimension": "country",
11 "operator": "is",
12 "values": [
13 "string"
14 ]
15 }
16 ],
17 "created_at": "2026-11-21T09:30:00Z",
18 "updated_at": "2026-11-21T09:30:00Z"
19}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
422validation_error
404not_found
403forbidden