Blocks

Get a block

Returns a block with its content.

get/blocks/{id}

Request

  • Base URL
    https://api5.optimove.net/content/v1
  • URL
    https://api5.optimove.net/content/v1/blocks/{id}
  • Auth
    API key in header X-API-KEY

Response

The block.

idstring uuid required
tagNamestring required
namestring required
folderIdstring uuid nullable
descriptionstring nullable
htmlstring required
plaintextstring required
editorDatastring nullable
editorType'html' | 'visual' required

Editor the content is built with:

  • html: HTML code editor
  • visual: drag-and-drop editor
autoGeneratePlainTextboolean required

UI only. Whether the Optimove UI generates the plain text from the HTML when the block is edited there. The API never generates plain text: plaintext is returned exactly as it was stored.

isSavedRowboolean required
createdAtstring date-time required
createdBystring required

Name of the API key or user that created the block.

updatedAtstring date-time required
updatedBystring required

Name of the API key or user that last updated the block.

Example response

{
  "tagName": "summer-sale-banner",
  "name": "Summer sale banner",
  "html": "<div>Hi {{customer.FirstName}}, our summer sale has started.</div>",
  "plaintext": "Hi {{customer.FirstName}}, our summer sale has started.",
  "editorType": "html",
  "code": {
    "header": "{% assign greeting = \"Hello\" %}"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.