domain-blocks.md 1.12 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

## GET /api/v1/domain_blocks

Domains the user has blocked.

Returns array of string.

### Resource information

17
{{< api_method_info auth="Yes" user="Yes" scope="read read:blocks follow" version="1.4.0" >}}
Eugen Rochko's avatar
Eugen Rochko committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

### 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

35
{{< api_method_info auth="Yes" user="Yes" scope="write write:blocks follow" version="1.4.0" >}}
Eugen Rochko's avatar
Eugen Rochko committed
36 37 38

### Parameters

Eugen Rochko's avatar
Eugen Rochko committed
39 40 41
|Name|Description|Required|
|----|-----------|:------:|
| `domain` | Domain to block| Required |
Eugen Rochko's avatar
Eugen Rochko committed
42 43 44 45 46 47 48

## DELETE /api/v1/domain_blocks

Remove a domain block.

### Resource information

49
{{< api_method_info auth="Yes" user="Yes" scope="write write:blocks follow" version="1.4.0" >}}
Eugen Rochko's avatar
Eugen Rochko committed
50 51 52

### Parameters

Eugen Rochko's avatar
Eugen Rochko committed
53 54 55
|Name|Description|Required|
|----|-----------|:------:|
| `domain` | Domain to unblock| Required |