/roles/{userId} with the documented body, query parameters, headers, or multipart fields. Prefer the newer authenticated /v1/... integration API where available.{ status, message, data } wrapper.400 invalid request body, query, ObjectId, pagination, file format, or missing required field.401 missing, invalid, expired, or insufficient API key/token.403 key is valid but cannot access this community/channel/user/resource, where supported by the service.404 route or target resource was not found. Several legacy root routes returned 404 on https://api.returning.ai during smoke testing and need backend confirmation before external use.409 duplicate or conflicting state for create/update operations, where applicable.500 unexpected Returning.AI service error./v1/... endpoint in the matching non-Legacy category when one exists.curl --location 'https://api.returning.ai/roles/1102' \
--header 'x-api-key;'{
"meta": {
"success": true,
"message": "User roles fetched successfully",
"devMessage": "User roles fetched successfully"
},
"body": [
{
"_id": "{_id}",
"order": 1,
"billable": true,
"title": "Manager 2",
"description": "Role with permissions to moderate the server",
"serverPermissions": {
"allow_dm": true,
"create_invite": true,
"kick_members": true,
"ban_members": true,
"manage_roles": true,
"manage_channels": true,
"server_administrator": true,
"warn_members": true,
"suspend_members": true,
"broadcast_messages": true,
"overwrite_language_settings": true
},
"channelPermissions": {
"view_message_history": true,
"manage_messages": true,
"allow_mentions": true,
"post_messages": true,
"post_analysis": true,
"attach_files": true,
"delete_messages": true
},
"class": "red",
"serverId": "{_id}",
"createdAt": "2025-04-30T08:48:49.094Z",
"updatedAt": "2025-04-30T08:48:49.094Z",
"__v": 0
}
]
}