Skip to content
v1.0.0
OpenAPI 3.0.3

Retrieving Plugin Modules API

This API specification describes the endpoint for retrieving plugin modules from the Stripo Email Editor plugin backend service.

The endpoint allows authenticated plugins to list and filter their custom email template modules (blocks) with advanced filtering, pagination, and sorting capabilities.

Authentication: Plugin-based authentication using the ES-PLUGIN-AUTH header. The authentication token must have the role set to "API" to access this endpoint.

Authorization: Only modules belonging to the authenticated plugin are returned. Cross-plugin access is not permitted.

Performance Optimization: Use the withContent parameter to include HTML and CSS content in responses. By default, content is excluded for optimal performance.

Filtering Capabilities: Support for filtering by key, category, tags, synchronization status, and full-text search on module names.

Pagination: Flexible pagination using either offset-based or page-based approaches with configurable page sizes.

Server:https://plugins.stripo.email

Plugin Backend Service

Client Libraries

Methods

​

Plugin module management operations

List plugin modules

​

Retrieve a paginated and filterable list of all plugin modules belonging to the authenticated plugin.

Authorization: Only modules associated with the plugin identified by the provided authentication token are returned. The token must have "API" role.

Performance: By default, HTML and CSS content are excluded for optimal performance. Set withContent=true to include HTML and CSS content in the response.

Filtering: Combine multiple filters (key, query, categories, tags, id, synchronizable) to narrow down results. All filters are applied with AND logic.

Sorting: Results can be sorted by id or name in ascending or descending order.

Pagination: Use either offset for cursor-based pagination or page for page-based pagination. The limit parameter controls the page size (default: 20).

Query Parameters

  • Filter by module key (folder name). Returns modules matching the specified key.

  • Full-text search query for module name.

  • Filter by one or more category IDs. Returns modules belonging to any of the specified categories.

  • Filter by one or more tag values. Returns modules that have any of the specified tags.

  • Filter by specific module ID. When provided, returns only the module with this exact ID (if it belongs to the authenticated plugin).

  • Filter by synchronizable status. Set to true for synchronizable modules only, false for non-synchronizable modules only, or omit for all modules.

  • Performance optimization flag. When set to true, the html and css fields will be included in the response. By default (false), content is excluded to reduce response size when only module metadata is needed.

  • Column to sort results by. Options are id (module ID) or name (module name).

  • Sort direction. Set to true for ascending order, false for descending order.

  • Zero-based pagination offset. Specifies the starting position in the result set. Takes precedence over the page parameter when both are provided.

  • One-based page number for pagination. Used only if offset is not provided. Calculated as: offset = (page - 1) * limit

  • Maximum number of modules to return per page. Controls the page size for pagination.

Headers

  • Plugin authentication token with "API" role. Must be in Bearer token format.

Responses

  • Modules list retrieved successfully. Returns a paginated list of modules with metadata and optionally HTML/CSS content.

    Response containing a paginated list of plugin modules with metadata

    • Maximum number of modules returned in this page. Corresponds to the limit parameter from the request.

    • Array of module objects. Each module contains metadata and optionally HTML/CSS content (depending on the withContent parameter).

      Properties: 16
    • Current pagination offset (starting position in the result set). Corresponds to the offset parameter from the request.

    • Total count of modules matching the filter criteria (across all pages). Used for calculating pagination metadata.

    application/json
  • Unauthorized - Authentication failed. This can occur when:

    • The authentication token is missing or invalid
    • The token has expired
    • The token does not have "API" role
    application/json
  • Forbidden - The authenticated plugin does not have permissions to access modules. This typically indicates an authorization configuration issue.

    application/json
Request Example for get/api/v1/customblocks/v4/modules/list
curl 'https://plugins.stripo.email/api/v1/customblocks/v4/modules/list?key=header-templates&query=newsletter&categories=1&categories=2&categories=5&tags=promotional&tags=seasonal&id=12345&synchronizable=true&withContent=false&sortingColumn=name&sortingAsc=true&offset=0&page=1&limit=20' \
  --header 'ES-PLUGIN-AUTH: Bearer YOUR_AUTH_TOKEN' \
  --header 'ES-PLUGIN-AUTH: YOUR_SECRET_TOKEN'
Basic module list with content (withContent=true)
{
  "modules": [
    {
      "id": 12345,
      "key": "header-templates",
      "name": "Modern Header",
      "html": "<table>...</table>",
      "css": ".header { padding: 20px; }",
      "blockType": "BASIC",
      "scope": "HEADER",
      "icon": "https://example.com/icon.png",
      "croppedIcon": "https://example.com/icon-cropped.png",
      "description": "A modern header template",
      "synchronizable": true,
      "tags": [
        "modern",
        "responsive"
      ],
      "tagObjects": [
        {
          "id": 1,
          "value": "modern"
        },
        {
          "id": 2,
          "value": "responsive"
        }
      ],
      "category": {
        "key": 1,
        "name": "Headers"
      },
      "createdOn": "2024-01-15T10:30:00Z",
      "updatedOn": "2024-01-20T14:45:00Z"
    }
  ],
  "total": 1,
  "offset": 0,
  "limit": 20
}

Models

​

Response containing a paginated list of plugin modules with metadata

  • Maximum number of modules returned in this page. Corresponds to the limit parameter from the request.

  • Array of module objects. Each module contains metadata and optionally HTML/CSS content (depending on the withContent parameter).

    Properties: 16
  • Current pagination offset (starting position in the result set). Corresponds to the offset parameter from the request.

  • Total count of modules matching the filter criteria (across all pages). Used for calculating pagination metadata.

​

Represents a single plugin module with all its metadata and optional content

  • Type of block. Determines how the module behaves in the editor.

  • Category information for the module. Categories provide high-level organization of modules in the editor's library.

    Properties: 2
  • ISO 8601 timestamp indicating when the module was created.

  • URL to the cropped version of the module's icon. Used for optimized display.

  • CSS styles for the module. Applied to the HTML content when rendered. This field will be null when withContent=false (default) or not specified.

  • Textual description of the module. Provides additional context about the module's purpose and design.

  • HTML content of the module. Contains the email template markup. This field will be null when withContent=false (default) or not specified.

  • URL to the module's icon image. Displayed as thumbnail in the module library.

  • Unique identifier of the module within the plugin.

  • Module key (folder name). Used for organizing modules into logical groups.

  • Human-readable name of the module. Displayed in the editor's module library.

  • Defines the section of the email where this module can be used. Modules are organized by scope in the editor's module library.

    values
    INFO_AREAHEADERMENUCONTENTFOOTER
  • Indicates whether this module supports synchronization. Synchronized modules can be updated across multiple email templates automatically.

  • List of tag objects with full details including tag IDs. Provides more complete information than the tags array.

    Properties: 2
  • List of tag values associated with the module. Tags provide additional categorization and filtering capabilities. This is a simplified array of string values.

  • ISO 8601 timestamp indicating when the module was last updated.