Okay, i actually don’t really have a clue what I did here, but this fixed it for me:
function allow_my_post_types($allowed_post_types) {
$allowed_post_types[] = 'portfolio';
return $allowed_post_types;
}
add_filter( 'rest_api_allowed_post_types', 'allow_my_post_types');
Thanks for providing your example in the first place 🙂