> For the complete documentation index, see [llms.txt](https://mastodon.gitbook.io/mastodon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mastodon.gitbook.io/mastodon/methods/admin.md).

# admin

{% hint style="warning" %}
Responses are not currently documented. Exact nature of parameters has not been validated.
{% endhint %}

## Account methods

## View accounts by criteria

<mark style="color:blue;">`GET`</mark> `https://mastodon.example/api/v1/admin/accounts`

View accounts matching certain criteria for filtering, up to 100 at a time. Pagination may be done with the HTTP Link header in the response.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:read:accounts`\
**Version history:**\
2.9.1 - added

#### Query Parameters

| Name          | Type    | Description                              |
| ------------- | ------- | ---------------------------------------- |
| local         | boolean | Filter for local accounts?               |
| remote        | boolean | Filter for remote accounts?              |
| by\_domain    | string  | Filter by the given domain               |
| active        | boolean | Filter for currently active accounts?    |
| pending       | boolean | Filter for currently pending accounts?   |
| disabled      | boolean | Filter for currently disabled accounts?  |
| silenced      | boolean | Filter for currently silenced accounts?  |
| suspended     | boolean | Filter for currently suspended accounts? |
| username      | string  | Username to search for                   |
| display\_name | string  | Display name to search for               |
| email         | string  | Lookup a user with this email            |
| ip            | string  | Lookup users by this IP address          |
| staff         | boolean | Filter for staff accounts?               |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## View a specific account

<mark style="color:blue;">`GET`</mark> `https://mastodon.example/api/v1/admin/accounts/:id`

View admin-level information about the given account.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:read:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| :id  | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Perform an action against an account

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/accounts/:account_id/action`

Perform an action against an account and log this action in the moderation history.\
\
**Returns:** empty object\
**OAuth:** User token + `admin:write:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name         | Type   | Description       |
| ------------ | ------ | ----------------- |
| :account\_id | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

#### Request Body

| Name                      | Type    | Description                                                                        |
| ------------------------- | ------- | ---------------------------------------------------------------------------------- |
| type                      | string  | Type of action to be taken. Enumerable oneOf: `none` `disable` `silence` `suspend` |
| report\_id                | string  | ID of an associated report that caused this action to be taken                     |
| warning\_preset\_id       | string  | ID of a preset warning                                                             |
| text                      | string  | Additional text for clarification of why this action was taken                     |
| send\_email\_notification | boolean | Whether an email should be sent to the user with the above information.            |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Approve pending account

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/accounts/:id/approve`

Approve the given local account if it is currently pending approval.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:write:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| :id  | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Reject pending account

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/accounts/:id/reject`

Reject the given local account if it is currently pending approval.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:write:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| :id  | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Re-enable account

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/accounts/:id/enable`

Re-enable a local account whose login is currently disabled.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:write:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| :id  | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Unsilence account

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/accounts/:id/unsilence`

Unsilence a currently silenced account.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:write:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| :id  | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Unsuspend account

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/accounts/:id/unsuspend`

Unsuspend a currently suspended account.\
\
**Returns:** Admin::Account\
**OAuth:** User token + `admin:write:accounts`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description       |
| ---- | ------ | ----------------- |
| :id  | string | ID of the account |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Report methods

## View all reports

<mark style="color:blue;">`GET`</mark> `https://mastodon.example/api/v1/admin/reports`

View all reports. Pagination may be done with HTTP Link header in the response.\
\
**Returns:** Array of Admin::Report\
**OAuth:** User token + `admin:read:reports`\
**Version history:**\
2.9.1 - added

#### Query Parameters

| Name                | Type    | Description |
| ------------------- | ------- | ----------- |
| resolved            | boolean |             |
| account\_id         | string  |             |
| target\_account\_id | string  |             |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## View a single report

<mark style="color:blue;">`GET`</mark> `https://mastodon.example/api/v1/admin/reports/:id/`

View information about the report with the given ID.\
\
**Returns:** Admin::Report\
**OAuth:** User token + `admin:read:reports`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| :id  | string | ID of the report |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Assign report to self

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/reports/:id/assign_to_self`

Claim the handling of this report to yourself.\
\
**Returns:** Admin::Report\
**OAuth:** User token + `admin:write:reports`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| :id  | string | ID of the report |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Unassign report

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/reports/:id/unassign`

Unassign a report so that someone else can claim it.\
\
**Returns:** Admin::Report\
**OAuth:** User token + `admin:write:reports`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| :id  | string | ID of the report |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Mark as resolved

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/reports/:id/resolve`

Mark a report as resolved with no further action taken.\
\
**Returns:** Admin::Report\
**OAuth:** User token + `admin:write:reports`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| :id  | string | ID of the report |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Re-open report

<mark style="color:green;">`POST`</mark> `https://mastodon.example/api/v1/admin/reports/:id/reopen`

Reopen a currently closed report.\
\
**Returns:** Admin::Report\
**OAuth:** User token + `admin:write:reports`\
**Version history:**\
2.9.1 - added

#### Path Parameters

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| :id  | string | ID of the report |

#### Headers

| Name          | Type   | Description          |
| ------------- | ------ | -------------------- |
| Authorization | string | Bearer \<user token> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
