---
schema_version: "1"
id: f4e4cee682122bf137ab3751381741880a5dbacfc77fbf08b50ac12e809a22b5
title: Content - WhatsApp Session Message (Connect API)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mc-core/references/generated-api-specs/mc-next-whatsapp-session.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/references/mc-next-whatsapp-session
source_site: developer.salesforce.com
content_type: documentation
content_hash: caabf014ad5896413852271e68046cc4baae73ebffd8cfbc1c5e65cf8526729b
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
Content - WhatsApp Session Message (Connect API)

# Content - WhatsApp Session Message (Connect API)

Create and manage WhatsApp session message content and renditions. Session messages support text, media, location requests, and interactive buttons.

This table lists the WhatsApp session message-related use cases that the API supports.

| Supported Use Case | HTTP Verb | URI |
| --- | --- | --- |
| Create WhatsApp session message content | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-whatsapp-session?meta=createWhatsAppSession) | /services/data/{apiVersion}/connect/cms/contents/whatsappSession |
| Get WhatsApp session message content | [GET](/docs/marketing/marketing-cloud-growth/references/mc-next-whatsapp-session?meta=getWhatsAppSession) | /services/data/{apiVersion}/connect/cms/contents/{contentId} |
| Create a WhatsApp message rendition | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-whatsapp-session?meta=createWhatsAppMessageRendition) | /services/data/{apiVersion}/connect/cms/renditions/whatsappMessage |
| Update a WhatsApp session message content variant | [PUT](/docs/marketing/marketing-cloud-growth/references/mc-next-whatsapp-session?meta=updateContentVariant) | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |
| Delete a WhatsApp session message content variant | [DELETE](/docs/marketing/marketing-cloud-growth/references/mc-next-whatsapp-session?meta=deleteContentVariant) | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |

### WhatsApp Session Content Structure

The WhatsApp session content type uses a block-based architecture, shown in this example:

```json
{
  "sfdc_cms:title": "WhatsApp Session Message",
  "messageType": "Text",
  "contentBlock": {
    "type": "block",
    "definition": "sfdc_cms__whatsappMessageTypeText",
    "attributes": {
      "sfdc_cms:whatsappMessageBody": "Hello, welcome!",
      "type": "Text"
    }
  }
}
```

### Content Properties

| Property | Type | Description |
| --- | --- | --- |
| `sfdc_cms:title` | text | Required. The name of the content item. |
| `messageType` | enum | Required. The message type. See [Message Types](#message-types). |
| `description` | multiline text | A description of the content type. |
| `sfdc_cms:whatsappMessageBody` | body | The body text of the message. |

#### Message Types

WhatsApp session messages can be one of these message types:

*   **Text**—A plain text message with body content.
*   **Image**—A message with an image attachment. Can include a link and a caption.
*   **Video**—A message with a video attachment. Can include a link and a caption.
*   **Document**—A message with a document attachment. Can include a link.
*   **Audio**—A message with an audio attachment.
*   **Location Request**—A request for the recipient's location.
*   **CTA URL Button**—A call-to-action button with URL, footer, and button sub-blocks.

### Content Block Definitions

Each message type maps to a specific block definition:

*   Text messages map to `sfdc_cms__whatsappMessageTypeText`
*   Image messages map to `sfdc_cms__whatsappMessageTypeImage`
*   Video messages map to `sfdc_cms__whatsappMessageTypeVideo`
*   Document messages map to `sfdc_cms__whatsappMessageTypeDocument`
*   Audio messages map to `sfdc_cms__whatsappMessageTypeAudio`
*   Location Request messages map to `sfdc_cms__whatsappMessageTypeLocationRequest`
*   CTA URL Button messages map to `sfdc_cms__whatsappMessageTypeCtaUrlButton`

### Data Providers

WhatsApp session messages support these data providers for personalization:

*   `sfdc_cms__linkDataProvider`—Link data (`PreferenceCenterUrl`)
*   `sfdc_cms__unifiedIndividualDataProvider`—Unified Individual profile data
*   `sfdc_cms__eventListDataProvider`—Event list data
*   `sfdc_cms__organizationDataProvider`—Organization data
*   `sfdc_cms__activationListDataProvider`—Activation list data
*   `sfdc_cms__apexClassListDataProvider`—Apex class list data
*   `sfdc_cms__couponListDataProvider`—Coupon list data

### Handlebars Expression Support

WhatsApp session message content supports [Handlebars scripting](/docs/marketing/handlebars-for-marketing-cloud-next/overview) in message body fields.

**Version:** 1.0.0

## Servers

*   `https://{subdomain}.my.salesforce.com`
    *   `subdomain (default (no default)) The unique API subdomain for your Salesforce org.`

## Tags

### WhatsApp Session Content

Operations for managing WhatsApp session message content items. WhatsApp session messages can be one of these types: Text, Image, Video, Document, Audio, Location Request, and CTA URL Button.

### WhatsApp Message Rendition

Operations for managing WhatsApp message renditions. Renditions are the delivery-ready form of WhatsApp messages, supporting both session and template formats.

## Operations

### POST Create WhatsApp session message content

`POST /services/data/{apiVersion}/connect/cms/contents/whatsappSession`

Operation ID: `createWhatsAppSession`. Tags: WhatsApp Session Content.

Creates a WhatsApp session message content item. The content body includes the message title, type, and content block configuration.

#### Request body (required)

Media type: `application/json`. Schema: `WhatsAppSessionContentRequest`.

_Example: textMessage_ Text session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "WhatsApp Session Message",
    "description": "WhatsApp Session Message for Testing.",
    "messageType": "Text",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeText",
      "attributes": {
        "sfdc_cms:whatsappMessageBody": "This is a test message.",
        "type": "Text"
      }
    }
  }
}
```

_Example: textWithPersonalization_ Text message with Handlebars personalization.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Personalized Welcome Message",
    "description": "Welcome message with customer name.",
    "messageType": "Text",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeText",
      "attributes": {
        "sfdc_cms:whatsappMessageBody": "Hello {{$unifiedIndividual.FirstName}}, welcome to our service!",
        "type": "Text"
      }
    },
    "lightning:dataProviders": [
      {
        "sfdcExpressionKey": "$unifiedIndividual",
        "definition": "sfdc_cms__unifiedIndividualDataProvider",
        "attributes": {
          "objectApiName": "UnifiedIndividual__dlm"
        }
      }
    ]
  }
}
```

