Content - WhatsApp Template Message (Connect API)

POST Create WhatsApp template message content

POST /services/data/{apiVersion}/connect/cms/contents/whatsappTemplate

Operation ID: createWhatsAppTemplate. Tags: WhatsApp Template Content.

Creates a WhatsApp template message content item. The content body includes the WABA template reference, language, and content block with personalizable header and body parameters.

Request body (required)

Media type: application/json. Schema: WhatsAppTemplateContentRequest.

Example: textTemplateWithParameters Text template with header and body parameters.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappTemplate",
  "contentBody": {
    "sfdc_cms:title": "WhatsApp Template Message",
    "description": "WhatsApp Template Message for Testing.",
    "wabaId": "123456789",
    "wabaLang": "en",
    "wabaTemplateId": "987654321",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms/whatsappTemplateMessage",
      "attributes": {
        "header": {
          "type": "block",
          "definition": "sfdc_cms/waTemplateHeaderText",
          "attributes": {
            "type": "text",
            "parameters": [
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "Test Variable Field"
                }
              }
            ]
          }
        },
        "body": {
          "type": "block",
          "definition": "sfdc_cms/waTemplateBodyText",
          "attributes": {
            "type": "text",
            "parameters": [
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "Test Variable Field"
                }
              }
            ]
          }
        }
      }
    },
    "sfdc_cms:template": {
      "definition": "@meta/123456789/en/987654321"
    }
  }
}

Example: minimalTemplate Minimal template with required fields only.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappTemplate",
  "contentBody": {
    "sfdc_cms:title": "Simple Notification Template",
    "wabaId": "103217599442424",
    "wabaLang": "en",
    "wabaTemplateId": "6027397137328505",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms/whatsappTemplateMessage",
      "attributes": {}
    }
  }
}

Example: templateWithPersonalization Template with personalized parameters using data providers.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappTemplate",
  "contentBody": {
    "sfdc_cms:title": "Personalized Investment Offer",
    "description": "Template with personalized greeting.",
    "wabaId": "103217599442424",
    "wabaLang": "en",
    "wabaTemplateId": "6027397137328505",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms/whatsappTemplateMessage",
      "attributes": {
        "header": {
          "type": "block",
          "definition": "sfdc_cms/waTemplateHeaderText",
          "attributes": {
            "type": "text",
            "parameters": [
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "{{$unifiedIndividual.FirstName}}"
                }
              }
            ]
          }
        },
        "body": {
          "type": "block",
          "definition": "sfdc_cms/waTemplateBodyText",
          "attributes": {
            "type": "text",
            "parameters": [
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "{{$unifiedIndividual.FirstName}}"
                }
              },
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "{{$organization.Name}}"
                }
              }
            ]
          }
        }
      }
    },
    "sfdc_cms:template": {
      "definition": "@meta/103217599442424/en/6027397137328505"
    },
    "lightning:dataProviders": [
      {
        "sfdcExpressionKey": "$unifiedIndividual",
        "definition": "sfdc_cms__unifiedIndividualDataProvider",
        "attributes": {
          "objectApiName": "UnifiedIndividual__dlm"
        }
      },
      {
        "sfdcExpressionKey": "$organization",
        "definition": "sfdc_cms__organizationDataProvider",
        "attributes": {}
      }
    ]
  }
}

Example: templateWithCarouselCards Template with carousel cards.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappTemplate",
  "contentBody": {
    "sfdc_cms:title": "Product Carousel Template",
    "description": "Multi-card carousel WhatsApp template.",
    "wabaId": "103217599442424",
    "wabaLang": "en",
    "wabaTemplateId": "8834521098765432",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms/whatsappTemplateMessage",
      "attributes": {
        "body": {
          "type": "block",
          "definition": "sfdc_cms/waTemplateBodyText",
          "attributes": {
            "type": "text",
            "parameters": [
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "Summer Collection"
                }
              }
            ]
          }
        }
      }
    },
    "whatsappCarouselCards": {
      "type": "block",
      "definition": "sfdc_cms__whatsappCarouselCards",
      "attributes": {}
    },
    "sfdc_cms:template": {
      "definition": "@meta/103217599442424/en/8834521098765432"
    }
  }
}

