# Create workspace api-keys

Mint a key against ONE board or page: targetKind is 'board' or 'definition' and targetId must name one that exists here. Needs a name of up to 80 characters and at least one scope from read, rows:write, columns:write, partner, processing. The secret is in this answer and in no other — it is stored only as a hash. Admin and Enterprise only.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/api-keys`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "name": "string",
    "scopes": [
      "string"
    ],
    "targetId": "",
    "targetKind": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{}
```

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