Store content API

https://api.alert.alertinghub.co.uk/api/json/storecontent

The store content API allows you to upload either alerts, recipient lists or content data and store directly onto the system. Multiple content blocks can be included within a single transaction allowing you to upload a variety of pre-prepared items at the same time.

You can then use these stored items when sending alerts instead of specifying all the details in the API call.

Stored items generally have a ‘unused’ lifetime associated with them, which is automatically applied by Alerting Hub. If the content is not used within that time it will be deleted. You can override this automated setting but only if your API key has permission to do so (contact your account manager for details).

Json sample

{
    "version": "latest",
    "apiKey": "abcdefghijklmnopqrstuvwxyz",
    "content": [
        {
            "contentType": "sms",
            "tag": "t1",
            "content": "This is an SMS 1",
            "contentEncoding": "utf8",
            "options": {
                "expirationInDays": 0
            }
        }
    ]
}

Store content for alerts

ParameterRequirementDefaultDescription
versionMandatoryNoneSee API guide
apiKeyMandatoryNoneSee API guide
contentMandatoryArray of items to be stored
  contentTypeMandatoryNoneThe type of content which is being stored. One of "call","sms", "email","inboundCall","recipientList" or "alert"
  contentMandatoryActual content
  contentEncodingMandatoryEncoding of content, one of: "base64" | "utf8" | "json" (the latter only valid if contentType is 'alert', if set to json)
  tagMandatoryClient defined tag - freeform
If contentType is 'email'
  emailBodyIsMultipartOptionalFalseIf the body of the email message is multi-part
  emailBodyContentTypeOptionaltext/plain; charset=us-asciiUsed if emailBodyIsMultipart is false
  multipartBoundaryOptionalBlankIf emailBodyIsMultipart: true then this flag is used to denote start of a new mulitpart bounday
If contentType is 'call' or 'inboundCall'
  voiceFormatMandatoryNoneOne of "mp3","wav","aiff", "tts". The format of the audio which is encoded in the contentData. For 'tts' the contentData should decode to simple text.
  ttsOptionalNoneOptional tts block used if voiceFormat is 'tts'. See API guide
  options
    expirationInDaysOptionalSpecifies number of days of no-use before stored item is deleted - only valid if client is permitted to set. A value of 0 will mean no expiration.
If contentType is 'alert'
    scheduleOptionalNoneOptional schedule with which to launch the alert here. See API guide

Response

ParameterDescription
successOne of “true”, “false”. If false then failureReason should also be returned
contentArray of stored items processed for deletion
  successOne of “true”, “false”. If false then failureReason should also be returned
  storeIdA unique identifier for the stored content
  contentTypeType of content as per api call
  tagClient defined tag as per api call
  expirationInDaysThe stored data will be removed after 'n' days if not used
  scheduleIdIf an contentType was 'alert' and a schedule was requested then this is the unique schedule id relating to the alert.