> For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/llms-full.txt.

# Interface: ApiSpecMessage

Defined in: [common/index.ts:52](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/common/index.ts#L52)

A structured in-band message — a serialized MediaWiki `Message`/`FatalError`
spec (`{ message, params, code, type }`) nested inside an action result
(e.g. password-policy messages, file-backend errors, AuthManager failures).
Distinct from `ApiMessage`, which models the `errorformat`-based envelope.

## Properties

### code?

> `optional` **code?**: `string`

Defined in: [common/index.ts:60](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/common/index.ts#L60)

Machine-readable code (usually mirrors `message`).

***

### html?

> `optional` **html?**: `string`

Defined in: [common/index.ts:66](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/common/index.ts#L66)

Pre-rendered HTML, when the server supplies it.

***

### message?

> `optional` **message?**: `string`

Defined in: [common/index.ts:54](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/common/index.ts#L54)

i18n message key, e.g. `passwordtooshort`.

***

### params?

> `optional` **params?**: `unknown`\[]

Defined in: [common/index.ts:57](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/common/index.ts#L57)

Parameters substituted into the message (may be numbers).

***

### type?

> `optional` **type?**: `string`

Defined in: [common/index.ts:63](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/common/index.ts#L63)

Severity, e.g. `error`. Open union.