_Example: imageMessage_ Image session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Promotional Image Message",
    "description": "Image message with product photo.",
    "messageType": "Image",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeImage",
      "attributes": {
        "type": "Image",
        "header": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageHeaderImage",
          "attributes": {
            "link": {
              "source": {
                "type": "imageReference",
                "ref": {
                  "contentKey": "MC5IEGQZHII5GEJLZW5DVSAZHSRI"
                }
              },
              "url": "/services/data/{apiVersion}/connect/cms/media/MC5IEGQZHII5GEJLZW5DVSAZHSRI?version=1.1&fileName=promo.png"
            }
          }
        }
      }
    }
  }
}
```

_Example: videoMessage_ Video session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Product Demo Video",
    "description": "Video message with product demonstration.",
    "messageType": "Video",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeVideo",
      "attributes": {
        "type": "Video",
        "header": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageHeaderVideo",
          "attributes": {
            "link": {
              "source": {
                "type": "videoReference",
                "ref": {
                  "contentKey": "MC5VIDQZHII5GEJLZW5DVSAZHSRI"
                }
              },
              "url": "/services/data/{apiVersion}/connect/cms/media/MC5VIDQZHII5GEJLZW5DVSAZHSRI?version=1.0&fileName=demo.mp4"
            }
          }
        }
      }
    }
  }
}
```

_Example: documentMessage_ Document session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Invoice Document",
    "description": "Document message with PDF attachment.",
    "messageType": "Document",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeDocument",
      "attributes": {
        "type": "Document",
        "header": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageHeaderDocument",
          "attributes": {
            "link": {
              "source": {
                "type": "documentReference",
                "ref": {
                  "contentKey": "MC5DOCQZHII5GEJLZW5DVSAZHSRI"
                }
              },
              "url": "/services/data/{apiVersion}/connect/cms/media/MC5DOCQZHII5GEJLZW5DVSAZHSRI?version=1.0&fileName=invoice.pdf"
            }
          }
        }
      }
    }
  }
}
```

_Example: audioMessage_ Audio session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Audio Greeting",
    "messageType": "Audio",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeAudio",
      "attributes": {
        "type": "Audio",
        "header": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageHeaderAudio",
          "attributes": {
            "link": {
              "source": {
                "type": "audioReference",
                "ref": {
                  "contentKey": "MC5AUDQZHII5GEJLZW5DVSAZHSRI"
                }
              },
              "url": "/services/data/{apiVersion}/connect/cms/media/MC5AUDQZHII5GEJLZW5DVSAZHSRI?version=1.0&fileName=greeting.mp3"
            }
          }
        }
      }
    }
  }
}
```

