Read insight
curl --request GET \
--url https://int-api.mx.com/users/{user_guid}/insights/{insight_guid} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"insight": {
"active_at": "2022-01-07T12:00:00Z",
"client_guid": "CLT-abcd-1234",
"created_at": "2022-01-12T18:16:51Z",
"cta_clicked_at": "2022-01-13T18:13:51Z",
"description": "Gold's Gym charged you $36.71 more this month than normal. Did you upgrade your service?",
"guid": "BET-abcd-1234",
"has_associated_accounts": false,
"has_associated_categories": false,
"has_associated_merchants": false,
"has_associated_scheduled_payments": false,
"has_associated_transactions": true,
"has_been_displayed": true,
"is_dismissed": false,
"micro_call_to_action": "Learn more",
"micro_description": "Netflix charged you $5.00 more this month than normal.",
"micro_title": "Price increase",
"template": "SubscriptionPriceIncrease",
"title": "Price increase",
"updated_at": "2022-01-12T18:16:51Z",
"user_guid": "USR-1234-abcd",
"user_id": "<unknown>"
}
}Insights
Read insight
Use this endpoint to read the attributes of an insight according to its unique GUID.
GET
/
users
/
{user_guid}
/
insights
/
{insight_guid}
Read insight
curl --request GET \
--url https://int-api.mx.com/users/{user_guid}/insights/{insight_guid} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-api.mx.com/users/{user_guid}/insights/{insight_guid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"insight": {
"active_at": "2022-01-07T12:00:00Z",
"client_guid": "CLT-abcd-1234",
"created_at": "2022-01-12T18:16:51Z",
"cta_clicked_at": "2022-01-13T18:13:51Z",
"description": "Gold's Gym charged you $36.71 more this month than normal. Did you upgrade your service?",
"guid": "BET-abcd-1234",
"has_associated_accounts": false,
"has_associated_categories": false,
"has_associated_merchants": false,
"has_associated_scheduled_payments": false,
"has_associated_transactions": true,
"has_been_displayed": true,
"is_dismissed": false,
"micro_call_to_action": "Learn more",
"micro_description": "Netflix charged you $5.00 more this month than normal.",
"micro_title": "Price increase",
"template": "SubscriptionPriceIncrease",
"title": "Price increase",
"updated_at": "2022-01-12T18:16:51Z",
"user_guid": "USR-1234-abcd",
"user_id": "<unknown>"
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The unique identifier for a user, beginning with the prefix USR-.
The unique identifier for the insight. Defined by MX.
Response
200 - application/vnd.mx.api.v1+json
OK
Hide child attributes
Hide child attributes
Example:
"2022-01-07T12:00:00Z"
Example:
"CLT-abcd-1234"
Example:
"2022-01-12T18:16:51Z"
Example:
"2022-01-13T18:13:51Z"
Example:
"Gold's Gym charged you $36.71 more this month than normal. Did you upgrade your service?"
Example:
"BET-abcd-1234"
Example:
false
Example:
false
Example:
false
Example:
false
Example:
true
Example:
true
Example:
false
Example:
"Learn more"
Example:
"Netflix charged you $5.00 more this month than normal."
Example:
"Price increase"
Example:
"SubscriptionPriceIncrease"
Example:
"Price increase"
Example:
"2022-01-12T18:16:51Z"
Example:
"USR-1234-abcd"
⌘I

