---
title: "Assign Workflow Play Stable Groups"
method: POST
path: "/api/workflow-play/state/stable-assignments"
tags: ["workflow-play-state"]
---

# Assign Workflow Play Stable Groups

`POST /api/workflow-play/state/stable-assignments`

## Request

- Base URL: `https://platform.verbiflow.com/api/bridge`
- URL: `https://platform.verbiflow.com/api/bridge/api/workflow-play/state/stable-assignments`
- Auth: one of:
  - HTTP bearer and API key in header `x-flage-org-id`
  - HTTP bearer and API key in header `x-flage-org-slug`

## Request body

- StableAssignmentRequest: Persist deterministic subject-to-assignee allocation in durable Play state.
  - `assignee_keys` string[], required: Stable candidate assignee identities.
  - `eligible_assignee_keys_by_subject` object, nullable: Optional subject-to-eligible-assignees constraints keyed by subject identity.
  - `load_offsets_by_assignee` object, nullable: Existing external load added to each assignee during balancing.
  - `namespace` string, required: Durable namespace for the assignment ledger.
  - `subject_keys` string[], required: Stable subject identities requiring assignments.

## Response `200`

Successful Response

- StableAssignmentResponse: Durable deterministic assignment receipt.
  - `assignments` object, required: Subject-to-assignee map keyed by caller-owned stable identities.
  - `base_generation` integer, required: Generation read before assignment.
  - `commit_id` string, required: Atomic state commit id for new assignments.
  - `counts` object, required: Resulting subject counts keyed by assignee identity.
  - `created` integer, required: Subjects assigned for the first time.
  - `existing` integer, required: Subjects that retained a prior assignment.
  - `load_offsets` object, required: Applied external load keyed by assignee identity.
  - `namespace` string, required: Durable assignment namespace.
  - `new_generation` integer, required: Generation committed by assignment.
  - `persisted_counts` object, required: Previously committed assignment counts keyed by assignee identity.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract.md) - [All operations](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract/llms.txt) - [OpenAPI document](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract/revisions/c80e903ef8f3?raw)