_Example: locationRequestMessage_ Location request session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Request Customer Location",
    "description": "Ask for delivery location.",
    "messageType": "Location Request",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeLocationRequest",
      "attributes": {
        "type": "Location Request"
      }
    }
  }
}
```

_Example: ctaUrlButtonMessage_ CTA URL Button session message.

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappSession",
  "contentBody": {
    "sfdc_cms:title": "Visit Our Website CTA",
    "description": "CTA button linking to website.",
    "messageType": "CTA URL Button",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms__whatsappMessageTypeCtaUrlButton",
      "attributes": {
        "type": "CTA URL Button",
        "sfdc_cms:whatsappMessageBody": "Check out our latest offers!",
        "footer": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageFooter",
          "attributes": {
            "text": "Tap below to visit"
          }
        },
        "ctaButton": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageCtaButton",
          "attributes": {
            "displayText": "Visit Website",
            "url": "https://example.com/offers"
          }
        }
      }
    }
  }
}
```

#### Responses

*   **201** WhatsApp session message content created successfully.
    
    Media type: `application/json`. Schema: `WhatsAppSessionContentResponse`.
    
    _Example: complete_ Complete response.
    
    ```
    {
      "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentBody": {
        "sfdc_cms:title": "WhatsApp Session Message",
        "description": "WhatsApp Session Message for Testing.",
        "messageType": "Text",
        "contentBlock": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageTypeText",
          "attributes": {
            "sfdc_cms:whatsappMessageBody": "This is a test message.",
            "type": "Text"
          }
        }
      },
      "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__whatsappSession--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentSpace": {
        "id": "0ZuSB000002FYzW0AW",
        "resourceUrl": "/services/data/v68.0/connect/cms/spaces/0ZuSB000002FYzW"
      },
      "contentType": {
        "fullyQualifiedName": "sfdc_cms__whatsappSession"
      },
      "createdBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "createdDate": "2026-06-16T20:34:56.000Z",
      "externalId": null,
      "folder": {
        "id": "9PuSB000002KUDo0AO",
        "resourceUrl": "/services/data/v68.0/connect/cms/folders/9PuSB000002KUDo0AO"
      },
      "isPublished": false,
      "language": "en_US",
      "lastModifiedBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "lastModifiedDate": "2026-06-16T20:34:56.000Z",
      "managedContentId": "20YSB000004SkOz2AK",
      "managedContentVariantId": "9PsSB0000045XAj0AM",
      "managedContentVersionId": "5OUSB000004K7np4AC",
      "status": {
        "label": "Draft",
        "status": "Draft"
      },
      "title": "WhatsApp Session Message",
      "urlName": "whatsapp-session-message",
      "versionNumber": "1.1"
    }
    ```
    
*   **400** Invalid request body.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: missingTitle_ Missing required sfdc\_cms:title.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'sfdc_cms:title' is missing",
      "details": [
        {
          "field": "contentBody.sfdc_cms:title",
          "message": "Title: Complete this field."
        }
      ]
    }
    ```
    
    _Example: missingMessageType_ Missing required messageType.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'messageType' is missing",
      "details": [
        {
          "field": "contentBody.messageType",
          "message": "Message Type: Complete this field."
        }
      ]
    }
    ```
    
    _Example: invalidMessageType_ Invalid message type value.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Invalid value for field 'messageType'",
      "details": [
        {
          "field": "contentBody.messageType",
          "message": "Type must be one of: Text, Image, Video, Document, Audio, Location Request, CTA URL Button"
        }
      ]
    }
    ```
    
    _Example: additionalProperties_ Additional properties not allowed.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Additional properties are not allowed",
      "details": [
        {
          "field": "contentBody.invalidProperty",
          "message": "You can't add the invalidProperty property because additionalProperties is set to false."
        }
      ]
    }
    ```
    
    _Example: bodyTooLong_ The message body exceeds the maximum length.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Field exceeds maximum length",
      "details": [
        {
          "field": "contentBody.contentBlock.attributes.sfdc_cms:whatsappMessageBody",
          "message": "Message body must be 2000 characters or fewer"
        }
      ]
    }
    ```
    
*   **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 WhatsApp session message content"
    }
    ```
    
