Skip to main content
PUT
/
api
/
{version}
/
consent_management
/
{ConsentPublicId}
/
accounts
Update Auto Access
curl --request PUT \
  --url http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "automatic_access": true
}
'
import requests

url = "http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts"

payload = { "automatic_access": 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({automatic_access: true})
};

fetch('http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts', 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",
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([
'automatic_access' => 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"

payload := strings.NewReader("{\n \"automatic_access\": 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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automatic_access\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("http://{baseurl}/api/{version}/consent_management/{ConsentPublicId}/accounts")

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 \"automatic_access\": 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

The consent id. This value is returned in the GET Consent List as id.

version
string
default:v4
required

API version. Indicates which FDX version is in use.

Example:

"v4"

Body

application/json
automatic_access
boolean
required
Example:

true

Response

200 - application/json

Successful response

Consent object

id
string
Example:

"_sadfa3CKHJ23LKJHKJHLlNaODPmH1LqSb4"

application_name
string
Example:

"Centz"

application_icon_url
string | null
Example:

"https://www.example.com"

created_at
string
Example:

"2024-06-14T19:48:18.354Z"

last_accessed
string
Example:

"2024-05-14T19:48:31.352Z"

accounts
object[]
auto_enable_future_accounts
boolean
Example:

true

consented_on
string
Example:

"2024-05-14T19:48:18.352Z"

revoked_at
string | null
Example:

null