# Mint a service token

`POST /api/tokens` · Praecise account · Service tokens

The only time the token itself is readable. A signed-in person only: a token that could mint its successors would make revoking the original pointless.

## Request body

`application/json`

```json
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "examples": [
        "my-service, production"
      ]
    }
  }
}
```

## Responses

- `201`: Minted.
- `400`: The token needs a name of 1 to 80 characters.
- `401`: Nobody is signed in.
- `403`: A service token was presented. Tokens are managed by a signed-in person, not by another token.

## Example

```sh
curl -X POST 'https://accounts.praecise.com/api/tokens' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "my-service, production"
}'
```
