Campaign template

Method: get

Authorization is required. Campaign templates are used only in the creation process of manually send campaigns.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/campaign/template/{templateId}

Parameters

property value description
templateId integer The template's ID

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Nisi proident tempor cillum sint duis eu elit dolor Lorem amet qui officia occaecat.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": {},
  "object": {
    "id": 2,
    "type": "campaignTemplate",
    "subject": "Campaign #2 subject",
    "content": "Campaign #2 content",
    "group": {
      "id": "83acbf0f-b920-4ecb-a61e-e85bbfaaa52f",
      "name": "ea",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "trigger": {
      "id": 1,
      "name": "Inactive Users",
      "description": "Fires when there are users inactive for more than 60 days. These users will recieve email. There is no need to add mail campaign, just attach this trigger to a template."
    },
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer the id of the record
subject string what should be the subject of the send emails
content string what should be the content of the send emails
group object Some common properties of the group in which the campaign was created: id, name, slug, thumbUrl, url (of the group home page)/td>
trigger object If the campaign is automatically trigger, this object represents the trigger related to it, if not - this property is null

Method: list

Authorization is required. Campaign templates are used only in the creation process of manually send campaigns.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/campaign/template/list/{groupId}

Parameters

property value description
groupId guid The group in which this template is created

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Esse anim incididunt duis nostrud veniam nisi ut non in duis dolor cupidatat enim.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": {},
  "object": {
    "offset": 11,
    "templates": [
      {
        "id": 1,
        "type": "campaignTemplate",
        "subject": "Campaign #1 subject",
        "content": "Campaign #1 content",
        "group": {
          "id": "83acbf0f-b920-4ecb-a61e-e85bbfaaa52f",
          "name": "ea",
          "slug": "Home",
          "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
          "url": "http://demo.hivesocialnow.com/Home/"
        },
        "trigger": null,
        "accessWarnings": []
      }
    ]
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer the id of the record
subject string what should be the subject of the send emails
content string what should be the content of the send emails
group object Some common properties of the group in which the campaign was created: id, name, slug, thumbUrl, url (of the group home page)/td>
trigger object If the campaign is automatically trigger, this object represents the trigger related to it, if not - this property is null

Method: create

Authorization is required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/campaign/template

Parameters

Do not supply a request parameters with this method.

Request body

property value description
groupId guid In which group to create the record
subject string What should be the subject of the generated emails from this template
content string What should be the content of the generated emails from this template
triggerId integer Should be NULL or the id of the selected automatic trigger.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "subject",
      "value": "",
      "message": "Subject cannot be blank"
    }
  ],
  "object": {
    "id": 1,
    "type": "campaignTemplate",
    "subject": "Campaign #1 subject",
    "content": "Campaign #1 content",
    "group": {
      "id": "83acbf0f-b920-4ecb-a61e-e85bbfaaa52f",
      "name": "ea",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "trigger": null,
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer the id of the record
subject string what should be the subject of the send emails
content string what should be the content of the send emails
group object Some common properties of the group in which the campaign was created: id, name, slug, thumbUrl, url (of the group home page)/td>
trigger object If the campaign is automatically trigger, this object represents the trigger related to it, if not - this property is null

Method: update

Authorization is required.

Request

HTTP request

PUT https://<YOUR_DOMAIN>/api/v1/en_US/campaign/template/{templateId}

Parameters

property value description
templateId integer In id of the updated template

Request body

property value description
subject string What should be the subject of the generated emails from this template
content string What should be the content of the generated emails from this template
triggerId integer Should be NULL or the id of the selected automatic trigger.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "subject",
      "value": "",
      "message": "Subject cannot be blank"
    }
  ],
  "object": {
    "id": 1,
    "type": "campaignTemplate",
    "subject": "Campaign #1 subject",
    "content": "Campaign #1 content",
    "group": {
      "id": "83acbf0f-b920-4ecb-a61e-e85bbfaaa52f",
      "name": "ea",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "trigger": null,
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer the id of the record
subject string what should be the subject of the send emails
content string what should be the content of the send emails
group object Some common properties of the group in which the campaign was created: id, name, slug, thumbUrl, url (of the group home page)/td>
trigger object If the campaign is automatically trigger, this object represents the trigger related to it, if not - this property is null

Method: delete

Authorization is required.

Request

HTTP request

DELETE https://<YOUR_DOMAIN>/api/v1/en_US/campaign/template/{templateId}

Parameters

property value description
templateId integer In id of the deleted record

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "subject",
      "value": "",
      "message": "Subject cannot be blank"
    }
  ],
  "object": {
    "id": 1,
    "type": "campaignTemplate",
    "subject": "Campaign #1 subject",
    "content": "Campaign #1 content",
    "group": {
      "id": "83acbf0f-b920-4ecb-a61e-e85bbfaaa52f",
      "name": "ea",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "trigger": null,
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) This list very rarely contains records during delete method processing
object object The object that was deleted