Update Content Block

post

/content_blocks/update

Use this endpoint below to update an Email Content Block.

Request Body

1
2
3
4
5
6
7
8
9
{
  "api_key": "YOUR_API_KEY_HERE",
  "content_block_id" :"123a45b6-cd78-9e01-g234-hi56j7k8l9m0", 
  "name": "content-block-1",
  "description": "This is my content block",
  "content": "HTML or text content within block",
  "state": "draft",
  "tags": ["",""]
}

Request Parameter Details

Parameter Required Data Type Description
api_key Yes String Your App Group REST API Key.
content_block_id Yes String Your Content Block’s API Identifier.
name Yes String Can only be provided when the content block is in a draft state. Must be less than 100 characters.
description No String The description of the content block. Must be less than 250 characters.
content Yes String HTML or text content within Content Block.
state Optional Choose “active” or “draft”. Defaults to active if not specified. Can not set an active content block to draft.  
tags No Array of Strings. Tags must already exist.

Successful Response Properties

1
2
3
4
5
6
{
  "content_block_id": "newly-generated-block-id",
  "liquid_tag": "generated-block-tag-from-content_block_name",
  "created_at": "time-created-in-iso",
  "message": "success"
}

Possible Errors

  • Content cannot be blank.

  • Content must be a string.

  • Content must be smaller than 50kb. The content in your content block must be less than 50kb total.

  • Content contains malformed liquid. The liquid provided is not valid or parsable. Please try again or reach out to support.

  • Content Block cannot be referenced within itself.

  • Content Block description cannot be blank.

  • Content Block description must be a string.

  • Content block description must be shorter than 250 characters. Your content block description must be less than 250 characters.

  • Content Block name cannot be blank.

  • Content Block name must be a shorter than 100 characters.

  • Content Block name can only contain alphanumeric characters. Content Block names can include any of the following characters: the letters (capitalized or lowercase) A through Z, the numbers 0 through 9, dashes -, and underscores _. It cannot contain non-alphanumeric characters like emojis, !, @, ~, &, and other “special” characters.

  • Content Block with this name already exists.

  • Content Block name cannot be updated for active Content Blocks.

  • Content Block state must be either Active or Draft.

  • Active Content Block can not be updated to Draft. Please create a new Content Block.

  • Tags must be an array.

  • All Tags must be Strings.

  • Some Tags could not be found.

WAS THIS PAGE HELPFUL?
New Stuff!