---
title: "Returns the audience state recalculation with the given id."
method: GET
path: "/audience/state-recalculation/{recalculationId}"
tags: ["Audience"]
---

# Returns the audience state recalculation with the given id.

`GET /audience/state-recalculation/{recalculationId}`

## Path parameters

- `recalculationId` string, required

## Response `200`

OK

- GetAudienceStateRecalculationByIdEndpointOutput
  - `id` string, required — The unique identifier of the recalculation.
  - `audienceId` string, required — The audience this recalculation belongs to.
  - `state` 'Pending' | 'Processing' | 'Completed' | 'Failed' | 'Aborted', required
  - `phase` 'RecalculatingUsers' | 'Finalizing' | 'Done', required
  - `lastProcessedUserId` string, nullable — The id of the last user that was processed (progress cursor).
  - `processedCount` integer, required — The number of users processed so far.
  - `changedCount` integer, required — The number of users whose state was changed by the recalculation.
  - `errorMessage` string, nullable — Error message populated when the recalculation transitioned to Failed.
  - `startedAt` string, date-time, nullable — When the recalculation began processing (null while still Pending).
  - `lastHeartbeatAt` string, date-time, nullable — Timestamp of the last heartbeat received from the worker.
  - `completedAt` string, date-time, nullable — When the recalculation reached a terminal state (Completed, Failed, Aborted).
  - `createdAt` string, date-time, required — When the recalculation was created.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/versions/e42ec51c7b88/schema)
