# Get block status of accounts/hosts

`GET /api/v1/blocklist/status`

Authentication: no security requirement declared for this operation.

Parameters:

- `accounts` (query, Array<string>, optional) - Check if these accounts are blocked
  Type: Array<string>
  
  Items:
    Type: string

- `hosts` (query, Array<string>, optional) - Check if these hosts are blocked
  Type: Array<string>
  
  Items:
    Type: string

Responses:

- 200: successful operation

Content type: application/json

Type: BlockStatus

Schema: [BlockStatus](https://sourcey-peertube.pages.dev/api-rest-reference/models/blockstatus.md)

- `accounts` (optional)
  Type: object
  
  Additional properties: 
    Type: object
    
    - `blockedByServer` (optional)
      Type: boolean
    
    - `blockedByServerSubscription` (optional)
      Type: string
    
    - `blockedByUser` (optional)
      Type: boolean

- `hosts` (optional)
  Type: object
  
  Additional properties: 
    Type: object
    
    - `blockedByServer` (optional)
      Type: boolean
    
    - `blockedByServerSubscription` (optional)
      Type: string
    
    - `blockedByUser` (optional)
      Type: boolean

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/blocklist/status?accounts=goofy%40example.com&accounts=donald%40example.com&hosts=example.com'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/blocklist/status?accounts=goofy%40example.com&accounts=donald%40example.com&hosts=example.com', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/blocklist/status?accounts=goofy%40example.com&accounts=donald%40example.com&hosts=example.com')
print(response.text)
```
