Create a Content Block 


Note: If you are entering a more complex Content Block in the content field that requires double quotes in it, they must be entered and exited with a backslash


Example: 

content: "{{#if (eq [First-Name] \"Tommy\")}}<p>Hello there. {{[First-Name]}}</p>{{else}}<p>Wgat is your name?</p>{{/if}}"



{
  "//DOC": [
    "ContentBlock::CreateContentBlock",
    "",
    "Create a content block.",
    "",
    "  name             [string, required]: content block name",
    "  description      [string, required]: description of content block",
    "  content          [string, required]: content of content block",
    "  isglobal         [bool, optional, default=false]: is global"
  ],
  "username": "matbt@pinpointe.com",
  "usertoken": "XXX",
  "requesttype": "ContentBlock",
  "requestmethod": "CreateContentBlock",
  "details": {
    "name": "Name 02",
    "description": "Added via API",
    "content": "I work for {{[Company-Name]}}",
    "isglobal": "0"
  }
}

JSON_request element


Field NameDescription
usernameUsername used to login to Pinpointe
usertokenUnique token assigned to Pinpointe account
requesttypeContentBlock
requestmethodCreateContentBlock


detail element


Field NameDescription
name (required)Name of Content Block
description (required)Description of Content Block
content (required)The content of the Content Block
isglobal (optional)Is the Content Block global? (boolean)



Successful response


response element


Field NameDescription
statusReturns SUCCESS when successful


Unsuccessful response 


response element


Field NameDescription
statusReturns FAILED when unsuccessful
errormessageText explaining that the link is invalid