Template

List all templates.

Changed on

Retrieves a list of templates from the Carbone storage; with comprehensive filtering, searching, and pagination capabilities. By default, the endpoint returns all deployed templates, sorted by creation date in descending order, excluding any that have expired. It supports filtering by various criteria such as template ID, version ID, and category, offering flexibility to retrieve specific subsets of templates. Additionally, it supports fuzzy search in template names and exact matches on IDs and version IDs, enhancing discoverability.

Features

  • Filtering: Filter templates by ID, version ID, and category to narrow down results based on specific criteria.
  • Search Support: Utilize fuzzy search for template names and exact matches for IDs and version IDs to quickly locate desired templates.
  • Version Inclusion: Include all versions of a template in the results by setting the includeVersions parameter to true, allowing for comprehensive version tracking.
  • Pagination: Employ cursor-based pagination to efficiently navigate through large datasets, enabling scalable data retrieval.
get/templates

Request

Query parameters

idstring

Filter by Template ID (64-bit format). Providing a Version ID (SHA256 format) is not allowed and will result in an API error..

versionIdstring

Filter by Version ID (SHA256 format).

categorystring

Filter by category.

originnumber

Filter templates by their upload origin.

  • 0: Templates uploaded via the API.
  • 1: Templates uploaded via the Studio.
  • 2: Templates uploaded via the Salesforce integration.
  • 3: Templates uploaded via the Odoo integration.
  • 4: Templates uploaded via the HubSpot integration.
includeVersionsboolean

By default equals to false. Use true to list all versions for a specific template ID.

searchstring

Search in template name (fuzzy search), Version ID (exact match), or Template ID (exact match).

limitinteger

Limit the number of items returned, from 1 to 100 (100 by default).

cursorstring

A cursor to use in pagination. The cursor defines your place in the list for fetching the next set of results.

Headers

carbone-version'5' | '4' | '3' | 'staging' required

Carbone API major version to use. Only a major version can be specified: it automatically includes all future minor versions and patches.

  • 5: latest version, recommended.
  • 4: default when the header is not provided.
  • 3: legacy.
  • staging: not intended for production environments.

It is strongly recommended to always set this header explicitly to avoid unexpected behavior. See API versioning documentation

Response

List of deployed templates and their versions.

successboolean
hasMoreboolean

Indicates whether additional templates are available beyond the current set. If false, the current response contains the last page of results.

nextCursorstring

If hasMore is true, this value specifies the cursor to use in the next request (via the cursor query parameter) to fetch the subsequent page of templates.

Example response

{
  "success": true,
  "hasMore": true,
  "nextCursor": "cursor_hash"
}

Changes

    • breaking

      the carbone-version request header's property undefined was restricted to a list of enum values

    • breaking

      the header request parameter carbone-version was restricted to a list of enum values

    • breaking

      for the query request parameter limit, default value 100 was added

    • warning

      for the query request parameter category, the maxLength was set to 200

    • warning

      for the query request parameter search, the maxLength was set to 200

    • warning

      for the query request parameter limit, the max was set to 100.00

    • warning

      for the query request parameter limit, the min was set to 1.00

    • info

      added the new enum value 3 to the header request parameter carbone-version

    • info

      added the new enum value 4 to the header request parameter carbone-version

    • info

      added the new enum value 5 to the header request parameter carbone-version

    • info

      added the new enum value staging to the header request parameter carbone-version

    • info

      for the header request parameter carbone-version, the type was generalized from integer to string, and format from int32 to no format

    • info

      added the non-success response with the status