# Set the workspace's underwriting criteria

Replace the scorecard. Every criterion sent is created or updated by its key, and EVERY ACTIVE CRITERION NOT SENT IS RETIRED — sending an empty list retires the whole template, which is a real request and not an accident the route will second-guess. At most 200 criteria; a blank key, or the same key twice, is refused rather than silently resolved. Category defaults to personal_credit and value kind to pass_fail. Admin only — the template is shape.

Access class: `workspace:admin`.

## Endpoint

`PUT /v1/workspace/underwriting-criteria`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "criteria": [
      {
        "active": true,
        "category": "string",
        "comparison": "string",
        "key": "string",
        "label": "string",
        "sortOrder": 1,
        "threshold": 1.5,
        "valueKind": "string"
      }
    ]
  },
  "params": {},
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": [
    {
      "active": true,
      "autoSource": "string",
      "category": "string",
      "comparison": "string",
      "createdAt": "string",
      "id": 1.5,
      "key": "string",
      "label": "string",
      "sortOrder": 1.5,
      "threshold": 1.5,
      "updatedAt": "string",
      "valueKind": "string"
    }
  ]
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
