For custom inbound REST API using Apex in Salesforce, check the below link
https://www.infallibletechie.com/2017/08/simple-inbound-rest-api-using-apex-in.html
Use the below as the end point
https://domainurl/services/data/v20.0/sobjects/Account/001XXXXXXXXXXXXX
Sample Workbench Request: