Update Consented Account
curl --request PUT \
--url http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}', 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 => "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "_sadfa3CKHJ23LKJHKJHLlNaODPmH1LqSb4",
"application_name": "Centz",
"application_icon_url": "https://www.example.com",
"created_at": "2024-06-14T19:48:18.354Z",
"last_accessed": "2024-05-14T19:48:31.352Z",
"accounts": [
{
"enabled": true,
"nickname": "Lacrosse Fund",
"account_id": "1234123412341234",
"account_number_display": "XXXXXXXX1111"
}
],
"auto_enable_future_accounts": true,
"consented_on": "2024-05-14T19:48:18.352Z",
"revoked_at": null
}Consent Management
Update Consented Account
Updates a consent by enabling or disabling an account. Use this endpoint when an end user wants to change whether or not an account is shared with an app.
PUT
/
api
/
{version}
/
consent_management
/
{ConsentPublicId}
/
accounts
/
{AccountId}
Update Consented Account
curl --request PUT \
--url http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}', 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 => "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "_sadfa3CKHJ23LKJHKJHLlNaODPmH1LqSb4",
"application_name": "Centz",
"application_icon_url": "https://www.example.com",
"created_at": "2024-06-14T19:48:18.354Z",
"last_accessed": "2024-05-14T19:48:31.352Z",
"accounts": [
{
"enabled": true,
"nickname": "Lacrosse Fund",
"account_id": "1234123412341234",
"account_number_display": "XXXXXXXX1111"
}
],
"auto_enable_future_accounts": true,
"consented_on": "2024-05-14T19:48:18.352Z",
"revoked_at": null
}Authorizations
Path Parameters
Response
200 - application/json
Successful response
Consent object

