I would like to have a custom access management API run when I try to access any item in a Sharepoint List. The custom API would take an item metadata as a parameter and return a boolean if the list item is accessible for the current user and then Sharepoint should use the same to allow access to the item. Is this a possibility in Sharepoint? If not what is the closest that I can achieve?
In SharePoint we have Item Level Permission, so based on Group or user you can assign unique permission to the item.
Please refer these articles
Edit: As per comment by Codecrasher99 updated the Answer
As you are looking to verify with a third party based on a column value in the List item.so that means user will access the List item View after this third party API will get called and if no Access it will redirect user again back to list or else it will stay at Item View page. to Achieve this you have following methods :
below are few code samples available using JSLink
Option 2 :SPFx extension field Customizer
With JSLink i have done a similar code where we need to query User profile service when user enter the username and populate other data in columns. so it was achievable.