# Record an installed extension (owner only): what datanotes extension install writes.

`POST /datanotes/extensions/record/` (operation `extensions_record`)

## 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` | yes |  | 2 to 40 lowercase letters, digits or -, starting with a letter. |
| `version` | `string` | yes |  |  |
| `description` | `string` | yes |  |  |
| `api` | `integer` | yes |  | The module API version the extension's entry file exports. |
| `source` | `object` | yes |  |  |
| `commit` | `string` | yes |  | The git commit id (40 hex), or local-<12 hex> for a folder. |
| `manifest_sha256` | `string` | yes |  |  |
| `entry_sha256` | `string` | yes |  |  |
| `token` | `string` | yes |  | The extension's named token: ext-\<name>. |
| `tables` | `object` | yes |  | Each role of the manifest, bound to a qualified table. |
| `tools` | `string[]` | yes |  |  |
| `write` | `string[]` | yes |  | The token's write patterns (qualified table names). |
| `migration_id` | `string \| null` | yes |  | The batch that brought the database from `previous` to this record. |
| `installed_at` | `string` | yes |  |  |
| `updated_at` | `string` | yes |  |  |
| `previous` | `InstalledExtension \| null` | yes |  | The record before the last install, repair or update; null after a first install. |

## 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`).
