POST Create tracked link
POST /services/data/{apiVersion}/connect/cms/contents
Operation ID: createTrackedLink. Tags: Tracked Link.
Creates a tracked link content item.
Request body (required)
Media type: application/json. Schema: TrackedLinkRequest.
Example: basicLink Basic tracked link with UTM parameters.
{
"contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
"contentType": "sfdc_cms__trackedLink",
"contentBody": {
"sfdc_cms:title": "Campaign Link",
"campaign": "701xx000000001AAA",
"destinationUrl": "https://www.example.com/product",
"utmSource": "email",
"utmMedium": "newsletter",
"utmCampaign": "spring_sale_2024",
"utmContent": "cta_button"
}
}
Responses
- 201
Tracked link created successfully.
Media type:
application/json. Schema:TrackedLinkResponse.Example: complete Complete response.
{ "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentBody": { "sfdc_cms:title": "Campaign Link", "campaign": "701xx000000001AAA", "destinationUrl": "https://www.example.com/product", "utmSource": "email", "utmMedium": "newsletter", "utmCampaign": "spring_sale_2024", "utmContent": "cta_button" }, "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__trackedLink--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentSpace": { "id": "0ZuSB000002FYzW0AW", "resourceUrl": "/services/data/v65.0/connect/cms/spaces/0ZuSB000002FYzW" }, "contentType": { "fullyQualifiedName": "sfdc_cms__trackedLink" }, "createdBy": { "id": "005SB00000eaki1YAA", "name": "Admin User", "resourceUrl": "/services/data/v65.0/chatter/users/005SB00000eaki1YAA" }, "createdDate": "2026-06-16T20:34:56.000Z", "externalId": null, "folder": { "id": "9PuSB000002KUDo0AO", "resourceUrl": "/services/data/v65.0/connect/cms/folders/9PuSB000002KUDo0AO" }, "isPublished": false, "language": "en_US", "lastModifiedBy": { "id": "005SB00000eaki1YAA", "name": "Admin User", "resourceUrl": "/services/data/v65.0/chatter/users/005SB00000eaki1YAA" }, "lastModifiedDate": "2026-06-16T20:34:56.000Z", "managedContentId": "20YSB000004SkOz2AK", "managedContentVariantId": "9PsSB0000045XAj0AM", "managedContentVersionId": "5OUSB000004K7np4AC", "status": { "label": "Draft", "status": "Draft" }, "title": "Campaign Link", "urlName": "campaign-link", "versionNumber": "1.1" } - 400
Invalid request body.
Media type:
application/json. Schema:Error.Example: missingCampaign Missing campaign field.
{ "error": "VALIDATION_ERROR", "message": "Required field 'campaign' is missing", "details": [ { "field": "contentBody.campaign", "message": "This field is required" } ] }Example: invalidDestinationUrl Invalid destination URL.
{ "error": "VALIDATION_ERROR", "message": "Invalid destination URL", "details": [ { "field": "contentBody.destinationUrl", "message": "URL must be a valid HTTPS URL" } ] } - 401
Unauthorized.
Media type:
application/json. Schema:Error.Example: response Example response.
{ "error": "UNAUTHORIZED", "message": "Authentication credentials are missing or invalid" } - 403
Forbidden.
Media type:
application/json. Schema:Error.Example: response Example response.
{ "error": "FORBIDDEN", "message": "Insufficient permissions to create tracked links" } - 500
Internal server error.
Media type:
application/json. Schema:Error.Example: response Example response.
{ "error": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred while processing the request" } - 503
Service unavailable.
Media type:
application/json. Schema:Error.Example: response Example response.
{ "error": "SERVICE_UNAVAILABLE", "message": "The service is temporarily unavailable. Please try again later" }