domain-blocks.md 1.15 KB
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1
---
Eugen Rochko's avatar
Eugen Rochko committed
2
title: Domain blocks
Eugen Rochko's avatar
Eugen Rochko committed
3 4
menu:
  docs:
Eugen Rochko's avatar
Eugen Rochko committed
5
    parent: rest-api
Eugen Rochko's avatar
Eugen Rochko committed
6 7
    weight: 10
---
Eugen Rochko's avatar
Eugen Rochko committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

## GET /api/v1/domain_blocks

Domains the user has blocked.

Returns array of string.

### Resource information

{{< api_method_info auth="Yes" user="Yes" scope="read read:blocks follow" version="0.0.0" >}}

### Parameters

|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
| `limit` | Maximum number of results | Optional | 40 |

### Pagination

{{< api_pagination >}}

## POST /api/v1/domain_blocks

Block a domain to hide all public posts from it, all notifications from it, and remove all followers from it.

### Resource information

{{< api_method_info auth="Yes" user="Yes" scope="write write:blocks follow" version="0.0.0" >}}

### Parameters

|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
| `domain` | Domain to block| Required ||

## DELETE /api/v1/domain_blocks

Remove a domain block.

### Resource information

{{< api_method_info auth="Yes" user="Yes" scope="write write:blocks follow" version="0.0.0" >}}

### Parameters

|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
| `domain` | Domain to block| Required ||