Example: templateWithCurrency Payment template with country currency.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__whatsappTemplate",
  "contentBody": {
    "sfdc_cms:title": "Payment Confirmation Template",
    "description": "Payment confirmation with INR currency.",
    "wabaId": "103217599442424",
    "wabaLang": "en",
    "wabaTemplateId": "7712345678901234",
    "wabaCountryCurrency": "INR",
    "contentBlock": {
      "type": "block",
      "definition": "sfdc_cms/whatsappTemplateMessage",
      "attributes": {
        "body": {
          "type": "block",
          "definition": "sfdc_cms/waTemplateBodyText",
          "attributes": {
            "type": "text",
            "parameters": [
              {
                "type": "block",
                "definition": "sfdc_cms/waTemplateTextParameter",
                "attributes": {
                  "type": "text",
                  "text": "5000"
                }
              }
            ]
          }
        }
      }
    },
    "sfdc_cms:template": {
      "definition": "@meta/103217599442424/en/7712345678901234"
    }
  }
}

Responses

  • 201 WhatsApp template message content created successfully.

    Media type: application/json. Schema: WhatsAppTemplateContentResponse.

    Example: complete Complete response.

    {
      "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentBody": {
        "sfdc_cms:title": "WhatsApp Template Message",
        "description": "WhatsApp Template Message for Testing.",
        "wabaId": "123456789",
        "wabaLang": "en",
        "wabaTemplateId": "987654321",
        "contentBlock": {
          "type": "block",
          "definition": "sfdc_cms/whatsappTemplateMessage",
          "attributes": {
            "header": {
              "type": "block",
              "definition": "sfdc_cms/waTemplateHeaderText",
              "attributes": {
                "type": "text",
                "parameters": [
                  {
                    "type": "block",
                    "definition": "sfdc_cms/waTemplateTextParameter",
                    "attributes": {
                      "type": "text",
                      "text": "Test Variable Field"
                    }
                  }
                ]
              }
            },
            "body": {
              "type": "block",
              "definition": "sfdc_cms/waTemplateBodyText",
              "attributes": {
                "type": "text",
                "parameters": [
                  {
                    "type": "block",
                    "definition": "sfdc_cms/waTemplateTextParameter",
                    "attributes": {
                      "type": "text",
                      "text": "Test Variable Field"
                    }
                  }
                ]
              }
            }
          }
        },
        "sfdc_cms:template": {
          "definition": "@meta/123456789/en/987654321"
        }
      },
      "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__whatsappTemplate--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentSpace": {
        "id": "0ZuSB000002FYzW0AW",
        "resourceUrl": "/services/data/v65.0/connect/cms/spaces/0ZuSB000002FYzW"
      },
      "contentType": {
        "fullyQualifiedName": "sfdc_cms__whatsappTemplate"
      },
      "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": "WhatsApp Template Message",
      "urlName": "whatsapp-template-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: missingWabaId Missing required wabaId.

    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'wabaId' is missing",
      "details": [
        {
          "field": "contentBody.wabaId",
          "message": "WhatsApp Business Account ID: Complete this field."
        }
      ]
    }

    Example: missingWabaLang Missing required wabaLang.

    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'wabaLang' is missing",
      "details": [
        {
          "field": "contentBody.wabaLang",
          "message": "Template language: Complete this field."
        }
      ]
    }

    Example: missingWabaTemplateId Missing required wabaTemplateId.

    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'wabaTemplateId' is missing",
      "details": [
        {
          "field": "contentBody.wabaTemplateId",
          "message": "WhatsApp Template ID: Complete this field."
        }
      ]
    }

    Example: missingContentBlock Missing required contentBlock.

    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'contentBlock' is missing",
      "details": [
        {
          "field": "contentBody.contentBlock",
          "message": "Content Block: Complete this field."
        }
      ]
    }

    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: descriptionTooLong The description exceeds the maximum length.

    {
      "error": "VALIDATION_ERROR",
      "message": "Field exceeds maximum length",
      "details": [
        {
          "field": "contentBody.description",
          "message": "Description must be 255 characters or fewer"
        }
      ]
    }

    Example: invalidCurrency Invalid wabaCountryCurrency value.

    {
      "error": "VALIDATION_ERROR",
      "message": "Invalid enum value for 'wabaCountryCurrency'",
      "details": [
        {
          "field": "contentBody.wabaCountryCurrency",
          "message": "Value must be one of: INR, BRL"
        }
      ]
    }
  • 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 template 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"
    }