Skip to content
v1.0.0
OAS 3.0.3

Modules API

Stripo Support

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:
Client Libraries

modules

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
  • key
    Type: string

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

  • query
    Type: string

    Full-text search query for module name.

  • categories
    Type: array integer[]

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

  • tags
    Type: array string[]

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

  • id
    Type: integerFormat: int64

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

  • synchronizable
    Type: boolean

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

  • withContent
    Type: boolean
    default: 
    false

    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.

  • sortingColumn
    Type: stringenum
    default: 
    "id"

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

    • id
    • name
  • sortingAsc
    Type: boolean
    default: 
    false

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

  • offset
    Type: integer
    min:  
    0
    default: 
    0

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

  • page
    Type: integer
    min:  
    1

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

  • limit
    Type: integer
    min:  
    1
    max:  
    100
    default: 
    20

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

Headers
  • ES-PLUGIN-AUTH
    Type: string
    required

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

Responses
  • 200
    Type: object

    Response containing a paginated list of plugin modules with metadata

    • limit
      Type: integer
      min:  
      1

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

    • modules
      Type: array ModuleListItemDto[]

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

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

    • offset
      Type: integer
      min:  
      0

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

    • total
      Type: integerFormat: int64
      min:  
      0

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

  • 401
    Type: object

    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
  • 403
    Type: object

    Forbidden - The authenticated plugin does not have permissions to access modules. This typically indicates an authorization configuration issue.

Request Example for get/api/v1/customblocks/v4/modules/list
curl '/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'
{
  "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