Blog Your Guide to the DataMotion Secure Message Delivery API

Your Guide to the DataMotion Secure Message Delivery API

You can integrate a direct secure messaging API into your application by creating a DataMotion API account, generating API credentials, and using secure API requests to send encrypted messages. With the DataMotion Postman collection, developers can test a first secure message in about 15 minutes and start building secure exchange into existing workflows.

The DataMotion platform provides HIPAA-compliant and HITRUST-certified infrastructure for healthcare, financial services, and the public sector.

DataMotion's secure file management interface with password-protected access, featuring multiple folders and a purple secuirty lock.

You can integrate a direct secure messaging API into your application by creating a DataMotion API account, generating API credentials, and using secure API requests to send encrypted messages. With the DataMotion Postman collection, developers can test a first secure message in about 15 minutes and start building secure exchange into existing workflows. 

The DataMotion platform provides HIPAA-compliant and HITRUST-certified infrastructure for healthcare, financial services, and the public sector.

When sending any sensitive information over the Internet, such as bank statements, payroll data, insurance claims, medication details, or even your home address, it’s important to ensure that your data is protected on its journey from your sent box to the recipient’s inbox. This is where DataMotion’s secure message delivery API, with its end-to-end encryption, comes in handy.

The Secure Message Delivery API

DataMotion, Inc. is an API company specializing in secure data transfer. Our secure message delivery API uses end-to-end encryption, which allows you to send a secure message to anyone with a valid email address while protecting the contents of your messages in transit. In addition to securely sending messages, the API allows you to track and retract your messages as well.

In this guide, I will walk you through creating a DataMotion account and getting started with our secure message delivery API.

What You Will Need to Get Started

For this tutorial, you will need the following:

Postman account to test the API

Send Your First Secure Message in 15 minutes: Step-by-Step

Follow these five steps to integrate secure messaging into your application.

Step 1: Create Your DataMotion API Account

The first step to utilize the DataMotion secure message delivery API is to create a DataMotion account. To do so,

  1. Visit datamotion.com/portal, where you’ll see available plans displayed on the page
  2. Locate the ‘Secure Message Delivery’ bundle
  3. Click the ‘Try’ icon to begin signing up
  4. Click the ‘Login’ button in the top right corner
  5. Select ‘Sign up Here’ at the bottom of the login pop-up
  6. Complete the registration form and create a secure password
  7. Review and agree to the terms of service
  8. Click ‘Create Your Account’

Once your account is set up, you’ll receive:

  • Access to your private API dashboard
  • $25 balance automatically credited to your account for API testing
  • Secure direct messaging address for your account
  • Ability to create applications and generate API credentials

Your account dashboard becomes your central hub for monitoring API usage, managing credentials, and tracking your credit balance.

To create a DataMotion API account, please click the purple on the secure message delivery API trial

Step 2: Create an Application and Generate API Credentials

API authentication requires two pieces of information: an API key and an API secret. These credentials authorize your application to send messages through DataMotion’s secure infrastructure. The key and secret will be tied to an application for organizational purposes. You can generate multiple applications to organize your users and environments.

To generate credentials:

  1. Log in to your API dashboard at datamotion.com/portal.
  2. Navigate to ‘Applications’ in the left sidebar menu.
  3. Click ‘Create Application’ to generate a new credential set.
  4. Provide an application name and description.
  5. Select ‘Other’ for the application type and provide a description.
  6. Select the ‘plus’ sign (+) in the center of the ‘API Keys’ section to the left of the ‘Application Details.’
  7. Copy the API secret from the pop-up and store it somewhere safe.
  8. Once you copy the secret, the pop-up will close. Navigate to the ‘API Key’ section to find your new API key.

Note that your API secret displays only once. Copy both the API key and API secret immediately and store them securely. These credentials function like passwords, so never commit them to public repositories or share them via unsecured channels. If you lose your API secret, you’ll need to generate a new credential pair.

Next, enter your name, job title, organization name, email, and password to create your account. Then click create your account

Get your API secret clicking the (+) sign in the center of the 'API Keys' section

Once you copy the secret, the pop up will close and in the ‘API Key’ section you will find your new API key. We will be using this key as well, so be sure to have it handy.

Once the API secret pop-up closes, you will find your new API key

Step 3: Download Postman Collection

Now that your application is configured, and your API secret and key have been generated, it’s time to test our API. There are a few ways to test, but for this tutorial, we will use Postman, an API testing tool.

Note: You can find Postman tips and tricks on DataMotion’s Twitter and LinkedIn pages, as well as Postman demo videos on our site.

