Skip to main content
POST
/
users
/
{user_identifier}
/
members
/
aggregate_all
Aggregate all members
curl --request POST \
  --url https://int-api.mx.com/users/{user_identifier}/members/aggregate_all \
  --header 'Accept-Version: <accept-version>' \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://int-api.mx.com/users/{user_identifier}/members/aggregate_all"

headers = {
    "Accept-Version": "<accept-version>",
    "Authorization": "Basic <encoded-value>"
}

response = requests.post(url, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Accept-Version': '<accept-version>', Authorization: 'Basic <encoded-value>'}
};

fetch('https://int-api.mx.com/users/{user_identifier}/members/aggregate_all', 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/aggregate_all",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Accept-Version: <accept-version>",
    "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_identifier}/members/aggregate_all"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Accept-Version", "<accept-version>")
	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.post("https://int-api.mx.com/users/{user_identifier}/members/aggregate_all")
  .header("Accept-Version", "<accept-version>")
  .header("Authorization", "Basic <encoded-value>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://int-api.mx.com/users/{user_identifier}/members/aggregate_all")

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>'

response = http.request(request)
puts response.read_body
{
  "members": [
    {
      "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"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 25,
    "total_entries": 1,
    "total_pages": 1
  }
}
This endpoint will kick off a new aggregation job for each member which belongs to the user. If you’ve set the use_cases field when creating the member, then the member’s use case must be set to PFM, otherwise a 403 will return. The response will include important information about the members’ aggregations including the is_being_aggregated and connection_status fields. Aggregations can take some time to finish; you can use the the read member or list members endpoints to track the status and completion of each individual aggregation as it progresses.

Authorizations

Authorization
string
header
required

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

Accept-Version
string
default:v20250224
required

MX Platform API version.

Example:

"v20250224"

Path Parameters

user_identifier
string
required

Use either the user id you defined or the MX-defined user guid. See MX-Defined GUIDs vs IDs Defined by You​.

Response

202 - application/json

Accepted

members
object[]
pagination
object