View Recently Viewed Records

Use the Recently Viewed Items resource to get a list of recently viewed records.

Example usage for getting the last two most recently viewed records

curl https://MyDomainName.my.salesforce.com/services/data/v68.0/recent/?limit=2 -H "Authorization: Bearer token"

Example request body

none required

Example response body

{ 
    "attributes" : 
    { 
        "type" : "Account", 
        "url" : "/services/data/v68.0/sobjects/Account/a06U000000CelH0IAJ" 
    }, 
    "Id" : "a06U000000CelH0IAJ", 
    "Name" : "Acme" 
}, 
{ 
    "attributes" : 
    { 
        "type" : "Opportunity", 
        "url" : "/services/data/v68.0/sobjects/Opportunity/a06U000000CelGvIAJ" 
    }, 
    "Id" : "a06U000000CelGvIAJ", 
    "Name" : "Acme - 600 Widgets" 
}