Skip to content
v1.0.0
OpenAPI 3.0.3

Email Resources Permissions API

Use this API to control access to saved modules, images, and template themes in your application. Implement the endpoint below in your application and enable the Permissions API in your plugin settings. Stripo will ask your endpoint which operations are allowed. Your application decides which permissions to grant.

Server:https://{YOUR_RESOURCE_PERMISSIONS_CHECKER_URL}
No authentication selected
Client Libraries

Methods

​
Methods Operations

Check access to email resources

​

Stripo sends your endpoint the requested permissions in requestPermissions, along with your plugin ID and the values supplied in uiData. Return the permissions your application allows in grantPermissions.

To grant a permission for template themes, return an entry with exactly the same type, action and key as the requested permission. You do not need to include keyTemplate in the response. If no matching permission is returned, access is denied. Access is also denied if your endpoint cannot be reached, returns an invalid response or returns an HTTP status outside the 2xx range.

For TEMPLATE_THEMES, READ and MODIFY must be granted separately. Granting MODIFY does not also grant READ. This permission check is not used when the Permissions API is disabled in your plugin settings.

Body·

required
application/json
  • ID of the plugin requesting access.

  • Permissions Stripo asks your application to approve for this request.

    Properties: 4
  • Information supplied in the metadata option when opening the editor, or through the Es-Plugin-Ui-Data header of an API request. Your application can use these values to decide which resources the user may access. All values are strings. An empty object is sent if no values were supplied.

    Properties: 1

Responses

  • The permissions your application grants for this request.

    • Permissions your application allows for this request. To grant access to themes, include an entry with the requested type, action and key. An empty array grants no access.

      Properties: 4
    application/json
Request Example for post/
curl 'https://{YOUR_RESOURCE_PERMISSIONS_CHECKER_URL}/' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "pluginId": "123",
  "uiData": {
    "brandId": "acme"
  },
  "requestPermissions": [
    {
      "type": "TEMPLATE_THEMES",
      "action": "READ",
      "key": "pluginId123_brand_acme",
      "keyTemplate": "brand_${brandId}"
    }
  ]
}'
TEMPLATE_THEMES
{
  "grantPermissions": [
    {
      "type": "TEMPLATE_THEMES",
      "action": "READ",
      "key": "pluginId123_brand_acme"
    }
  ]
}

Models

​
  • ID of the plugin requesting access.

  • Permissions Stripo asks your application to approve for this request.

    Properties: 4
  • Information supplied in the metadata option when opening the editor, or through the Es-Plugin-Ui-Data header of an API request. Your application can use these values to decide which resources the user may access. All values are strings. An empty object is sent if no values were supplied.

    Properties: 1
​
  • The requested action. Supported values are READ and MODIFY.

    For template themes, READ allows opening the editor with themes, listing themes, listing emails that use a theme, and applying a theme to one or more emails. MODIFY allows creating, updating and deleting themes. Each permission must be granted separately.

  • Identifies the group of resources this permission applies to. For theme permissions, copy the requested value exactly into the permission you grant.

  • The setting in your plugin that determines how resources are grouped. For example, brand_${brandId} groups themes by the brandId value supplied in uiData. An empty value for themes means they are shared across the plugin. This field is included in requests for TEMPLATE_THEMES; you do not need to return it in grantPermissions.

  • The kind of resource the permission applies to.

    • BLOCKS: saved modules.
    • DOCS: images and other files.
    • TEMPLATE_THEMES: reusable email design settings.
    • EMAIL: the email itself, when it is created or changed through the Backend API without opening the editor. READ allows reading the document state; MODIFY allows creating the email and updating its state. The key is <pluginId>_<emailId>, the key template is ${pluginId}_${emailId}.
    values
    BLOCKSDOCSTEMPLATE_THEMESEMAIL
​
  • Permissions your application allows for this request. To grant access to themes, include an entry with the requested type, action and key. An empty array grants no access.

    Properties: 4