A few simple steps

Postman is a powerful tool for interacting with certain APIs used by practically every developer in the world at one point or another. Which is obviously an exaggeration. But it’s important and lots of people use it. So we want to make it easy for you to use it too.

If you’ve got about five minutes to follow these simple steps, you can start making test requests to the Platform API in our integrations environment. Just make sure you’ve already signed up for our API first.

  1. Install Postman.
  2. Import MX’s OpenAPI spec.
  3. Add authorization, header, and variable information.
  4. Make your first request.

1. Install Postman

You should be able to handle this on on your own. You can download Postman here. Or Google it. Whatever tickles your fancy.

2. Import the MX Platform OpenAPI spec

  1. Copy this link to the spec.
  2. Open up Postman and click the “Import” button on the top left. Select the “Link” option, paste in the link from 1., and click “Continue.”
  3. Make sure that the “Generate collections from imported APIs” option is checked.
  4. Click the “Show advanced settings” dropdown.
    • Set “Request parameter generation” to “Example.”
    • Set “Response parameter generation” to “Example.”
    • Set “Folder organization” to “Tags.”
  5. Click import.

Import Button

Paste link

Config 1

Config 2

3. Add authorization, header, and variable information

  1. Get your client_id and api_key from the MX client dashboard. You’ll need these to authenticate requests to the Platform API.
  2. Back in your Postman workspace, make sure you are looking at your collections, not your APIs. Then click the three dots next to the MX Platform API and select “Edit” from the dropdown.
  3. On the “Authorization” tab, make sure the “Type” is set to “Basic,” then add your client_id as the username and your api_key as the password.
  4. On the “Pre-request Script” tab, copy and paste the following (these little bits of code will make sure that you’re using the correct headers on all your requests from Postman):

    pm.request.headers.upsert({key: 'Accept', value: 'application/vnd.mx.api.v1+json' });
    pm.request.headers.upsert({key: 'ContentType', value: 'application/json' });

  5. On the “Variables” tab, make sure that the “baseURL” variable is set to our integration environment, https://int-api.mx.com, for both the initial value and the current value.
    • If you see any other variables showing up here, go ahead and uncheck them. That’s our bad.
  6. Click “Save.”


Authorization 2



4. Make your first request

There are a lot of requests in the Platform API that do a lot of things, and some of them need to be done in very specific ways. We’re not going to deal with any of that in this guide, thank goodness. You can see all that information in our comprehensive API reference or in on of our other focused guides.

Right now, we’re just going to make a simple request to create a user on the MX Platform. If we’ve set everything up correctly, you’ll literally just have to click like three things and you’ll be done.

  1. Within the MX Platform API collection in Postman, go to the “User” folder and click on the “Create user” request. It will have a a yellow “POST” next to it.
    • You’ll see some details pop up, including an example JSON-formatted request body with fake information in it.
  2. Click the “Send” button.
    • You should see a JSON-formatted response appear below the example data, and you should see a status of 200 OK in the response area.
    • You can use the example data provided, or you could enter in whatever data you like in the email, id, or metadata fields, as long as they’re formatted correctly. Best not to mess with is_disabled. Just leave it as false.

Send 1

Send 2

And that’s it. You’ve made your first request to the API. All is well with the world. At least until you have to get back to work.

Next Steps

Creating users and members

Now that you’ve got everything set up with Postman, it’s probably best to create a few of the core resources in the Platform API, like another user well as a member, which is central to things like aggregation, account verification, identification, and more.