(Un)blocking users
You can block or unblock users from using Yunite on your server using this endpoint.
POST
Block or unblock a Discord or Epic user
https://yunite.xyz/api/v3/guild/{guildId}/registration/blocks
- Request
- Response
Path Parameters
Request Body
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
- Schema
- Example
{ "type": "object", "properties": { "op": { "type": "string", "value": "one of ['BLOCK', 'UNBLOCK']" }, "userType": { "type": "string", "value": "one of ['DISCORD', 'EPIC']" }, "userId": { "type": "string", "value": "DisordID / EpicID, depending on given type" }, "reason": { "type": "string", "value": "add a reason for blocking the user; required if blocking, ignored if unblocking" }, "blockLinkedUser": { "type": "boolean", "value": "set to true if the linked user should be block as well if present; set to false otherwise" } } }
{ "op": "BLOCK", "userType": "DISCORD", "userId": "12345654321123432", "reason": "Griefing games", "blockLinkedUser": true }
- Schema
- Example
{ "type": "object", "properties": { "status": { "type": "string", "value": "one of ['SUCCESS', 'ALREADY_BLOCKED,', 'NOT_BLOCKED', 'NOT_FOUND' ]" }, "message": { "type": "string", "value": "a message explaining the status value" }, "unlinkedFrom": { "type": "object", "optional": true, "properties": { "epicID": { "type": "string?", "value": "filled in if blocked Discord account was linked to an Epic user; absent if this request blocks an Epic account" }, "epicName": { "type": "string?", "value": "filled in if blocked Discord account was linked to an Epic user; absent if this request blocks an Epic account" }, "id": { "type": "string?", "value": "filled in if blocked Epic account was linked to a Discord user; absent if this request block a Discord account" }, "name": { "type": "string?", "value": "filled in if blocked Epic account was linked to a Discord user; absent if this request block a Discord account" }, "avatar": { "type": "string?", "value": "filled in if blocked Epic account was linked to a Discord user; absent if this request block a Discord account" } } } } }
{ "status": "SUCCESS", "message": "User blocked successfully.", "unlinkedFrom": { "epicID": "a1c2d3e4f5a1c2d3e4f5a1c2d3e4f5a1", "epicName": "xXGrieferXx" } }