POST Create custom font content.
POST /services/data/{apiVersion}/connect/cms/contents
Operation ID: createCustomFont. Tags: Custom Font.
Add a font to your content workspace by uploading a font file or specifying an external font URL.
Parameters
Authorization(header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. ReplaceYOUR_ACCESS_TOKENwith your authentication token.Example
Bearer YOUR_ACCESS_TOKENapiVersion(path, string, required) The Salesforce API version, such asv68.0.
Request body (required)
The content item to create. Use the JSON media type for a URL source or the multipart media type for an uploaded file source.
Media type: application/json. Schema: CustomFontUrlRequest.
Example: urlSource Add a font from an external URL.
{
"contentSpaceOrFolderId": "0ZuQZ0000004YSv0AM",
"contentType": "sfdc_cms__customFont",
"title": "Brand Sans Regular",
"contentBody": {
"sfdc_cms:media": {
"source": {
"type": "url",
"url": "https://fonts.example.com/brand-sans-regular.woff2"
}
}
}
}
Media type: multipart/form-data. Schema: CustomFontFileRequest.
Example: fileSource Upload a font file.
{
"ManagedContentInputParam": {
"contentSpaceOrFolderId": "0ZuQZ0000004YSv0AM",
"contentType": "sfdc_cms__customFont",
"title": "Brand Sans Regular",
"contentBody": {
"sfdc_cms:media": {
"source": {
"type": "file"
}
}
}
},
"contentData": "BrandFont.woff2"
}
Responses
- 201
Indicates that the API accepted your request to add a font.
Media type:
application/json. Schema:CustomFontResponse.Example: fileSource Custom Font content created from an uploaded file.
{ "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentBody": { "sfdc_cms:media": { "source": { "type": "file", "ref": "069SB0000000001AAA", "mimeType": "font/woff2", "size": 1887436 }, "url": "/cms/media/MCJUR5WKNRHZFP7NAUQOMMNJ7CI4?version=1" } }, "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__customFont--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentSpace": { "id": "0ZuRZ000000PrAo0AK", "resourceUrl": "/services/data/v68.0/connect/cms/spaces/0ZuRZ000000PrAo" }, "contentType": { "fullyQualifiedName": "sfdc_cms__customFont" }, "contentVersion": 1, "createdBy": { "id": "005SB00000eaki1YAA", "name": "D'Angelo Cunningham", "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA\"" }, "createdDate": "2026-07-30T15:04:32.000Z", "folder": { "id": "0ZuQZ0000004YSv0AM", "resourceUrl": "/services/data/v68.0/connect/cms/folders/0ZuQZ0000004YSv0AM" }, "isPublished": false, "language": "en_US", "lastModifiedBy": { "id": "005SB00000eaki1YAA", "name": "D'Angelo Cunningham", "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA\"" }, "lastModifiedDate": "2026-07-30T15:04:32.000Z", "managedContentId": "20YSB000004SkOz2AK", "managedContentVariantId": "9PsSB0000045XAj0AM", "managedContentVersionId": "5OURZ000000e6Q54AI", "source": "User", "status": { "label": "Draft", "status": "Draft" }, "title": "Brand Sans Regular", "urlName": "brand-sans-woff2-regular", "variantVersion": 1 }Example: urlSource Added a font from an external URL.
{ "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentBody": { "sfdc_cms:media": { "source": { "type": "url", "url": "/cms/media/MCJUR5WKNRHZFP7NAUQOMMNJ7CI4?version=1" }, "url": "/cms/media/MCJUR5WKNRHZFP7NAUQOMMNJ7CI4?version=1" } }, "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__customFont--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4", "contentSpace": { "id": "0ZuRZ000000PrAo0AK", "resourceUrl": "/services/data/v68.0/connect/cms/spaces/0ZuRZ000000PrAo" }, "contentType": { "fullyQualifiedName": "sfdc_cms__customFont" }, "contentVersion": 1, "createdBy": { "id": "005SB00000eaki1YAA", "name": "D'Angelo Cunningham", "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA\"" }, "createdDate": "2026-07-30T15:04:32.000Z", "folder": { "id": "0ZuQZ0000004YSv0AM", "resourceUrl": "/services/data/v68.0/connect/cms/folders/0ZuQZ0000004YSv0AM" }, "isPublished": false, "language": "en_US", "lastModifiedBy": { "id": "005SB00000eaki1YAA", "name": "D'Angelo Cunningham", "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA\"" }, "lastModifiedDate": "2026-07-30T15:04:32.000Z", "managedContentId": "20YSB000004SkOz2AK", "managedContentVariantId": "9PsSB0000045XAj0AM", "managedContentVersionId": "5OURZ000000e6Q54AI", "source": "User", "status": { "label": "Draft", "status": "Draft" }, "title": "Brand Sans Regular", "urlName": "brand-sans-woff2-regular", "variantVersion": 1 } - 401
The request requires valid authentication credentials.
Media type:
application/json. Schema:ErrorList.Example: unauthorized Authentication credentials are missing or invalid.
[ { "errorCode": "UNAUTHORIZED", "message": "Authentication credentials are missing or invalid" } ] - 403
You don't have access to the managed content system. Connect API performs this organization-level or user-level access check before it evaluates folder-level access or request parameters.
Media type:
application/json. Schema:ErrorList.Example: managedContentUnavailable Managed content isn't enabled for the user.
[ { "errorCode": "INSUFFICIENT_ACCESS_OR_READONLY", "message": "This feature is not currently enabled for this user." } ] - 500
An internal server error occurred while the API processed the request.
Media type:
application/json. Schema:ErrorList.Example: internalServerError An unexpected error occurred.
[ { "errorCode": "INTERNAL_SERVER_ERROR", "message": "An unexpected error occurred while processing the request" } ] - 503
The service is temporarily unavailable. Try the request again later.
Media type:
application/json. Schema:ErrorList.Example: serviceUnavailable The service is temporarily unavailable.
[ { "errorCode": "SERVICE_UNAVAILABLE", "message": "The service is temporarily unavailable. Please try again later" } ]