Content - Push Notification (Connect API)

POST Create push notification content

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

Operation ID: createPushNotification. Tags: Push Notification Content.

Creates a push notification content item. The content body includes the notification title, type, and notification block configuration.

Request body (required)

Media type: application/json. Schema: PushNotificationContentRequest.

Example: basicMinimal Basic push notification with minimal fields.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__pushNotification",
  "contentBody": {
    "sfdc_cms:title": "Weekly Sale Alert",
    "notificationType": "Basic",
    "notificationBlock": {
      "type": "block",
      "definition": "sfdc_cms__pushNotificationBasic",
      "attributes": {
        "sfdc_cms:pushNotificationContentTitle": "Flash Sale!",
        "sfdc_cms:pushNotificationContentMessage": "50% off all items this weekend only.",
        "type": "Basic"
      }
    }
  }
}

Example: basicWithMedia Basic push notification with image media.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__pushNotification",
  "contentBody": {
    "sfdc_cms:title": "Product Launch Notification",
    "description": "Announce new product with hero image.",
    "notificationType": "Basic",
    "notificationBlock": {
      "type": "block",
      "definition": "sfdc_cms__pushNotificationBasic",
      "attributes": {
        "sfdc_cms:pushNotificationContentTitle": "New Arrival",
        "sfdc_cms:pushNotificationContentSubTitle": "Just dropped",
        "sfdc_cms:pushNotificationContentMessage": "Check out our newest product—available now in the app.",
        "type": "Basic",
        "media": {
          "type": "block",
          "definition": "sfdc_cms__pushNotificationMediaImage",
          "attributes": {
            "default": {
              "attributes": {
                "link": {
                  "source": {
                    "type": "imageReference",
                    "ref": {
                      "contentKey": "MC5IEGQZHII5GEJLZW5DVSAZHSRI"
                    }
                  },
                  "url": "/services/data/{apiVersion}/connect/cms/media/MC5IEGQZHII5GEJLZW5DVSAZHSRI?version=1.1&fileName=product-hero.png"
                },
                "type": "mediaUrl",
                "mediaType": "Image"
              }
            }
          }
        }
      }
    }
  }
}

Example: basicWithActions Basic push notification with action buttons and deep link.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__pushNotification",
  "contentBody": {
    "sfdc_cms:title": "Order Confirmation",
    "notificationType": "Basic",
    "notificationBlock": {
      "type": "block",
      "definition": "sfdc_cms__pushNotificationBasic",
      "attributes": {
        "sfdc_cms:pushNotificationContentTitle": "Order Shipped!",
        "sfdc_cms:pushNotificationContentMessage": "Your order #12345 is on its way.",
        "type": "Basic",
        "actions": {
          "type": "block",
          "definition": "sfdc_cms__pushNotificationActionsBlocks",
          "attributes": {
            "action": "1",
            "actionUrl": "myapp://orders/12345",
            "passBackValue": "track_order"
          }
        },
        "actionButtons": {
          "type": "block",
          "definition": "sfdc_cms__pushNotificationActionButtons",
          "attributes": {
            "androidButtons": [
              {
                "type": "block",
                "definition": "sfdc_cms/pushNotificationAndroidButton",
                "attributes": {
                  "buttonConfig": "TEXT_EMOJI",
                  "buttonLabel": "Track Order",
                  "action": "1",
                  "actionUrl": "myapp://orders/12345",
                  "passbackValue": "track_order_btn"
                }
              },
              {
                "type": "block",
                "definition": "sfdc_cms/pushNotificationAndroidButton",
                "attributes": {
                  "buttonConfig": "TEXT_EMOJI",
                  "buttonLabel": "View Details",
                  "action": "2",
                  "actionUrl": "https://example.com/orders/12345",
                  "passbackValue": "view_details_btn"
                }
              }
            ]
          }
        }
      }
    }
  }
}

