Use content workspaces to organize and store your marketing content, such as emails and email templates. Use the CMS Spaces endpoints in Connect API to create and manage workspaces.
Create a Workspace
To create a workspace, issue a POST request to the /services/data/{apiVersion}/connect/cms/spaces endpoint.
| Property | Data Type | Description |
|---|---|---|
name |
string | Required. The workspace name. |
description |
string | A description of the workspace. |
defaultLanguage |
string | The default language locale for the workspace, such ja_JP. |
spaceType |
string | The type of workspace to create. Possible values are Marketing or Content. |
apiName |
string | An API name for the workspace. |
This sample request shows how to create a marketing workspace.
POST /services/data/{apiVersion}/connect/cms/spaces HTTP/1.1
Host: {subdomain}.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN
{
"name": "MCN Workspace",
"description": "Content for MCN Workspace",
"defaultLanguage": "en_US",
"spaceType": "Marketing",
"apiName": "MCN_Workspace"
}
If the request is successful, the response includes metadata about the workspace.
{
"apiName": "MCN_Workspace",
"createdBy": "005QZ000004x1CHYAY",
"createdDate": "2026-03-23T18:01:08.000Z",
"defaultLanguage": "en_US",
"description": "Content for MCN Workspace",
"fullyQualifiedName": "MCN_Workspace--marketing",
"id": "0ZuQZ0000004YSv0AM",
"isEnhancedSpace": true,
"isFlowOrchestrationEnabled": true,
"lastModifiedBy": "005QZ000004x1CHYAY",
"lastModifiedDate": "2026-03-23T23:47:36.000Z",
"name": "MCN Workspace",
"rootFolderId": "9PuQZ0000004bLx0AI",
"spaceType": {
"apiName": "marketing"
}
}
Copy the value of the id property. You use this ID to create content in the workspace.
Retrieve a Workspace by ID
To retrieve details about a specific workspace, issue a GET request to the /services/data/{apiVersion}/connect/cms/spaces/{contentSpaceOrFolderId} endpoint.
GET /services/data/{apiVersion}/connect/cms/spaces/0ZuQZ0000004YSv0AM HTTP/1.1
Host: {subdomain}.my.salesforce.com
Authorization: Bearer YOUR_BEARER_TOKEN
If the request is successful, the response includes workspace details.
{
"apiName": "MCN_Workspace",
"createdBy": "005QZ000004x1CHYAY",
"createdDate": "2026-03-23T18:01:08.000Z",
"defaultLanguage": "en_US",
"description": "Content for MCN Workspace",
"id": "0ZuQZ0000004YSv0AM",
"name": "MCN Workspace",
"rootFolderId": "9PuQZ0000004bLx0AI",
"spaceType": {
"apiName": "marketing"
}
}
Retrieve All Workspaces
To retrieve a list of all workspaces, issue a GET request to the /services/data/{apiVersion}/connect/cms/spaces endpoint. This table lists the query parameters that you can include in the request.
| Query Parameter | Data Type | Description |
|---|---|---|
nameFragment |
string | A string of text to filter results by. The API returns only the workspaces with names that contain this value. |
page |
int | The page number of results to return. The first page of results is page 0. |
pageSize |
int | The number of results to return per page. The maximum value is 250. The default value is 25. |
This code example shows how to retrieve a list of all workspaces.
GET /services/data/{apiVersion}/connect/cms/spaces?pageSize=25 HTTP/1.1
Host: {subdomain}.my.salesforce.com
Authorization: Bearer YOUR_BEARER_TOKEN
If the request is successful, the response includes a list of workspaces.
{
"currentPageUrl": "/services/data/v68.0/connect/cms/spaces?page=0&pageSize=250",
"nextPageUrl": null,
"previousPageUrl": null,
"spaces": [
{
"apiName": "MCN_Workspace",
"id": "0ZuQZ0000004YSv0AM",
"name": "MCN Workspace",
"spaceType": {
"apiName": "marketing"
}
}
],
"total": 1
}
Use the id value from a workspace to create content in that workspace.
Update a Workspace
To update a workspace name or description, issue a PATCH request to the /services/data/{apiVersion}/connect/cms/spaces/{contentSpaceOrFolderId} endpoint. In the body of the request, include only the fields that you want to update.
note: You can’t change the ID of the workspace in a PATCH request.
This sample request shows how to change the name and description of a workspace.
PATCH /services/data/{apiVersion}/connect/cms/spaces/0ZuQZ0000004YSv0AM HTTP/1.1
Host: {subdomain}.my.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN
{
"name": "Updated Workspace Name",
"description": "Updated description for the workspace"
}