Experience API
The Experience API in Salesforce is the set of REST endpoints that expose Experience Cloud (formerly Community Cloud) data and capabilities for custom mobile apps, headless Experience Cloud sites, and external integrations.
Definition
The Experience API in Salesforce is the set of REST endpoints that expose Experience Cloud (formerly Community Cloud) data and capabilities for custom mobile apps, headless Experience Cloud sites, and external integrations. It is part of the broader Connect REST API (the chatter-style social-data API) but scoped to Experience Cloud sites: site members, feeds, recommendations, gamification, communities, groups. The Experience API is what powers branded customer-facing apps that need to talk to an Experience Cloud site without using the rendered LWR pages.
Experience API endpoints follow the pattern /services/data/v60.0/connect/communities/{communityId}/resource, where the resource is feeds, members, groups, recommendations, knowledge, or similar. The API supports both authenticated user calls (using OAuth or named credentials) and certain anonymous public-knowledge calls. Lightning Web Runtime (LWR) Experience Cloud sites use a similar API under the hood; headless deployments use it directly.
What the Experience API exposes
The Connect REST API umbrella
The Connect REST API is Salesforce''s API for social and engagement data: Chatter feeds, files, recommendations, groups. The Experience API is the subset focused on Experience Cloud sites. They share the same authentication, URL structure, and response formats; the Experience API just scopes calls to a specific community context.
Authentication: OAuth and Named Credentials
Experience API calls require authentication. Standard patterns: OAuth 2.0 for end-user access (a customer''s mobile app authenticates as the customer), Named Credential for org-internal calls (a Lambda or backend service authenticates as a system user). Anonymous public-knowledge endpoints (Knowledge articles tagged as public) work without authentication, with limits.
Feed and engagement endpoints
The Experience API exposes Chatter feeds within communities: GET /services/data/v60.0/connect/communities/communityId/chatter/feeds/news/me returns the current user''s news feed. Endpoints for posting, commenting, liking, and following all exist. Custom mobile apps use these to build branded social-feed experiences without rendering the Experience Cloud pages.
Member, group, and gamification endpoints
Beyond feeds, the API exposes community members (lookup users), groups (create, join, invite), badges (gamification points and achievements). Custom community apps can extend the standard Experience Cloud UI with bespoke features: a custom leaderboard, a member directory, a points-redemption flow.
Knowledge endpoints for help center apps
Experience Cloud''s Knowledge integration surfaces through the Experience API: search articles, get article details, get suggested articles by tag. Public-knowledge endpoints (articles flagged for the Public channel) work without authentication, useful for customer help centers embedded in non-Salesforce apps.
Custom recommendation endpoints
Experience Cloud''s recommendation engine (with Einstein integration) exposes endpoints for fetching personalized recommendations per user. A mobile app can call the recommendation endpoint and display Personalized for You content sourced from Experience Cloud''s behavioral data.
LWR headless deployment
Experience Cloud''s LWR template is increasingly headless-friendly: the same Experience API endpoints that power the rendered LWR site can power a React or Next.js app deployed entirely off Salesforce. The Experience Builder API helps with content rendering decisions, and the Salesforce GraphQL API offers a complementary query layer for headless setups.
How to call the Experience API from a custom mobile app
Calling the Experience API takes the standard OAuth flow plus a community context. The same patterns work for iOS, Android, and JavaScript clients; the differences are language-specific HTTP library handling.
- Set up OAuth in your community
Setup, then Connected Apps, then create a new Connected App. Enable OAuth for the relevant scopes (api, chatter_api, full). Configure the redirect URI for your mobile app.
- Implement the OAuth flow
In your mobile app, redirect the user to login.salesforce.com or your community''s branded login URL. The user authenticates; Salesforce redirects back with an authorization code. Exchange the code for an access token.
- Identify the community ID
Call GET /services/data/v60.0/connect/communities to list the user''s accessible communities. Pick the right one and note the communityId for subsequent calls.
- Call Experience API endpoints
Standard pattern: GET https://instance.my.salesforce.com/services/data/v60.0/connect/communities/communityId/resource with Authorization: Bearer token. Replace resource with feeds, groups, members, recommendations, etc.
- Handle pagination and rate limits
Most Experience API endpoints return paginated responses. Follow the nextPageUrl in the response. Watch for HTTP 429 (rate limited); back off and retry.
- Refresh tokens
OAuth access tokens expire (typically 2 hours). Use the refresh token to get new access tokens without re-prompting the user. Store refresh tokens securely; they grant long-term access.
Standard pattern for customer-facing mobile apps. User logs in; the app acts as them.
Pattern for backend services calling the API as a system user.
Limited endpoints work without authentication for public-flagged content.
Salesforce GraphQL API offers a query layer that complements Experience API REST endpoints.
- Community context is mandatory for most endpoints. Forgetting to pass communityId returns 404 or 403; do not assume default community routing.
- Public Knowledge endpoints require the article''s Channel to include Public Knowledge Base. Marking articles correctly is part of the API readiness.
- Rate limits are per-org-per-user. Heavy mobile usage can hit limits; design for graceful degradation.
- OAuth token storage on mobile is a security concern. Use platform secure storage (Keychain on iOS, Keystore on Android), not plain text.
Trust & references
Straight from the source - Salesforce's reference material on Experience API.
- Connect REST API OverviewSalesforce Developers
- Experience Cloud Developer GuideSalesforce Developers
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is an Experience API in MuleSoft's API-led approach?
Q2. What are the three layers in API-led connectivity?
Q3. Why use API-led layering?
Discussion
Loading discussion…