*   **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"
    }
    ```
    

### GET Get WhatsApp session message by ID

`GET /services/data/{apiVersion}/connect/cms/contents/{contentId}`

Operation ID: `getWhatsAppSession`. Tags: WhatsApp Session Content.

Retrieves a specific WhatsApp session message content item by its unique identifier.

#### Parameters

*   `contentId` (path, string, required) Unique identifier of the content item.
    
    _Example_
    
    ```
    20Yxx0000006GHTEA2
    ```
    

#### Responses

*   **200** WhatsApp session message details.
    
    Media type: `application/json`. Schema: `WhatsAppSessionContentResponse`.
    
    _Example: complete_ Complete response.
    
    ```
    {
      "apiName": "MCJUR5WKNRHZFP7NAUQOMEXAMPLE",
      "contentBody": {
        "sfdc_cms:title": "WhatsApp Session Message",
        "description": "WhatsApp Session Message for Testing.",
        "messageType": "Text",
        "contentBlock": {
          "type": "block",
          "definition": "sfdc_cms__whatsappMessageTypeText",
          "attributes": {
            "sfdc_cms:whatsappMessageBody": "This is a test message.",
            "type": "Text"
          }
        }
      },
      "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__whatsappSession--MCJUR5WKNRHZFP7NAUQOMEXAMPLE",
      "contentKey": "MCJUR5WKNRHZFP7NAUQOMEXAMPLE",
      "contentSpace": {
        "id": "0ZuSB000002FYzW0AW",
        "resourceUrl": "/services/data/v68.0/connect/cms/spaces/0ZuSB000002FYzW"
      },
      "contentType": {
        "fullyQualifiedName": "sfdc_cms__whatsappSession"
      },
      "createdBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "createdDate": "2026-06-16T20:34:56.000Z",
      "externalId": null,
      "folder": {
        "id": "9PuSB000002KUDo0AO",
        "resourceUrl": "/services/data/v68.0/connect/cms/folders/9PuSB000002KUDo0AO"
      },
      "isPublished": false,
      "language": "en_US",
      "lastModifiedBy": {
        "id": "005SB00000eaki1YAA",
        "name": "Admin User",
        "resourceUrl": "/services/data/v68.0/chatter/users/005SB00000eaki1YAA"
      },
      "lastModifiedDate": "2026-06-16T20:34:56.000Z",
      "managedContentId": "20YSB000004SkOz2AK",
      "managedContentVariantId": "9PsSB0000045XAj0AM",
      "managedContentVersionId": "5OUSB000004K7np4AC",
      "status": {
        "label": "Draft",
        "status": "Draft"
      },
      "title": "WhatsApp Session Message",
      "urlName": "whatsapp-session-message",
      "versionNumber": "1.1"
    }
    ```
    
*   **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 view WhatsApp session message content"
    }
    ```
    
*   **404** WhatsApp session message not found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: response_ Example response.
    
    ```
    {
      "error": "NOT_FOUND",
      "message": "WhatsApp session message with the specified ID was not found"
    }
    ```
    
