# Change a named token. A token may change its own description and autolink default; permissions are the owner's.

`POST /datanotes/tokens/update/` (operation `tokens_update`)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Datanotes-Actor` | header | `string` | no | JSON: on whose behalf the write is made, recorded in the journal (`harness`, `model`, `session`). |

## Request body

`application/json`

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `string` | no |  | Owner only (a named token updates itself). |
| `description` | `string` | no |  | An empty string removes it. |
| `write` | `string[]` | no |  |  |
| `ddl` | `boolean` | no |  |  |
| `maintain` | `boolean` | no |  |  |
| `autolink` | `boolean \| null` | no |  | The default of the token's writes for automatic links; null follows the database's setting again. |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Done. | `object` (application/json) |
| 400 | Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type. | `Error` (application/json) |
| 401 | Missing or wrong bearer token. | `Error` (application/json) |
| 403 | A named token beyond its permissions (the engine's administration, tables outside its `write` patterns, schema changes without `ddl`). | `Error` (application/json) |
| 500 | Unexpected error. | `Error` (application/json) |

The schemas named here are in [openapi.json](https://datanotes.dev/openapi.json) (`components.schemas`).
