MeiroDocs

Custom Blocks in Emails

Required feature: **emails/view** or **email_blocks/edit**

Section: Group Custom Blocks in Emails. Base URL: https://instance_name.meiro.io/api/.

Custom Blocks [/emails/custom_blocks]

List Custom Blocks [GET]

Required feature: emails/view or email_blocks/edit

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "custom_blocks": [
        {
            "id": "71e07c4e-caa0-4a0b-beb4-ab18f01ffb3c",
            "name": "My custom block",
            "content_json": "JSON content"
            "thumbnail_url": "https://me.instance.io/path/to/image.jpg",
            "modified": "2024-04-07T22:49:29Z",
            "modified_by": 4,
        }
    ]
}

Create Custom Block [POST]

Required feature: email_blocks/edit

  • Attributes

    • name: My custom block (string)
    • content_json: {} (string)
    • thumbnail_url: https://me.instance.io/path/to/image.jpg (string)
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 201 (application/json)

{
    "custom_block": {
        "id": "71e07c4e-caa0-4a0b-beb4-ab18f01ffb3c",
        "name": "My custom block",
        "content_json": "{}",
        "thumbnail_url": "https://me.instance.io/path/to/image.jpg",
        "modified": "2024-04-07T22:49:29Z",
        "modified_by": 4,
    }
}

Custom Block [/emails/custom_blocks/{custom_block_id}]

Get Custom Block [GET]

Required feature: emails/view or email_blocks/edit

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "custom_block": {
        "id": "71e07c4e-caa0-4a0b-beb4-ab18f01ffb3c",
        "name": "My custom block",
        "content_json": "{}",
        "thumbnail_url": "https://me.instance.io/path/to/image.jpg",
        "modified": "2024-04-07T22:49:29Z",
        "modified_by": 4,
    }
}
  • Response 404 (application/json)

Modify a Custom Block [PATCH]

Required feature: email_blocks/edit

  • Attributes

    • name: My renamed custom block (string)
    • content_json: {} (string)
    • thumbnail_url: https://me.instance.io/path/to/another/image.jpg (string)
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "custom_block": {
        "id": "71e07c4e-caa0-4a0b-beb4-ab18f01ffb3c",
        "name": "My renamed custom block",
        "content_json": "{}",
        "thumbnail_url": "https://me.instance.io/path/to/another/image.jpg",
        "modified": "2024-04-07T22:49:29Z",
        "modified_by": 4,
    }
}

Delete a Custom Block [DELETE]

Required feature: email_blocks/edit

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

On this page