*   **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"
    }
    ```
    

### POST Create WhatsApp message rendition

`POST /services/data/{apiVersion}/connect/cms/renditions/whatsappMessage`

Operation ID: `createWhatsAppMessageRendition`. Tags: WhatsApp Message Rendition.

Creates a WhatsApp message rendition. The rendition contains metadata and content configurations used for delivery processing.

The rendition type is `sfdc_cms__whatsappMessage` and supports both session messages and template messages.

#### Request body (required)

Media type: `application/json`. Schema: `WhatsAppMessageRenditionRequest`.

_Example: textSessionRendition_ Text session message rendition.

```
{
  "metadata": {
    "type": "sfdc_cms__whatsappsession",
    "contentType": "Session Message"
  },
  "content": {
    "type": "text",
    "text": {
      "body": "Welcome to Northern Trail Outfitters. Here's a 15% discount!"
    }
  }
}
```

_Example: imageSessionRendition_ Image session message rendition.

```
{
  "metadata": {
    "type": "sfdc_cms__whatsappsession",
    "contentType": "Session Message"
  },
  "content": {
    "type": "image",
    "image": {
      "link": "https://example.com/media/image.png",
      "caption": "Welcome offer"
    }
  }
}
```

_Example: interactiveButtonRendition_ Interactive button session message rendition.

```
{
  "metadata": {
    "type": "sfdc_cms__whatsappsession",
    "contentType": "Session Message"
  },
  "content": {
    "type": "interactive",
    "interactive": {
      "type": "button",
      "body": {
        "text": "The body text for a session message."
      },
      "footer": {
        "text": "The footer text for a session message."
      },
      "action": {
        "buttons": [
          {
            "type": "reply",
            "reply": {
              "id": "1",
              "title": "Change"
            }
          },
          {
            "type": "reply",
            "reply": {
              "id": "2",
              "title": "Cancel"
            }
          }
        ]
      }
    }
  }
}
```

_Example: templateRendition_ Template message rendition.

```
{
  "metadata": {
    "type": "sfdc_cms__whatsappsession",
    "templateId": "tmpl_001",
    "templateName": "order_confirmation",
    "templateLanguage": "en",
    "templateCategory": "UTILITY",
    "contentType": "Template Message",
    "wabaId": "waba_12345",
    "messagePurpose": "transactional"
  },
  "content": {
    "recipient_type": "individual",
    "messaging_product": "whatsapp",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": {
        "code": "en"
      }
    }
  }
}
```

_Example: interactiveCtaRendition_ Interactive CTA URL button rendition.

```
{
  "metadata": {
    "type": "sfdc_cms__whatsappsession",
    "contentType": "Session Message"
  },
  "content": {
    "type": "interactive",
    "interactive": {
      "type": "cta_url",
      "body": {
        "text": "Check out our latest offers!"
      },
      "footer": {
        "text": "Tap below to visit"
      },
      "action": {
        "name": "cta_url",
        "parameters": {
          "display_text": "Visit Website",
          "url": "https://example.com/offers"
        }
      }
    }
  }
}
```

#### Responses

*   **201** WhatsApp message rendition created successfully.
*   **400** Invalid request body.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: missingMetadata_ Missing metadata field.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'metadata' is missing",
      "details": [
        {
          "field": "metadata",
          "message": "This field is required"
        }
      ]
    }
    ```
    
    _Example: missingContent_ Missing content field.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'content' is missing",
      "details": [
        {
          "field": "content",
          "message": "This field is required"
        }
      ]
    }
    ```
    
    _Example: invalidContentType_ Invalid content type in metadata.
    
    ```
    {
      "error": "VALIDATION_ERROR",
      "message": "Invalid value for 'contentType'",
      "details": [
        {
          "field": "metadata.contentType",
          "message": "contentType must be one of: Session Message, Template Message"
        }
      ]
    }
    ```
    
*   **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 WhatsApp message renditions"
    }
    ```
    
