Roles

Get all roles of a user

GET https://yourwebsite.com/api/users/<user>/roles

Path Parameters

[
    {
        "id": "2",
        "discordRoleID": "673855784005795840",
        "name": "Admin",
        "slug": "admin",
        "priority": "99",
        "expiryDate": "1000-01-01 00:00:00", // Permanent role
    },
    {
        "id": "3",
        "discordRoleID": "673855784005795841",
        "name": "VIP",
        "slug": "vip",
        "priority": "5",
        "expiryDate": "2023-09-03 12:30:45", // Temporary role
    }
]

Add role to user

POST https://yourwebsite.com/api/users/<user>/roles

Path Parameters

Request Body

[
    {
        "id": "2",
        "discordRoleID": "673855784005795840",
        "name": "Admin",
        "slug": "admin",
        "priority": "99",
        "expiryDate": "1000-01-01 00:00:00", // Permanent role
    },
    {
        "id": "3",
        "discordRoleID": "673855784005795841",
        "name": "VIP",
        "slug": "vip",
        "priority": "5",
        "expiryDate": "2023-09-03 12:30:45", // Temporary role
    }
]

Update user roles

PATCH https://yourwebsite.com/api/users/<user>/roles/<role>

Path Parameters

Request Body

[
    {
        "id": "2",
        "discordRoleID": "673855784005795840",
        "name": "Admin",
        "slug": "admin",
        "priority": "99",
        "expiryDate": "1000-01-01 00:00:00", // Permanent role
    },
    {
        "id": "3",
        "discordRoleID": "673855784005795841",
        "name": "VIP",
        "slug": "vip",
        "priority": "5",
        "expiryDate": "2023-09-03 12:30:45", // Temporary role
    }
]

Remove role from user

DELETE https://yourwebsite.com/api/users/<user>/roles/<role>

Path Parameters

[
    {
        "id": "2",
        "discordRoleID": "673855784005795840",
        "name": "Admin",
        "slug": "admin",
        "priority": "99",
        "expiryDate": "1000-01-01 00:00:00", // Permanent role
    },
    {
        "id": "3",
        "discordRoleID": "673855784005795841",
        "name": "VIP",
        "slug": "vip",
        "priority": "5",
        "expiryDate": "2023-09-03 12:30:45", // Temporary role
    }
]

Last updated