Try it Now

Your Secure Community portal is under construction. You will be redirected to your new portal shortly.

creating portal

Overview

Never collect or share unprotected information again. DeliverySlip security can be applied via API to any Web Form or App. Protect 100% of your workflows, not just email communication. The DeliverySlip API allows third-party developers to request data and initiate processes with a specific customer Portal.

API Services

The MsgAPI is a stateless JSON based REST API. MsgAPI uses HTTP methods such as GET, POST, PUT, and DELETE to operate on resources.

General Workflow

Two APIs are used in a general workflow. First, it is required to call CCCAPI’S PublicGetService command to discover the portal’s API URL (needed for consuming MsgAPI). Afterwards, to access commands that require authentication, call MsgAPl’s login command to obtain the session token, pass that into the header along with x-sm-client-name and X-sm-client-version to consume the services.

Authentication and Security

The API is only available to PRO registered users and through a secure HTTPS channel. Accessing the API via a regular HTTP channel will result in a 500 HTTP error code returned by the server. Each API request that you send needs to contain a session token, which will be used to authorize access to the operation specified in the API request. Session tokens are only available to active users and only authorize operations within the same DeliverySlip portal. By default, session tokens expire after 60 minutes of idle time.

API Code Samples


Login

API Doc:

https://us1.secure-messaging.com/secure/api/json/metadata?op=Login

Purpose:

Authenticate the user and obtain a session token to be used in subsequent commands to consume the services provided by the API.

Request Parameters:

Name Description Data Type Required
username Valid user Email Address. The email address uniquely identifies the user. String Yes
password The password to login to the email address. String Yes
cookieless Determine whether the session-token should be set in the cookies. Default to false. Boolean Yes

Request Parameters:

Name Description Data Type Required
sessionToken To be used in subsequent commands to consume the services. String Yes

Definition:

POST https://usl.secure-messaging.com/secure/api/login

Example Request:

{
"username": "example deliveryslip.com", 
"password": "password"
}

Example Response:

{
"sessionToken": "f89201b2-df0b-4427-944E-512541fbdese"
}

Header Information

In order to use the MsgAPI commands, user will need to pass in the following in the header.
  • Content-type - this should be set to 'application/json' for requests
  • X-sm-client-name - must be passed with EVERY call (custom API integrations are encouraged to use the name of their application, this is used for tracking purposes).
  • X-sm-client-version - can optionally be passed with every request. This is the version of your custom client application.
  • X-sm-session-token - If NOT using cookies, must be passed with every request that requires authentication.

Example

Content-Type: X-sm-client-name: x-sm-client-version: X-session-token: application/json Delivery-Slip-Example-Name 6.91503901 f89201b2-df08-4427-9445-512541fbde5e

Get Service Information

API Doc:

https://api.secure-messaging.com/api/json/metadata?op=PublicGetService

Purpose:

To discover the MsgAPI URL (the value of secMsgAPI parameter) which is needed to consume the MsgAPI. The MsgAPI URL corresponds to the URL of the DeliverySlip portal server URL that hosts the customer portal. By obtaining the MSgAPI URL from the PublicGetService command, it will ensure the correct and updated MsgAPI URL is always returned, even when the hosting location changes.
Name Description Data Type Required
serviceGuid The serviceGuid of the service. Must be provided if serviceCode is null Guid No
serviceCode The serviceCode of the service. Must be provided if serviceGuid is null String No

Response Parameters:

Note: Multiple parameters will be returned in the response. Below only shows a couple of them. The one that is important for consuming the DeliverySlip MsgAPI is the SecMsgAPI parameter.
Name Description Data Type Required
serviceGuid The serviceGuid of the service. Guid No
serviceCode The serviceCode of the service. String No
serviceName The name of the service. String No
secMSGAPI The URL to consume DeliverySlip API.

Definition:

GET https://api.secure-messaging.com/api/public/services/ {serviceGuid} 

Example Request:

GET https://api.secure-messaging.com/api/public/services/ {serviceGuid} 

Example Response:

{
  "serviceGuid": "00000000000000000000000000000000",
  "serviceStatus": "Blocked",
  "serviceName": "String",
  "serviceCode": "String",
  "collectionGuid": "00000000000000000000000000000000",
  "collectionName": "String",
  "jurisdiction": "String",
  "providerName": "String",
  "primaryDomain": "String",
  "alertCode": 0,
  "ssoEnabled": false,
  "branding": {
    "String": "String"
  },
  "urls": {
    "MessagingApi": "String"
  },
  "connectors": [
    {
      "name": "String",
      "idPxGuid": "00000000000000000000000000000000",
      "idPxLoginUrl": "String",
      "matchesAuth": false
    }
  ],
  "authenticators": [
    {
      "name": "String",
      "description": "String",
      "idProviderGuid": "00000000000000000000000000000000",
      "idPxLoginUrl": "String",
      "usedLast": false
    }
  ],
  "responseStatus": {
    "errorCode": "String",
    "message": "String",
    "stackTrace": "String",
    "errors": [
      {
        "errorCode": "String",
        "fieldName": "String",
        "message": "String",
        "meta": {
          "String": "String"
        }
      }
    ],
    "meta": {
      "String": "String"
    }
  }
}

