# Reinstate a specific tombstoned policy version

POST

/v1/policies/{policyId}/versions/{version}/reinstate

```sh
curl --request POST \
  --url https://example.com/v1/policies/example/versions/example/reinstate \
  --header 'Authorization: Bearer <token>'
```

Un-tombstones a previously-unregistered version: clears the tombstone on that version and recomputes the latest active version (and refreshes `policyKind` to match). Restores manifest bytes verbatim (semver hygiene). Idempotent. Reactivates a fully-retired policy identity when applicable. Publish is always allowed regardless of retirement state. A version whose retention policy keeps its domain’s rows longer than this server’s limit, or holds them, stays retired (`400 retention-over-limit`).

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.1.10/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**policyId**

required

string

\>= 1 characters

PolicyId — stable string chosen by the caller (e.g. `acme.model-routing`).

**version**

required

string

/^\d+\\.\d+\\.\d+$/

Semver version string of the policy (e.g. `1.2.0`).

### Header Parameters

**Idempotency-Key**

string

\>= 1 characters

Caller-supplied idempotency key, scoped to the caller: the same key from someone else in the tenant is their own request (from 0.1.5). Retries with the same key return the original response byte-identical (per `docs/API-ROUTE-CONVENTIONS.md` §3.1). A retry sent while the first request still runs is answered `409 idempotency-key-in-flight` with `Retry-After`, on a runtime whose store holds keys (from 0.1.5); retry after it, and you get the first request’s answer. An answer that carries a secret (a new API key or public run token, a session token, a generated signing secret) isn’t kept: a retry gets `409 idempotency-key-replay-withheld`, with the first request’s status and when it succeeded (from 0.1.5).

## Responses

### 200

Reinstated.

application/json

object

**policyId**

required

string

**version**

required

string

**wasTombstoned**

required

boolean

##### Examplegenerated

```json
{
  "policyId": "example",
  "version": "example",
  "wasTombstoned": true
}
```

### 400

`retention-over-limit`: the version’s retention policy keeps its domain’s rows longer than this server’s limit, or holds them (`details.limitSeconds`); it stays retired.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No policy at that (id, version) under this tenant.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 409

`policy-scope-taken`: another policy now covers the version’s retention domain (`details.heldBy`); unregister it first. `policy-scope-changed`: the version covers a different domain from the policy’s other versions.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 500

Server error (unmapped domain code or framework crash).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/policies/{policyId}`: Fetch a policy (latest version)](https://docs.kindgi.com/v0.1.10/reference/api/operations/policiesget.md)
- [`GET /v1/policies/{policyId}/versions`: List versions of a policy](https://docs.kindgi.com/v0.1.10/reference/api/operations/policiesversionslist.md)
- [`GET /v1/policies/{policyId}/versions/{version}`: Fetch a specific policy version](https://docs.kindgi.com/v0.1.10/reference/api/operations/policiesversionsget.md)
- [`POST /v1/policies/{policyId}/versions/{version}/unregister`: Unregister a policy version](https://docs.kindgi.com/v0.1.10/reference/api/operations/policiesversionsunregister.md)
- [Error code `policy-scope-changed`](https://docs.kindgi.com/v0.1.10/reference/errors.md#policy-scope-changed)
- [Error code `policy-scope-taken`](https://docs.kindgi.com/v0.1.10/reference/errors.md#policy-scope-taken)
- [Error code `retention-over-limit`](https://docs.kindgi.com/v0.1.10/reference/errors.md#retention-over-limit)
- [Every error code](https://docs.kindgi.com/v0.1.10/reference/errors.md)
