# Blocking and Reporting

Page: https://microblog.dev/api/blocking-reporting/
API base URL: https://micro.blog

Endpoints for reporting users and managing muted users.

## Endpoints
### POST /users/block

URL: `https://micro.blog/users/block`

Blocks and mutes a user.




Query parameters:
- `username` (string, required): Micro.blog username.
  Example: `vincent`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/users/block?username=vincent" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response.
Example response:

```json
{
  "id": 12345,
  "username": "vincent"
}
```

### GET /users/blocking

URL: `https://micro.blog/users/blocking`

Returns blocked users.






Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/blocking" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response.
Example response:

```json
[
  {
    "id": 12345,
    "username": "vincent"
  }
]
```

### DELETE /users/blocking/{id}

URL: `https://micro.blog/users/blocking/{id}`

Deletes a blocked user by ID.


Path parameters:
- `id` (integer, required): Resource identifier.
  Example: `12345`





Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X DELETE "https://micro.blog/users/blocking/{id}" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### POST /users/mute

URL: `https://micro.blog/users/mute`

Mutes a user or keyword for the authenticated user.




Query parameters:
- `username` (string, optional): Micro.blog username.
  Example: `gluon`
- `keyword` (string, optional): Keyword to mute.
  Example: `spoiler`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/users/mute?username=gluon" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### GET /users/muting

URL: `https://micro.blog/users/muting`

Returns muted users and keywords for the authenticated user.






Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X GET "https://micro.blog/users/muting" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns a JSON response for the requested resource.
Example response:

```json
[
  {
    "id": 12345,
    "username": "gluon",
    "domain": "",
    "keyword": "spoiler",
    "is_hiding_other_replies": true
  }
]
```

### DELETE /users/muting/{id}

URL: `https://micro.blog/users/muting/{id}`

Deletes a muted user or keyword by ID.


Path parameters:
- `id` (integer, required): Identifier for the resource.
  Example: `12345`





Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X DELETE "https://micro.blog/users/muting/{id}" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### POST /users/muting/{id}

URL: `https://micro.blog/users/muting/{id}`

Updates a muted user or keyword setting.


Path parameters:
- `id` (integer, required): Resource identifier.
  Example: `12345`



Query parameters:
- `is_hiding_other_replies` (integer, optional): Whether muted-user replies from other people should be hidden.
  Example: `1`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/users/muting/{id}" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

### POST /users/report

URL: `https://micro.blog/users/report`

Reports a user for review.




Query parameters:
- `username` (string, required): Micro.blog username.
  Example: `vincent`



Header parameters:
- `Authorization` (string, required): Bearer token for authentication. Format: `Bearer {token}`.
  Example: `Bearer EF7BB9BCAC1F6D561C93`




Example request:

```sh
curl -X POST "https://micro.blog/users/report?username=vincent" \
  --header "Authorization: Bearer EF7BB9BCAC1F6D561C93"
```

Response:
- Status: 200
- Content-Type: `application/json`
- Description: Returns an empty JSON object on success.
Example response:

```json
{}
```