Send Message

API Doc:

https://us1.secure-messaging.com/secure/api/json/metadata?op=PreCreateMessage
https://us1.secure-messaging.com/secure/api/json/metadata?op=SaveMessage
https://s1.secure-messaging.com/secure/api/json/metadata?op=SendMessage

To send a message, you will need to call preCreateMessage, saveMessage, and sendMessage commands. All of these commands require authentication so it is necessary to pass in the x-sm-session-token if not using cookies.

Step 1: Precreate Message

Request Parameters:

NameParameterData TypeRequiredDescription
ActionCodebodystringYesAllowable Values
  • New
  • Reply
  • ReplyAll
  • Forward
Creating a new message requires that the User Group assigned to the sender has the appropriate privileges for this action. Continuing a conversation with a reply, replyAll, or forward action requires that the sender has the appropriate privileges to create a new message and to associate it to the parent message. This also depends on the privileges assigned to the parent message. This also depends on the privileges assigned to the parent message specified in parentMessageGuid.
ParentGuidbodystringNoThe guid of the parent message if this is a reply or forward.
PasswordbodystringNoThe password of the parent message. This is only required if the parent message requires a password.
AuthAuditTokenbodystringNoThe authAuditToken for the parent message. This is only required if the parent message requires a password.
CampaignGuidbodystringNoThe guid of the campaign this message is associated with. The user must be enabled for Campaigns and the Campaign must be Active.
ExternalMessageIdbodystringNo

Response Parameters:

NameParameterData TypeRequired
ResponseStatusformResponseStatusNo
MessageGuidbodystringYes

Definition

POST https://us1.secure-messaging.com/secure/api/messages

Example Request:

{
"actionCode":"New"
} 

Example Response:

{
"messageGuid": "6e04b9d381544bb2b2c431e919285e3d"
}

Step 2: Save Message

Request Parameters:

NameParameterData TypeRequiredDescription
MessageGuidpathstringYes
TobodyarrayNo
CcbodyarrayNo
BccbodyarrayNo
SubjectbodystringNo
BodybodystringNo
BodyFormatbodystringYesAllowable Values
  • Text
  • Html
MessageOptionsbodyMessageOptionsNoWhen omitted, the services default message options are used.
ExpiryDatebodystringNoMessage to expire on this date in accordance with expiry policy.
ExpiryGroupbodystringNoAllowable Values
  • Always

MessageOptions parameters:

NameParameterData TypeRequiredDescription
MessageGuidpathstringYes
TobodyarrayNo
CcbodyarrayNo
BccbodyarrayNo
SubjectbodystringNo
BodybodystringNo
BodyFormatbodystringYesAllowable Values
  • Text
  • Html
MessageOptionsbodyMessageOptionsNoWhen omitted, the services default message options are used.
ExpiryDatebodystringNoMessage to expire on this date in accordance with expiry policy.
ExpiryGroupbodystringNoAllowable Values
  • Always

Response parameters: empty response.

Definition

PUT https:/us1.secure-messaging.com/secure/api/messages/ {messageGuid}/save

Example Request:

{
"messageGuid": "6e04b9d381544bb2b2c431e919285e3d", 
"to": [
"user1@deliveryslip.com", "user2@deliveryslip.com"
],
"subject". "Hello", 
"body". I received it", 
"bodyFormat": "Html", 
"messageoptions":{
"allowforward": true, 
"allowReply": true, 
"allowtracking": true, 
"fveoType": "disabled", 
"shareTracking": true
},
"expiryGroup": "Always",
"expirydate":"2018-06-25T00:00:00.842Z"
}

Example Response: empty response.

Step 3: Send Message

Request Parameters:

NameParameterData TypeRequiredDescription
MessageGuidpathstringYes
PasswordbodystringYesThe password for the message, if required.
InviteNewUsersbodybool?NoRecipients of the message that do not exist in the service will be invited. Allowable Values
  • true
  • false
SendEmailNotificationbodybool?NoRequire the service to send a basic email notification message. Allowable Values
  • true
  • false
CraCodebodystringNo
NotificationFormatsbodyarrayNoAllowable Values
  • Text
  • Html

Response Parameter:

NameParameterData TypeRequiredDescription
NotificationBodyTextformstringNo
NotificationBodyHtmlformstringNo
NotificationSentformboolNoAllowable Values
  • true
  • false
ResponseStatusformResponseStatusNo

Definition

PUT https:/us1.secure-messaging.com/secure/api/messages/ {messageGuid}/send

Example Request:

{
"messageGuid":"6e04b9d381544bb2b2c431e919285e3d", 
"inviteNewUsers": false,
 "sendEmailNotification":true
}

Example Response:

{
"notificationSent": true
}

How would you like to hear from us?