# Create a corrector group

POST

/v1/corrector-groups

```sh
curl --request POST \
  --url https://example.com/v1/corrector-groups \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "scope": { "kind": "tenant" }, "name": "example", "weight": 1, "description": "example", "assertableBy": { "minReviewerRole": "standard", "principalKinds": [ "user" ], "principalIds": [ "example" ] } }'
```

A named kind of person who corrects with a weight, scoped to the workspace, a project, or an agent in a project. Names are unique among the live groups of a scope. Needs `admin` on the workspace (tenant scope) or the project.

## Authorizations

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

## Parameters

### Header Parameters

**Idempotency-Key**

string

\>= 1 characters

Caller-supplied idempotency key, scoped to the caller: the same key from someone else in the workspace 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). A request whose key store can’t be read before it runs is answered `503 idempotency-store-unavailable` with `Retry-After`: nothing ran, so retry with the same key (from 0.3.0).

## Request Bodyrequired

application/json

object

**scope**

required

One of:

- **object**

  object

  **kind**

  required

  string

  Allowed value: tenant

- **object**

  object

  **kind**

  required

  string

  Allowed value: project

  **projectId**

  required

  string

  \>= 1 characters

- **object**

  object

  **kind**

  required

  string

  Allowed value: agent

  **projectId**

  required

  string

  \>= 1 characters

  **agentId**

  required

  string

  \>= 1 characters

**name**

required

string

\>= 1 characters <= 100 characters

**weight**

required

number

**description**

string

**assertableBy**

Who may assert the group: every part that is set must hold. A group with one is expert: a correction recorded while it is carries `expert`, and a comparison weighted `experts-only` counts only those.

object

\>= 1 properties

**minReviewerRole**

The caller’s reviewer role is at least this (its token’s, or the roster’s).

string

Allowed values: standard senior admin

**principalKinds**

Users, service tokens, or both.

Array\<string>

\>= 1 items

Allowed values: user service

**principalIds**

Only these principals: user ids, or service token ids.

Array\<string>

\>= 1 items <= 100 items

## Responses

### 201

Corrector group created.

application/json

object

**id**

required

string

**tenantId**

required

string

**scope**

required

One of:

- **object**

  object

  **kind**

  required

  string

  Allowed value: tenant

- **object**

  object

  **kind**

  required

  string

  Allowed value: project

  **projectId**

  required

  string

  \>= 1 characters

- **object**

  object

  **kind**

  required

  string

  Allowed value: agent

  **projectId**

  required

  string

  \>= 1 characters

  **agentId**

  required

  string

  \>= 1 characters

**name**

required

The deployment’s own word for the group: “expert”, “user”, “arbitrator”.

string

**weight**

required

How much a correction of this group counts, relative to the others.

number

**description**

string

**assertableBy**

Who may assert the group, as the caller sees it: every part that is set must hold. `principalIds` is sent only to an admin on the group’s scope; `principalCount` to everyone who reads it.

object

\>= 1 properties

**minReviewerRole**

The caller’s reviewer role is at least this (its token’s, or the roster’s).

string

Allowed values: standard senior admin

**principalKinds**

Users, service tokens, or both.

Array\<string>

\>= 1 items

Allowed values: user service

**principalIds**

Only these principals: user ids, or service token ids. Sent only to an admin on the group’s scope.

Array\<string>

\>= 1 items <= 100 items

**principalCount**

How many principals the group is restricted to (`principalIds`), for every reader. Absent when it names none.

integer

\>= 1

**createdAt**

required

string format: date-time

**updatedAt**

required

string format: date-time

**unregisteredAt**

Set when the group was retired.

string format: date-time

##### Example

```json
{
  "scope": {
    "kind": "tenant"
  },
  "assertableBy": {
    "minReviewerRole": "standard",
    "principalKinds": [
      "user"
    ]
  }
}
```

### 400

Malformed request body.

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"
  }
}
```

### 403

`permission-denied`.

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

`corrector-group-name-taken`, or an idempotency conflict.

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"
  }
}
```

### 413

The request body is over the API’s limit (`request-too-large`; `details.maxBytes` says how much).

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"
  }
}
```

### 503

The `Idempotency-Key` store couldn’t be read before the request ran (`idempotency-store-unavailable`), so nothing was changed; `Retry-After` (whole seconds) says when to try again with the same key.

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/corrector-groups`: List corrector groups](https://docs.kindgi.com/reference/api/operations/correctorgroupslist.md)
- [Error code `corrector-group-name-taken`](https://docs.kindgi.com/reference/errors.md#corrector-group-name-taken)
- [Error code `idempotency-store-unavailable`](https://docs.kindgi.com/reference/errors.md#idempotency-store-unavailable)
- [Error code `permission-denied`](https://docs.kindgi.com/reference/errors.md#permission-denied)
- [Error code `request-too-large`](https://docs.kindgi.com/reference/errors.md#request-too-large)
- [Every error code](https://docs.kindgi.com/reference/errors.md)
