---
title: "Replace a segment's member shares"
method: PUT
path: "/api/v1/ackdb/observe/segments/{id}/shares"
tags: ["ackDB"]
---

# Replace a segment's member shares

`PUT /api/v1/ackdb/observe/segments/{id}/shares`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/ackdb/observe/segments/{id}/shares`
- Auth: HTTP bearer

Replaces the segment's ENTIRE grant set atomically (#284). Owner only. Each share is { memberId, role } — a member from the roster (GET /members) + 'view' or 'edit'. An unknown or inactive memberId → 400; duplicate members are deduped (last role wins).

## Path parameters

- `id` string, required

## Request body

- object
  - `shares` object[], required
    - `memberId` string, required
    - `role` 'view' | 'edit', required

## Response `200`

The persisted grants, oldest first.

- object
  - `data` AckdbSegmentShare[], required
    - `memberId` string, required
    - `role` 'view' | 'edit', required
    - `name` string, required
    - `email` string, required
    - `createdAt` string, date-time

## Other responses

- `400`: Invalid body (non-array, bad role, or an unknown/inactive memberId).
- `403`: Caller is not the segment owner (#284).
- `404`: Segment not found.

---

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