---
schema_version: "1"
id: 7003a81661445b49f3635e378f48ee5c3ab3189680e358db2c0d76c0b9b62f86
title: |-
  Accessing ConnectApi Data in Experience Cloud
      Sites
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_connectapi_communities.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_communities.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: bc1102ef30adb26bb4c0a968d3d78b480b5f53ff302d5120905a8d92a9a986b2
description: Many ConnectApi methods work within the context of a single Experience Cloud site.
---
# Accessing ConnectApi Data in Experience Cloud Sites

Many ConnectApi methods work within the context of a single Experience Cloud site.

Many ConnectApi methods include communityId as the first argument. If you don’t have digital experiences enabled, use internal or null for this argument.

If you have digital experiences enabled, the communityId argument specifies whether to execute a method in the context of the default Experience Cloud site (by specifying internal or null) or in the context of a specific site (by specifying an ID). Any entity, such as a comment or a feed item, referred to by other arguments in the method must be in the specified site. The ID is included in URLs returned in the output.

Some ConnectApi methods include siteId as an argument. Unlike communityId, if you don’t have digital experiences enabled, you can’t use these methods. The site ID is included in URLs returned in the output.

Most URLs returned in ConnectApi output objects are Connect REST API resources.

If you specify an ID, URLs returned in the output use the following format, where communityId and resource are placeholder values:

/connect/communities/communityId/resource

If you specify internal, URLs returned in the output use the same format:

/connect/communities/internal/resource

If you specify null, URLs returned in the output use one of these formats:

/chatter/resource

/connect/resource