curl --request POST \
--url https://int-api.mx.com/users/{user_identifier}/members \
--header 'Accept-Version: <accept-version>' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"client_redirect_url": "https://{yoursite.com}",
"enable_app2app": false,
"referral_source": "APP",
"ui_message_webview_url_scheme": "<string>"
}
'import requests
url = "https://int-api.mx.com/users/{user_identifier}/members"
payload = {
"client_redirect_url": "https://{yoursite.com}",
"enable_app2app": False,
"referral_source": "APP",
"ui_message_webview_url_scheme": "<string>"
}
headers = {
"Accept-Version": "<accept-version>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Accept-Version': '<accept-version>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
client_redirect_url: 'https://{yoursite.com}',
enable_app2app: false,
referral_source: 'APP',
ui_message_webview_url_scheme: '<string>'
})
};
fetch('https://int-api.mx.com/users/{user_identifier}/members', 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_identifier}/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_redirect_url' => 'https://{yoursite.com}',
'enable_app2app' => false,
'referral_source' => 'APP',
'ui_message_webview_url_scheme' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Accept-Version: <accept-version>",
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://int-api.mx.com/users/{user_identifier}/members"
payload := strings.NewReader("{\n \"client_redirect_url\": \"https://{yoursite.com}\",\n \"enable_app2app\": false,\n \"referral_source\": \"APP\",\n \"ui_message_webview_url_scheme\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept-Version", "<accept-version>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://int-api.mx.com/users/{user_identifier}/members")
.header("Accept-Version", "<accept-version>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"client_redirect_url\": \"https://{yoursite.com}\",\n \"enable_app2app\": false,\n \"referral_source\": \"APP\",\n \"ui_message_webview_url_scheme\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-api.mx.com/users/{user_identifier}/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept-Version"] = '<accept-version>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_redirect_url\": \"https://{yoursite.com}\",\n \"enable_app2app\": false,\n \"referral_source\": \"APP\",\n \"ui_message_webview_url_scheme\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"member": {
"aggregated_at": "2016-10-13T18:07:57.000Z",
"background_aggregation_is_disabled": false,
"connection_status": "CONNECTED",
"connection_status_message": "Connected to MX Bank",
"error": {},
"guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
"id": "unique_id",
"institution_code": "mxbank",
"institution_guid": "INST-12345678-90ab-cdef-1234-567890abcdef",
"is_being_aggregated": false,
"is_managed_by_user": false,
"is_manual": false,
"is_oauth": false,
"metadata": "\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\",
"most_recent_job_detail_code": null,
"most_recent_job_detail_text": null,
"most_recent_job_guid": "JOB-12345678-90ab-cdef-1234-567890abcdef",
"name": "MX Bank",
"needs_updated_credentials": false,
"oauth_window_uri": "https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2",
"successfully_aggregated_at": "2016-10-13T17:57:38.000Z",
"use_cases": [
"PFM"
],
"user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54",
"user_id": "u-1234"
}
}{
"member": {
"aggregated_at": "2016-10-13T18:07:57.000Z",
"background_aggregation_is_disabled": false,
"connection_status": "CONNECTED",
"connection_status_message": "Connected to MX Bank",
"error": {
"error_type": "MEMBER",
"error_code": "REQUEST_FAILED",
"error_message": "There was an error attempting to process your request. The Member was created but we were unable to fulfill the data request.",
"user_message": "We're having trouble connecting right now. Please try again later."
},
"guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
"id": "unique_id",
"institution_code": "mxbank",
"institution_guid": "INST-12345678-90ab-cdef-1234-567890abcdef",
"is_being_aggregated": false,
"is_managed_by_user": false,
"is_manual": false,
"is_oauth": false,
"metadata": "\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\",
"most_recent_job_detail_code": null,
"most_recent_job_detail_text": null,
"most_recent_job_guid": "JOB-12345678-90ab-cdef-1234-567890abcdef",
"name": "MX Bank",
"needs_updated_credentials": false,
"oauth_window_uri": "https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2",
"successfully_aggregated_at": "2016-10-13T17:57:38.000Z",
"use_cases": [
"PFM"
],
"user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54",
"user_id": "u-1234"
}
}{
"member": {
"aggregated_at": "2016-10-13T18:07:57.000Z",
"background_aggregation_is_disabled": false,
"connection_status": "CONNECTED",
"connection_status_message": "Connected to MX Bank",
"error": {},
"guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
"id": "unique_id",
"institution_code": "mxbank",
"institution_guid": "INST-12345678-90ab-cdef-1234-567890abcdef",
"is_being_aggregated": false,
"is_managed_by_user": false,
"is_manual": false,
"is_oauth": false,
"metadata": "\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\",
"most_recent_job_detail_code": null,
"most_recent_job_detail_text": null,
"most_recent_job_guid": "JOB-12345678-90ab-cdef-1234-567890abcdef",
"name": "MX Bank",
"needs_updated_credentials": false,
"oauth_window_uri": "https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2",
"successfully_aggregated_at": "2016-10-13T17:57:38.000Z",
"use_cases": [
"PFM"
],
"user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54",
"user_id": "u-1234"
}
}Create member
curl --request POST \
--url https://int-api.mx.com/users/{user_identifier}/members \
--header 'Accept-Version: <accept-version>' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"client_redirect_url": "https://{yoursite.com}",
"enable_app2app": false,
"referral_source": "APP",
"ui_message_webview_url_scheme": "<string>"
}
'import requests
url = "https://int-api.mx.com/users/{user_identifier}/members"
payload = {
"client_redirect_url": "https://{yoursite.com}",
"enable_app2app": False,
"referral_source": "APP",
"ui_message_webview_url_scheme": "<string>"
}
headers = {
"Accept-Version": "<accept-version>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Accept-Version': '<accept-version>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
client_redirect_url: 'https://{yoursite.com}',
enable_app2app: false,
referral_source: 'APP',
ui_message_webview_url_scheme: '<string>'
})
};
fetch('https://int-api.mx.com/users/{user_identifier}/members', 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_identifier}/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_redirect_url' => 'https://{yoursite.com}',
'enable_app2app' => false,
'referral_source' => 'APP',
'ui_message_webview_url_scheme' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Accept-Version: <accept-version>",
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://int-api.mx.com/users/{user_identifier}/members"
payload := strings.NewReader("{\n \"client_redirect_url\": \"https://{yoursite.com}\",\n \"enable_app2app\": false,\n \"referral_source\": \"APP\",\n \"ui_message_webview_url_scheme\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept-Version", "<accept-version>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://int-api.mx.com/users/{user_identifier}/members")
.header("Accept-Version", "<accept-version>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"client_redirect_url\": \"https://{yoursite.com}\",\n \"enable_app2app\": false,\n \"referral_source\": \"APP\",\n \"ui_message_webview_url_scheme\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-api.mx.com/users/{user_identifier}/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept-Version"] = '<accept-version>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_redirect_url\": \"https://{yoursite.com}\",\n \"enable_app2app\": false,\n \"referral_source\": \"APP\",\n \"ui_message_webview_url_scheme\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"member": {
"aggregated_at": "2016-10-13T18:07:57.000Z",
"background_aggregation_is_disabled": false,
"connection_status": "CONNECTED",
"connection_status_message": "Connected to MX Bank",
"error": {},
"guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
"id": "unique_id",
"institution_code": "mxbank",
"institution_guid": "INST-12345678-90ab-cdef-1234-567890abcdef",
"is_being_aggregated": false,
"is_managed_by_user": false,
"is_manual": false,
"is_oauth": false,
"metadata": "\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\",
"most_recent_job_detail_code": null,
"most_recent_job_detail_text": null,
"most_recent_job_guid": "JOB-12345678-90ab-cdef-1234-567890abcdef",
"name": "MX Bank",
"needs_updated_credentials": false,
"oauth_window_uri": "https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2",
"successfully_aggregated_at": "2016-10-13T17:57:38.000Z",
"use_cases": [
"PFM"
],
"user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54",
"user_id": "u-1234"
}
}{
"member": {
"aggregated_at": "2016-10-13T18:07:57.000Z",
"background_aggregation_is_disabled": false,
"connection_status": "CONNECTED",
"connection_status_message": "Connected to MX Bank",
"error": {
"error_type": "MEMBER",
"error_code": "REQUEST_FAILED",
"error_message": "There was an error attempting to process your request. The Member was created but we were unable to fulfill the data request.",
"user_message": "We're having trouble connecting right now. Please try again later."
},
"guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
"id": "unique_id",
"institution_code": "mxbank",
"institution_guid": "INST-12345678-90ab-cdef-1234-567890abcdef",
"is_being_aggregated": false,
"is_managed_by_user": false,
"is_manual": false,
"is_oauth": false,
"metadata": "\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\",
"most_recent_job_detail_code": null,
"most_recent_job_detail_text": null,
"most_recent_job_guid": "JOB-12345678-90ab-cdef-1234-567890abcdef",
"name": "MX Bank",
"needs_updated_credentials": false,
"oauth_window_uri": "https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2",
"successfully_aggregated_at": "2016-10-13T17:57:38.000Z",
"use_cases": [
"PFM"
],
"user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54",
"user_id": "u-1234"
}
}{
"member": {
"aggregated_at": "2016-10-13T18:07:57.000Z",
"background_aggregation_is_disabled": false,
"connection_status": "CONNECTED",
"connection_status_message": "Connected to MX Bank",
"error": {},
"guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
"id": "unique_id",
"institution_code": "mxbank",
"institution_guid": "INST-12345678-90ab-cdef-1234-567890abcdef",
"is_being_aggregated": false,
"is_managed_by_user": false,
"is_manual": false,
"is_oauth": false,
"metadata": "\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\",
"most_recent_job_detail_code": null,
"most_recent_job_detail_text": null,
"most_recent_job_guid": "JOB-12345678-90ab-cdef-1234-567890abcdef",
"name": "MX Bank",
"needs_updated_credentials": false,
"oauth_window_uri": "https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2",
"successfully_aggregated_at": "2016-10-13T17:57:38.000Z",
"use_cases": [
"PFM"
],
"user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54",
"user_id": "u-1234"
}
}institution_code, credentials (if creating a non-OAuth member), and data_request.products. When creating a non-OAuth member, include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the /institutions/{institution_code}/credentials endpoint. Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data. A status of 200 indicates the member was created successfully, and no aggregation was requested. A status of 201 indicates the member was created, but a product within data_request failed to aggregate. A status of 202 indicates the member was successfully created, and standard aggregation (no data_request) was requested (does not indicate success or failure).Authorizations
The MX Platform API requires basic access authentication using your client_id and api_key. These credentials must be Base64 encoded and included in the Authorization header of each API request to ensure secure access.
Here's an example using curl to access v20250224. Replace https://int-api.mx.com/endpoint with the actual API endpoint you wish to access and your Base64 encoded client_id and api_key.
curl -L -X POST `https://int-api.mx.com/endpoint' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Accept-Version: v20250224'
-H 'Authorization: Basic BASE_64_ENCODING_OF{client_id:api_key}'Headers
MX Platform API version.
"v20250224"
The base64 encoded string defined in this header will be returned in the Member and Member Data Updated webhooks. This allows you to trace user interactions and workflows initiated externally and internally in the MX Platform. Max 1024 characters.
Path Parameters
Use either the user id you defined or the MX-defined user guid. See MX-Defined GUIDs vs IDs Defined by You.
Body
Member object to be created
This determines the redirect destination at the end of OAuth when used with is_mobile_webview: true or oauth_referral_source: 'APP'.
"https://{yoursite.com}"
Contains a products array that specifies the products you want to aggregate.
Hide child attributes
Hide child attributes
Contains the products you want to aggregate upon a successful connection. For accepted products, see Defining Products.
account_verification, identity_verification, transactions, transaction_history, statements, investments, rewards This indicates whether OAuth app2app behavior is enabled for institutions that support it. Defaults to true. When set to false, any oauth_window_uri generated will not direct the end user to the institution's mobile application. This setting is not persistent. This setting currently only affects Chase institutions.
false
Hide child attributes
Hide child attributes
The code identifying a financial institution.
"mxbank"
Indicates whether background aggregation is disabled for the member.
false
The unique partner-defined identifier for the member.
"unique_id"
Indicates whether the member uses OAuth to authenticate. Defaults to false.
false
Additional information you can store about the member.
"\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\"
The use case associated with the member. Valid values are PFM and/or MONEY_MOVEMENT. Only set this if you've met with MX and have opted in to using this field.
MONEY_MOVEMENT, PFM ["PFM"]"APP"
A client-defined scheme used in OAuth redirects in WebViews. Defaults to mx.
Response
OK
Hide child attributes
Hide child attributes
The date and time the most recent aggregation-type job was started, given in ISO 8601 format with a time component.
A job will automatically be started when a member is created or its credentials are updated, unless the skip_aggregation parameter is used.
Jobs can also be started via manual aggregations, background aggregations, API endpoints, or when opening an MX widget.
A job can be a normal aggregation, or a premium job such as identification, verification, fetching statements, or fetching an extended transaction history.
If a member is deleted and then re-created with the skip_aggregation parameter set to true or if it is re-created within the throttle window (typically three hours), the previous value will be returned.
"2016-10-13T18:07:57.000Z"
Indicates whether background aggregation is disabled for the member.
false
The status of a user's connection to an institution. See Member Connection Status.
null, CREATED, PREVENTED, DENIED, CHALLENGED, REJECTED, LOCKED, CONNECTED, IMPEDED, RECONNECTED, DEGRADED, DISCONNECTED, DISCONTINUED, CLOSED, DELAYED, FAILED, UPDATED, DISABLED, IMPORTED, RESUMED, EXPIRED, IMPAIRED, PENDING "CONNECTED"
A human-readable message describing the connection status. See Member Connection Status.
"Connected to MX Bank"
The unique identifier for the member. Defined by MX.
"MBR-7c6f361b-e582-15b6-60c0-358f12466b4b"
The unique partner-defined identifier for the member.
"unique_id"
The code identifying a financial institution.
"mxbank"
The unique identifier for the institution. Defined by MX.
"INST-12345678-90ab-cdef-1234-567890abcdef"
Indicates whether the member was being aggregated at the time of the request.
false
Indicates whether the member is managed by the user or the MX partner. Members created with the managed member feature will have this field set to false.
false
Indicates whether the transaction was manually created or belongs to a manual account.
false
Indicates whether the member uses OAuth to authenticate. Defaults to false.
false
Additional information you stored about the member.
"\\\"credentials_last_refreshed_at\\\": \\\"2015-10-15\\"
(Deprecated) This field is no longer used and will be removed at a future date.
null
(Deprecated) This field is no longer used and will be removed at a future date.
null
The unique identifier for the most recent job. Defined by MX.
"JOB-12345678-90ab-cdef-1234-567890abcdef"
The name of the member.
"MX Bank"
Internal field used by MX in some circumstances. When set to true, MX will not attempt to aggregate the member. It will be set to false automatically when the member's credentials are updated.
false
When connecting a member using OAuth, this field will contain the URL to send the user to in order to authenticate, otherwise it will be blank.
"https://mxbank.mx.com/oauth/authorize?client_id=b8OikQ4Ep3NuSUrQ13DdvFuwpNx-qqoAsJDVAQCyLkQ&redirect_uri=https%3A%2F%2Fint-app.moneydesktop.com%2Foauth%2Fredirect_from&response_type=code&scope=openid&state=d745bd4ee6f0f9c184757f574bcc2df2"
The date and time when the member was last successfully aggregated, represented in ISO 8601 format with a timestamp.
"2016-10-13T17:57:38.000Z"
The use case associated with the member. Valid values are PFM and/or MONEY_MOVEMENT. Only set this if you've met with MX and have opted in to using this field.
MONEY_MOVEMENT, PFM ["PFM"]The unique identifier for the user. Defined by MX.
"USR-fa7537f3-48aa-a683-a02a-b18940482f54"
The unique partner-defined identifier for the user.
"u-1234"