Example: basicWithIcons Basic push notification with custom Android icons.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__pushNotification",
  "contentBody": {
    "sfdc_cms:title": "Custom Icon Notification",
    "notificationType": "Basic",
    "notificationBlock": {
      "type": "block",
      "definition": "sfdc_cms__pushNotificationBasic",
      "attributes": {
        "sfdc_cms:pushNotificationContentTitle": "App Update Available",
        "sfdc_cms:pushNotificationContentMessage": "Version 2.0 is ready to install.",
        "type": "Basic",
        "smallIcon": "ic_notification_small.png",
        "largeIcon": "ic_notification_large.png"
      }
    }
  }
}

Example: basicWithPersonalization Basic push notification with Handlebars personalization.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__pushNotification",
  "contentBody": {
    "sfdc_cms:title": "Personalized Welcome",
    "notificationType": "Basic",
    "notificationBlock": {
      "type": "block",
      "definition": "sfdc_cms__pushNotificationBasic",
      "attributes": {
        "sfdc_cms:pushNotificationContentTitle": "Hey {{$unifiedIndividual.FirstName}}!",
        "sfdc_cms:pushNotificationContentMessage": "We have a special offer just for you.",
        "type": "Basic"
      }
    },
    "lightning:dataProviders": [
      {
        "sfdcExpressionKey": "$unifiedIndividual",
        "definition": "sfdc_cms__unifiedIndividualDataProvider",
        "attributes": {
          "objectApiName": "UnifiedIndividual__dlm"
        }
      }
    ]
  }
}

Example: newsFlash NewsFlash type notification.

{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__pushNotification",
  "contentBody": {
    "sfdc_cms:title": "Breaking News Alert",
    "notificationType": "NewsFlash",
    "notificationBlock": {
      "type": "block",
      "definition": "sfdc_cms__pushNotificationNewsFlash",
      "attributes": {
        "sfdc_cms:pushNotificationContentTitle": "Breaking: Major Announcement",
        "sfdc_cms:pushNotificationContentSubTitle": "Important Update",
        "sfdc_cms:pushNotificationContentMessage": "We have exciting news to share with all customers.",
        "actions": {
          "type": "block",
          "definition": "sfdc_cms__pushNotificationActionsBlocks",
          "attributes": {
            "action": "2",
            "actionUrl": "https://example.com/news/announcement",
            "passBackValue": "news_action"
          }
        }
      }
    }
  }
}

Responses

  • 201 Push notification content created successfully.

    Media type: application/json. Schema: PushNotificationContentResponse.

    Example: complete Complete response.

    {
      "apiName": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentBody": {
        "sfdc_cms:title": "Weekly Sale Alert",
        "notificationType": "Basic",
        "notificationBlock": {
          "type": "block",
          "definition": "sfdc_cms__pushNotificationBasic",
          "attributes": {
            "sfdc_cms:pushNotificationContentTitle": "Flash Sale!",
            "sfdc_cms:pushNotificationContentMessage": "50% off all items this weekend only.",
            "type": "Basic"
          }
        }
      },
      "contentFqn": "marketing--Default_Content_Workspace.sfdc_cms__pushNotification--MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
      "contentSpace": {
        "id": "0ZuSB000002FYzW0AW",
        "resourceUrl": "/services/data/v65.0/connect/cms/spaces/0ZuSB000002FYzW"
      },
      "contentType": {
        "fullyQualifiedName": "sfdc_cms__pushNotification"
      },
      "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": "Weekly Sale Alert",
      "urlName": "weekly-sale-alert",
      "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: missingNotificationType Missing required notificationType.

    {
      "error": "VALIDATION_ERROR",
      "message": "Required field 'notificationType' is missing",
      "details": [
        {
          "field": "contentBody.notificationType",
          "message": "Notification Type: 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: titleTooLong The content title exceeds the maximum length.

    {
      "error": "VALIDATION_ERROR",
      "message": "Field exceeds maximum length",
      "details": [
        {
          "field": "contentBody.notificationBlock.attributes.sfdc_cms:pushNotificationContentTitle",
          "message": "Title must be 200 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 push notification 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"
    }