# town.muni.arbiter.resetPolicy

> Published by [zicklag.dev](https://lexicon.garden/identity/did:plc:ulg2bzgrgs7ddjjlmhtegk3v)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ulg2bzgrgs7ddjjlmhtegk3v/town.muni.arbiter.resetPolicy)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ulg2bzgrgs7ddjjlmhtegk3v/town.muni.arbiter.resetPolicy/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ulg2bzgrgs7ddjjlmhtegk3v/town.muni.arbiter.resetPolicy/examples)

## Definitions

### `town.muni.arbiter.resetPolicy`

**Type**: `procedure`

Reset a stewarded arbiter's root policy.

The caller authenticates via serviceAuth (aud = arbiter-server DID,
lxm = town.muni.arbiter.resetPolicy). Only the account designated in the
arbiter's `town.muni.arbiter.recovery/self` record (the recovery admin)
may reset the policy. The replacement Rego source is written to
`town.muni.arbiter.policy.root/self` and the arbiter is re-onboarded.

If no recovery admin is set, this endpoint is unavailable (forbidden).

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `policy` | `string` | Yes | The replacement Rego source text for the root policy. |
| `arbiterDid` | `string` (did) | Yes | The stewarded account whose root policy to reset. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ok` | `boolean` | Yes |  |

#### Errors

- **ErrPermissionDenied**: The caller is not the designated recovery admin, or no recovery admin is set.
- **ErrInvalidPolicy**: The replacement policy failed to compile.

## Raw Schema

```json
{
  "id": "town.muni.arbiter.resetPolicy",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "arbiterDid",
            "policy"
          ],
          "properties": {
            "policy": {
              "type": "string",
              "description": "The replacement Rego source text for the root policy."
            },
            "arbiterDid": {
              "type": "string",
              "format": "did",
              "description": "The stewarded account whose root policy to reset."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "ErrPermissionDenied",
          "description": "The caller is not the designated recovery admin, or no recovery admin is set."
        },
        {
          "name": "ErrInvalidPolicy",
          "description": "The replacement policy failed to compile."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "ok"
          ],
          "properties": {
            "ok": {
              "type": "boolean"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Reset a stewarded arbiter's root policy.\n\nThe caller authenticates via serviceAuth (aud = arbiter-server DID,\nlxm = town.muni.arbiter.resetPolicy). Only the account designated in the\narbiter's `town.muni.arbiter.recovery/self` record (the recovery admin)\nmay reset the policy. The replacement Rego source is written to\n`town.muni.arbiter.policy.root/self` and the arbiter is re-onboarded.\n\nIf no recovery admin is set, this endpoint is unavailable (forbidden)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