*   **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"
    }
    ```
    

### PUT Update WhatsApp session message variant

`PUT /services/data/{apiVersion}/connect/cms/contents/variants/{variantId}`

Operation ID: `updateContentVariant`. Tags: Content Lifecycle.

Updates a WhatsApp session message by creating a variant. Content updates operate on the content variant (the `managedContentVariantId` returned when the content was created), not on the content item ID.

#### Parameters

*   `variantId` (path, string, required) The `managedContentVariantId` returned in the original creation request.  
    Example: `9PsSB000004Cw170AC`.

#### Request body (required)

Media type: `application/json`. Schema: `object`.

*   `contentBody` (_object_, required) Full content body for the variant. Must contain either an `sfdc_cms:block` or a `rawHtml` block but not both.

_Example: complete_ Complete request.

```
{
  "contentBody": {
    "sfdc_cms:title": "Updated Content Item"
  }
}
```

#### Responses

*   **200** Variant updated successfully.
    
    Media type: `application/json`. Schema: `object`.
    
    _Example: complete_ Complete response.
    
    ```
    {}
    ```
    
*   **400** Invalid request body.
*   **404** Variant not found.

### DELETE Delete WhatsApp session message variant

`DELETE /services/data/{apiVersion}/connect/cms/contents/variants/{variantId}`

Operation ID: `deleteContentVariant`. Tags: Content Lifecycle.

Deletes a WhatsApp session message by deleting a variant. Content deletions operate on the content variant (the `managedContentVariantId` returned when the content was created), not on the content item ID.

#### Parameters

*   `variantId` (path, string, required) The `managedContentVariantId` returned in the original creation request.  
    Example: `9PsSB000004Cw170AC`.

#### Responses

*   **204** Variant deleted successfully (no content).
*   **404** Variant not found.

## Schemas

### WhatsAppSessionContentRequest

Request to create a WhatsApp session message content item.

*   `contentSpaceOrFolderId` (_string_, required) The ID of the content space or folder to create the content in.
*   `contentType` (_string_, required) Must be `sfdc_cms__whatsappSession`.  
    Allowed values: `sfdc_cms__whatsappSession`.
*   `contentBody` (_WhatsAppSessionContentBody_, required)

### WhatsAppSessionContentResponse

Response structure returned when creating or retrieving WhatsApp session message content. This envelope is standard across all CMS content types.

*   `apiName` (_string_) System-generated API name for the content item.
*   `contentBody` (_WhatsAppSessionContentBody_)
*   `contentFqn` (_string_, nullable) Fully qualified name including workspace and content type.
*   `contentKey` (_string_) 28-character alphanumeric content key used for cross-references.
*   `contentSpace` (_object_)
    *   `id` (_string_)
    *   `resourceUrl` (_string_)
*   `contentType` (_object_)
    *   `fullyQualifiedName` (_string_)
*   `createdBy` (_object_)
    *   `id` (_string_)
    *   `name` (_string_)
    *   `resourceUrl` (_string_)
*   `createdDate` (_string (date-time)_)
*   `externalId` (_string_, nullable) The external identifier for the session message, if one was set.
*   `folder` (_object_)
    *   `id` (_string_)
    *   `resourceUrl` (_string_)
*   `isPublished` (_boolean_)
*   `language` (_string_)
*   `lastModifiedBy` (_object_)
    *   `id` (_string_)
    *   `name` (_string_)
    *   `resourceUrl` (_string_)
*   `lastModifiedDate` (_string (date-time)_)
*   `managedContentId` (_string_) The Salesforce record ID for the managed content item.
*   `managedContentVariantId` (_string_) The variant ID for this content version.
*   `managedContentVersionId` (_string_) The version ID for this specific content version.
*   `status` (_object_)
    *   `label` (_string_)
    *   `status` (_string_)  
        Allowed values: `Draft`, `Published`.
*   `title` (_string_) The display title of the content.
*   `urlName` (_string_) URL-friendly slug auto-generated from title.
*   `versionNumber` (_string_) Content version number.

### Error

*   `error` (_string_, required) Error code or type.
*   `message` (_string_, required) Human-readable error message.
*   `details` (_array of object_) Additional error details.
    *   `field` (_string_) Field path that caused the error.
    *   `message` (_string_) Field-specific error message.

### WhatsAppMessageRenditionRequest

Request structure for a WhatsApp message rendition (`sfdc_cms__whatsappMessage`). The rendition is the delivery-ready form of a WhatsApp message.

You can create two types of WhatsApp messages:

*   Session message: Free-form messages that you send only to customers who messaged you recently. Can contain text, images, files, or video.
*   Template message: Messages that you send to customers who haven't messaged you recently. WhatsApp must approve message templates before you can send them.

*   `metadata` (_RenditionMetadata_, required)
*   `content` (_RenditionContent_, required)

### WhatsAppSessionContentBody

The content body for a WhatsApp session message. Contains CMS metadata, message type, and the content block with message-specific configuration.

*   `sfdc_cms:title` (_string_, required) The title/name of the WhatsApp session message content item (used for CMS management).
*   `description` (_string_) Description of the WhatsApp session message.  
    Maximum length: 255.
*   `messageType` (_string_, required) The type of WhatsApp message. Determines which block definition is used for `contentBlock`.  
    Allowed values: `Text`, `Image`, `Video`, `Document`, `Audio`, `Location Request`, `CTA URL Button`.
*   `sfdc_cms:whatsappMessageBody` (_string_) The body of the WhatsApp session message.  
    Maximum length: 2000.
*   `contentBlock` (_WhatsAppSessionContentBlock_)
*   `lightning:dataProviders` (_array of DataProvider_) Data providers for personalization.

### RenditionMetadata

Metadata for the message rendition. The structure varies based on the content type of the message.

Session messages contain this metadata:

*   `type`—`sfdc_cms__whatsappsession`
*   `contentType`—`Session Message`

Template messages contain this metadata:

*   `type`—`sfdc_cms__whatsappsession`
*   `templateId`—A unique identifier for the template
*   `templateName`—The template name
*   `templateLanguage`—The language code for the template
*   `templateCategory`—The template category, such as `UTILITY` or `MARKETING`
*   `contentType`—`Template Message`
*   `wabaId`—Your WhatsApp Business Account ID
*   `messagePurpose`—The purpose of the message, such as `transactional` or `marketing`

One of: `SessionMetadata`, `TemplateMetadata`.

### RenditionContent

Rendition content for a message. The structure of this object varies based on the message format.

Text messages contain these properties:

*   `type`—`text`
*   `text.body`—The body of your message

**Image content:**

*   `type`—`image`
*   `image.link`—The URL of the image
*   `image.caption`—An optional caption for the image

**Interactive content:**

*   `type`—`interactive`
*   `interactive.type`—The interaction type, such as `button` or `cta_url`
*   `interactive.body.text`—The body text of the message
*   `interactive.footer.text`—Optional footer text
*   `interactive.action`—Configuration information for buttons or CTA parameters

**Template content:**

*   `recipient_type`—The recipient type, such as `individual`
*   `messaging_product`—`whatsapp`
*   `type`—`template`
*   `template.name`—The template name
*   `template.language.code`—The language code for the message

One of: `TextRenditionContent`, `ImageRenditionContent`, `InteractiveRenditionContent`, `TemplateRenditionContent`.

### WhatsAppSessionContentBlock

The content block containing the message-specific configuration. The block `definition` must correspond to the `messageType`:

*   Text messages map to `sfdc_cms__whatsappMessageTypeText`
*   Image messages map to `sfdc_cms__whatsappMessageTypeImage`
*   Video messages map to `sfdc_cms__whatsappMessageTypeVideo`
*   Document messages map to `sfdc_cms__whatsappMessageTypeDocument`
*   Audio messages map to `sfdc_cms__whatsappMessageTypeAudio`
*   Location Request messages map to `sfdc_cms__whatsappMessageTypeLocationRequest`
*   CTA URL Button messages map to `sfdc_cms__whatsappMessageTypeCtaUrlButton`

typeClass: `sfdc_cms__whatsappSessionMessageBlock`

*   `type` (_string_, required) Always "block".  
    Allowed values: `block`.
*   `definition` (_string_, required) Block definition identifier.  
    Allowed values: `sfdc_cms__whatsappMessageTypeText`, `sfdc_cms__whatsappMessageTypeImage`, `sfdc_cms__whatsappMessageTypeVideo`, `sfdc_cms__whatsappMessageTypeDocument`, `sfdc_cms__whatsappMessageTypeAudio`, `sfdc_cms__whatsappMessageTypeLocationRequest`, `sfdc_cms__whatsappMessageTypeCtaUrlButton`.
*   `attributes` (_WhatsAppSessionBlockAttributes_, required)

### DataProvider

Data provider configuration for personalization expressions. Data providers supply runtime data for Handlebars merge fields in message content.

*   `sfdcExpressionKey` (_string_) Expression key prefix used in Handlebars expressions (for example, `$unifiedIndividual`).
*   `definition` (_string_) Data provider block definition.  
    Allowed values: `sfdc_cms__linkDataProvider`, `sfdc_cms__unifiedIndividualDataProvider`, `sfdc_cms__eventListDataProvider`, `sfdc_cms__organizationDataProvider`, `sfdc_cms__activationListDataProvider`, `sfdc_cms__apexClassListDataProvider`, `sfdc_cms__couponListDataProvider`.
*   `attributes` (_object_) Data provider configuration attributes.

### SessionMetadata

Metadata for session-type WhatsApp messages.

*   `type` (_string_, required) Rendition type identifier.
*   `contentType` (_string_, required) The type of the message. For session messages, this value must be `Session Message`.

### TemplateMetadata

Metadata for template-type WhatsApp messages.

*   `type` (_string_, required) The rendition type identifier.
*   `templateId` (_string_, required) The template identifier.
*   `templateName` (_string_, required) The template name.
*   `templateLanguage` (_string_, required) The template language code.
*   `templateCategory` (_string_, required) The template category, such as `UTILITY`, `MARKETING`, or `AUTHENTICATION`.
*   `contentType` (_string_, required) The type of the message. For template messages, this value must be `Template Message`.
*   `wabaId` (_string_, required) Your WhatsApp Business Account ID.
*   `messagePurpose` (_string_, required) The purpose of the message.

### TextRenditionContent

Text message rendition content.

*   `type` (_string_, required)  
    Allowed values: `text`.
*   `text` (_object_, required)
    *   `body` (_string_, required) Message body text.

### ImageRenditionContent

Image message rendition content.

*   `type` (_string_, required)  
    Allowed values: `image`.
*   `image` (_object_, required)
    *   `link` (_string_, required) The URL of the image.
    *   `caption` (_string_) An optional caption for the image.

### InteractiveRenditionContent

Interactive message rendition content.

*   `type` (_string_, required)  
    Allowed values: `interactive`.
*   `interactive` (_object_, required)
    *   `type` (_string_, required) Interactive message type.  
        Allowed values: `button`, `cta_url`.
    *   `body` (_object_, required)
        *   `text` (_string_, required) The body text of the interactive message.
    *   `footer` (_object_)
        *   `text` (_string_) Footer text.
    *   `action` (_object_, required)
        
        Action configuration. The structure depends on the interaction type:
        
        *   `button`: Contains a `buttons` array with reply buttons
        *   `cta_url`: Contains `name` and `parameters` with URL
        
        *   `buttons` (_array of InteractiveButton_) List of reply buttons for `button` actions.
        *   `name` (_string_) Action name for `cta_url` actions.
        *   `parameters` (_object_) Parameters for `cta_url` actions.
            *   `display_text` (_string_) Display text for a button.
            *   `url` (_string_) Target URL.

### TemplateRenditionContent

Template message rendition content.

*   `recipient_type` (_string_, required) Recipient type.
*   `messaging_product` (_string_, required) Messaging product identifier.  
    Allowed values: `whatsapp`.
*   `type` (_string_, required)  
    Allowed values: `template`.
*   `template` (_object_, required)
    *   `name` (_string_, required) Template name.
    *   `language` (_object_, required)
        *   `code` (_string_, required) Language code.

### WhatsAppSessionBlockAttributes

Attributes for the content block. Available properties depend on the message type.

**Text type:**

*   `sfdc_cms:whatsappMessageBody`—Message body text
*   `type`—"Text"

**Image type:**

*   `header`—Image header block with link
*   `type`—"Image"

**Video type:**

*   `header`—Video header block with link
*   `type`—"Video"

**Document type:**

*   `header`—Document header block with link
*   `type`—"Document"

**Audio type:**

*   `header`—Audio header block with link
*   `type`—"Audio"

**Location Request type:**

*   `type`—"Location Request"

**CTA URL Button type:**

*   `sfdc_cms:whatsappMessageBody`—Message body text
*   `footer`—Footer sub-block
*   `ctaButton`—CTA button sub-block
*   `type`—"CTA URL Button"

*   `sfdc_cms:whatsappMessageBody` (_string_) The body content of the WhatsApp session message.  
    Maximum length: 2000.
*   `type` (_string_) The type of the session message.  
    Allowed values: `Text`, `Image`, `Video`, `Document`, `Audio`, `Location Request`, `CTA URL Button`.
*   `header` (_HeaderBlock_)
*   `footer` (_FooterBlock_)
*   `ctaButton` (_CtaButtonBlock_)

### InteractiveButton

Interactive reply button.

*   `type` (_string_, required) Button type.  
    Allowed values: `reply`.
*   `reply` (_object_, required)
    *   `id` (_string_, required) Unique button identifier.
    *   `title` (_string_, required) Button display text.

### HeaderBlock

The header block for image, video, document, or audio messages. Contains the media link reference and URL.

*   `type` (_string_)  
    Allowed values: `block`.
*   `definition` (_string_) A header block definition based on the media type of the message.  
    Allowed values: `sfdc_cms__whatsappMessageHeaderImage`, `sfdc_cms__whatsappMessageHeaderVideo`, `sfdc_cms__whatsappMessageHeaderDocument`, `sfdc_cms__whatsappMessageHeaderAudio`.
*   `attributes` (_object_) Header attributes containing the media link.
    *   `link` (_object_) A link to the media object.
        *   `source` (_object_)
            *   `type` (_string_) Source type (imageReference, videoReference, documentReference, audioReference).
            *   `ref` (_object_)
                *   `contentKey` (_string_) CMS content key for the media asset.
        *   `url` (_string_) The path to the media file.

### FooterBlock

Footer sub-block for CTA URL Button messages.

*   `type` (_string_)  
    Allowed values: `block`.
*   `definition` (_string_)  
    Allowed values: `sfdc_cms__whatsappMessageFooter`.
*   `attributes` (_object_)
    *   `text` (_string_) Footer text displayed below the message.

### CtaButtonBlock

CTA button sub-block for CTA URL Button messages.

*   `type` (_string_)  
    Allowed values: `block`.
*   `definition` (_string_)  
    Allowed values: `sfdc_cms__whatsappMessageCtaButton`.
*   `attributes` (_object_)
    *   `displayText` (_string_) Text displayed on the CTA button.
    *   `url` (_string_) URL that the button links to.

### WhatsAppSessionListResponse

Paginated list of WhatsApp session message content items.

*   `items` (_array of WhatsAppSessionContentResponse_)
*   `nextPageToken` (_string_) Token to retrieve the next page of results.
*   `totalCount` (_integer_) Total number of items matching the query.