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

# Interface: ApiBlock

Defined in: [core/query/blocks.ts:32](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L32)

One block record. `bkprop` controls which fields appear.

## Properties

### allowusertalk?

> `optional` **allowusertalk?**: `boolean`

Defined in: [core/query/blocks.ts:117](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L117)

Blocked user may still edit their own talk page. `bkprop=flags`.

***

### anononly?

> `optional` **anononly?**: `boolean`

Defined in: [core/query/blocks.ts:100](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L100)

Blocks anonymous (edit-only) users. `bkprop=flags`.

***

### autoblock?

> `optional` **autoblock?**: `boolean`

Defined in: [core/query/blocks.ts:104](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L104)

Autoblock enabled for the offending IP. `bkprop=flags`.

***

### automatic?

> `optional` **automatic?**: `boolean`

Defined in: [core/query/blocks.ts:98](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L98)

Applied automatically by the autoblock feature. `bkprop=flags`.

***

### block-hidden?

> `optional` **block-hidden?**: `boolean`

Defined in: [core/query/blocks.ts:115](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L115)

Suppression visibility of the block. `bkprop=flags`. Written as a separate
key alongside [hidden](#hidden), with the same value (the block is oversighted).

#### Since

MediaWiki 1.46

***

### by?

> `optional` **by?**: `string`

Defined in: [core/query/blocks.ts:49](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L49)

Name of the admin who applied the block. `bkprop=by`.

***

### byid?

> `optional` **byid?**: `number`

Defined in: [core/query/blocks.ts:52](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L52)

User id of the blocking admin. `bkprop=byid`.

***

### duration-l10n?

> `optional` **duration-l10n?**: `string`

Defined in: [core/query/blocks.ts:66](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L66)

Human-readable duration, e.g. `3 months`, or the localized "infinite"
message for a permanent block. `bkprop=expiry`.

#### Since

MediaWiki 1.44

***

### expiry?

> `optional` **expiry?**: `string`

Defined in: [core/query/blocks.ts:58](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L58)

When the block expires, or `infinity`. `bkprop=expiry`.

***

### hidden?

> `optional` **hidden?**: `boolean`

Defined in: [core/query/blocks.ts:108](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L108)

Block is hidden from the block log. `bkprop=flags`.

***

### id?

> `optional` **id?**: `number`

Defined in: [core/query/blocks.ts:34](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L34)

Block id. `bkprop=id`.

***

### nocreate?

> `optional` **nocreate?**: `boolean`

Defined in: [core/query/blocks.ts:102](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L102)

Prevents account creation. `bkprop=flags`.

***

### noemail?

> `optional` **noemail?**: `boolean`

Defined in: [core/query/blocks.ts:106](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L106)

Prevents sending email. `bkprop=flags`.

***

### parsedreason?

> `optional` **parsedreason?**: `string`

Defined in: [core/query/blocks.ts:77](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L77)

HTML-rendered block reason. `bkprop=parsedreason`; the 1.43 baseline
rejects that value, so it only appears on newer wikis.

#### Since

MediaWiki 1.44

***

### partial?

> `optional` **partial?**: `boolean`

Defined in: [core/query/blocks.ts:119](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L119)

Whether this is a partial block. `bkprop=flags`.

***

### rangeend?

> `optional` **rangeend?**: `string`

Defined in: [core/query/blocks.ts:89](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L89)

End of the blocked IP range (hex form). `bkprop=range` on a range block;
before 1.43 also emitted for single-IP blocks.

***

### rangestart?

> `optional` **rangestart?**: `string`

Defined in: [core/query/blocks.ts:83](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L83)

Start of the blocked IP range (hex form). `bkprop=range` on a range block;
before 1.43 also emitted for single-IP blocks.

***

### reason?

> `optional` **reason?**: `string`

Defined in: [core/query/blocks.ts:69](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L69)

Raw block reason. `bkprop=reason`.

***

### restrictions?

> `optional` **restrictions?**: `unknown`\[] | [`ApiBlockRestrictions`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiBlockRestrictions.md)

Defined in: [core/query/blocks.ts:95](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L95)

Restriction targets of a partial block, grouped by kind; `[]` for a sitewide
block. `bkprop=restrictions`.

***

### timestamp?

> `optional` **timestamp?**: `string`

Defined in: [core/query/blocks.ts:55](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L55)

When the block was applied. `bkprop=timestamp`.

***

### user?

> `optional` **user?**: `string`

Defined in: [core/query/blocks.ts:40](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L40)

Blocked user name, IP address or IP range; absent for every autoblock.
`bkprop=user`.

***

### userid?

> `optional` **userid?**: `number`

Defined in: [core/query/blocks.ts:46](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/core/query/blocks.ts#L46)

Blocked user id; `0` when the target is an IP address or IP range, absent
for every autoblock. `bkprop=userid`.
