Skip to content

Commit

Permalink
Add routes to (un)block a user
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonne Haß authored and jhass committed Mar 20, 2020
1 parent f1bdd57 commit b9e2a7d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions _routes/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,49 @@ GET /api/v1/users/:person_guid/photos
| Status code | Error reason |
| ----------- | ------------------------------------------ |
| 404 | User with provided guid could not be found |

## Block a user

Required API scope: `contacts:modify`.

### Request

~~~
POST /api/v1/users/:person_guid/block
~~~

### Response

~~~
Status: 201 Created
~~~

### Errors

| Status code | Error reason |
| ----------- | ------------------------------------------ |
| 404 | User with provided guid could not be found |
| 409 | Block already exists |

## Unblock a user

Required API scope: `contacts:modify`.

### Request

~~~
DELETE /api/v1/users/:person_guid/block
~~~

### Response

~~~
Status: 204 No Content
~~~

### Errors

| Status code | Error reason |
| ----------- | ------------------------------------------ |
| 404 | User with provided guid could not be found |
| 410 | Block doesn't exist |

0 comments on commit b9e2a7d

Please sign in to comment.