---
title: "Update a segment group"
method: PUT
path: "/{teamPid}/segment-groups/{segmentGroup}"
tags: ["Segment groups"]
---

# Update a segment group

`PUT /{teamPid}/segment-groups/{segmentGroup}`

## Request

- Base URL: `https://api.rightmessage.com/v1`
- URL: `https://api.rightmessage.com/v1/{teamPid}/segment-groups/{segmentGroup}`
- Auth: HTTP bearer

Changes the draft only. Publish the draft to make it live.

Requires an API token with the `write` ability. Tokens created without abilities have `*`, which grants every ability.

## Path parameters

- `teamPid` string, required
- `segmentGroup` string, required

## Request body

- UpdateSegmentGroupRequest
  - `name` string
  - `semantic_type` 'INDUSTRY' | 'ROLE' | 'COMPANY_SIZE' | 'GOAL' | 'PROBLEM' | 'STAGE' | 'CUSTOM' | 'null', nullable
  - `allow_multiple` boolean
  - `segments` object[]
    - `name` string
  - `sync_platform` string, nullable
  - `sync_field` string, nullable
  - `sync_mode` 'field' | 'tag'
  - `sync_mappings` string[]

## Response `200`

`SegmentGroupResource`

- object
  - `data` SegmentGroupResource, required
    - `id` string, nullable, required
    - `name` string, nullable, required
    - `semantic_type` string, nullable, required
    - `allow_multiple` union, required
      - string
      - boolean
    - `segments` object, required
    - `signals` union, required
      - string
      - string[]
    - `sync_platform` string, nullable, required
    - `sync_field` string, nullable, required
    - `sync_mode` union, required
      - string
      - 'field'
    - `sync_mappings` string, required

## Other responses

- `401`: Missing, invalid or revoked API token.
- `403`: Authorization error
- `404`: Not found
- `422`: Validation error
- `429`: Rate limit exceeded: 120 requests per minute for project endpoints, 60 per minute for token and connection endpoints. Retry after the `Retry-After` seconds.

---

[API](https://skmtc.dev/rightmessage/apis/rightmessage-api.md) - [All operations](https://skmtc.dev/rightmessage/apis/rightmessage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rightmessage/apis/rightmessage-api/revisions/adec35e9720c?raw)