To download the Postman collection:

  1. Navigate to the DataMotion ‘SecureMessage-Postman-Collection’ on GitHub.
  2. Click the green ‘Code’ button to download the JSON file needed.
  3. Select ‘Download ZIP.’
  4. Save and extract the ZIP file to your computer. The file contains three JSON files.
  5. Open Postman application.
  6. Click ‘Workspaces’ in the top left of the screen.
  7. Select ‘+New Workspace.’
  8. Name your workspace ‘DataMotion Secure Message API’ and select ‘Create Workspace.’
  9. In your new empty workspace, click ‘Import.’
  10. Under the new file tab, select ‘Upload Files.’
  11. Navigate to the extracted JSON file from your downloads and click ‘Open.’
  12. Once the file is opened, select ‘Import.’

You have successfully imported the DataMotion secure message delivery API collection! The collection will appear in your workspace with pre-configured API requests ready for testing.

Click + New Workspace; in Postman to open a new workspace

In the page that appears, name the collection ‘DataMotion Secure Message API’ and select ‘Create Workspace.’ You will now have an empty workspace in which to populate the secure message delivery API collection. Select ‘Import’ (located under the ‘Workspaces’ option) which you will see to the right of your workspace name.

Step 4: Configure Environment Variables in Postman

Before testing requests, set up these critical variables that authenticate your API calls:

  1. In Postman, open the DataMotion collection and select the request labeled ‘Send a Secure Message.’
  2. In the request URL textbox, locate the {{BaseURL}} variable. You can replace the variable directly in the request URL, or you can populate it through the collection settings so the same Base URL applies to every request in the collection.
  3. To populate the Base URL variable through the collection settings, select the ellipsis next to the collection name and select ‘Edit.’
  4. In the ‘Variables’ tab, find the Base URL variable and add the following URL in the ‘Current Value’ field: https://api.datamotion.com/SecureMessageDelivery/v1.2.
  5. Return to the request, and in the request URL textbox, replace ‘{MessageDeliveryType}’ with ‘Email’.
  6. Find the API Key variable ({{UniqueID}}) and the Secret variable ({{SecretValue}}), and paste the API key and API secret you generated and saved earlier.

Now, your Postman collection will automatically authenticate with your credentials for all API requests.

Click 'Upload Files' to upload the DataMotion secure message delivery API JSON file

Step 5: Fill Out the Request and Send Your First Encrypted Message

Now you’re ready to test the ‘Send a Secure Message’ request:

Congratulations, you have sent your first secure message!

With the request URL and variables configured, select the ‘Body’ tab and confirm that the ‘raw’ option is selected above the request textbox.

Review the JSON outline in the request body and replace the dummy data with your test message details:

From: The ‘From’ address will be the address you are sending the secure message from. Enter the address with which you created the API secret and key.

To: The ‘To’ address can be any mailbox address. To test, you can enter the same address you used for the from address or any address you have access to.

Cc (optional): Enter any additional email address that has a corresponding mailbox you would like copied.

Bcc (optional): Enter any additional email address that has a corresponding mailbox you would like to blind copy.

Subject (optional): Enter the subject of the email. For this test, you will put ‘HR – New Hire Form.’

Attachments (optional): To add an attachment, you will need to provide the base64 string, content type, FileName and ContentID. There are a few additional steps to automatically gather this information, but for today’s demo, you can leave this section blank.

HtmlBody (optional): In this section, you can add HTML text to send in the body of the message. For this example, you can keep this section blank.

TextBody (optional): Outline the body in plain text and add the information you collected from the new hire form.

Once the request is fully configured, select ‘Send’ at the top left of the screen. In the response section, located directly below the request textbox, you should see a 200 HTTP status as well as your message ID and message expiration date.

To ensure the message is delivered, navigate to the inbox of the recipient address specified in the request. You should see a secure message waiting in your inbox.

Start testing the API by selecting the 'Send a Secure Message' request

In the request URL textbox, you will see a variable for the Base URL.  You can replace the variable shown as ‘{{BaseURL}}’ or populate it through the collection’s variable list so this will be represented in all three of the collection’s requests.

To populate the variable, select the ellipsis next to the collection name and select ‘Edit.’ In the Variables tab, next to the Base URL variable add ‘https://api.datamotion.com/SecureMessageDelivery/v1.2’ in the ‘Current Value’ section.

Once the Base URL variable is populated, return to the request. In the request URL textbox replace ‘{MessageDeliveryType}’ which comes after the Base URL, with ‘Email’.

To populate the variable, select the ellipsis, then select 'Edit'

Ready to Integrate Secure Messaging Into Your Application?

You’ve learned how DataMotion’s secure message delivery API enables HIPAA-compliant, encrypted communications without infrastructure complexity. From your first test message to production deployment, the DataMotion platform delivers enterprise-grade security with developer-friendly simplicity. This functionality can be extended to your employees and customers, as our APIs make it extremely easy to seamlessly integrate secure messaging into your current apps and customer portals. 

To start building today, contact our sales team to create your free developer account or to discuss enterprise pricing and support options.