Skip to content

List all content snippets

Request

You can fetch a list of all content snippets for a workspace.

Security
bearerAuth
Query
pageinteger

The page of results to fetch.

Example:page=1
per_pageinteger

The number of results to return per page. Max value of 50.

Example:per_page=20
Headers
Intercom-Versionstring(intercom_version)

Intercom API version.
By default, it's equal to the version set in the app package.

Default:"2.16"
Enum:"1.0""1.1""1.2""1.3""1.4""2.0""2.1""2.2""2.3""2.4"
Example:2.16
/**
 * Requires libcurl
 */

$query = array(
  "page" => "1",
  "per_page" => "20"
);

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>",
    "Intercom-Version: 2.16"
  ],
  CURLOPT_URL => "https://api.intercom.io/content_snippets?" . http_build_query($query),
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}

Responses

Successful response

Bodyapplication/json
typestring
Value:"list"
Example:"list"
dataArray of objects(Content Snippet)

An array of content snippet objects.

total_countinteger

The total number of content snippets.

Example:1
pageinteger

The current page number.

Example:1
per_pageinteger

The number of results per page.

Example:50
total_pagesinteger

The total number of pages.

Example:1
Response
{ "type": "list", "data": [ {} ], "total_count": 1, "page": 1, "per_page": 50, "total_pages": 1 }