---
schema_version: "1"
id: 77a1fdd1d4c50494f7e797cf3478ec4349c5ff2f83df972fb82593a2cd0d4795
title: ContentBlockByID
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_platformContentContentBlockByID.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformContentContentBlockByID.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: dc0a46ec4ec751c53ca2cbb4f5b5a6adf1f1c7ae810cd27b4ffe54384649bd48
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# ContentBlockByID

## Overview

Retrieve content from a specified content block in Content Builder

### Syntax

ContentBlockByID(1, 2, 3, 4)

### Function Properties

<!--complex table-->

| Ordinal | Type    |              | Description                                                                                                                                                                   |
| ------- | ------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **1**   | string  | **Required** | ID for content block                                                                                                                                                          |
| **2**   | string  |              | Impression region for content                                                                                                                                                 |
| **3**   | Boolean |              | Indicates whether a call proceeds if it fails to retrieve content. A value of true returns an exception and terminates the call. A value of false allows the call to proceed. |
| **4**   | string  |              | Default content to display if the call does not return content from the specified content area                                                                                |

## Example

```
<script runat="server">
     var content = Platform.Function.ContentBlockByID("12345","impressionRegion",false,"defaultContentHere");
</script>
```
