---
title: "Recompute membership"
method: POST
path: "/v1/segments/{id}/refresh"
tags: ["Segments"]
---

# Recompute membership

`POST /v1/segments/{id}/refresh`

## Request

- Base URL: `https://api.volanea.com`
- URL: `https://api.volanea.com/v1/segments/{id}/refresh`
- Auth: HTTP bearer

Recomputes a dynamic segment against the current contact graph and returns how many contacts `entered`, how many `exited`, and the resulting `memberCount`.

**This has side effects beyond the count.** Entering and exiting emit `segment.entered` and `segment.exited`, so any workflow triggered on those events is set off by this call and any webhook subscribed to them fires. Refreshing a large segment after a bulk import is therefore an automation event, not a read.

Static segments are not recomputed — their membership is whatever was added by hand — so for those the call only refreshes the stored count and reports `entered: 0, exited: 0`.

## Path parameters

- `id` string, required

## Response `200`

Membership delta.

- object
  - `entered` integer, required
  - `exited` integer, required
  - `memberCount` integer, required

## Other responses

- `401`: Missing or invalid API key.
- `404`: Not found.
- `422`: Request validation failed (code `validation_error`, 422).

---

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