Share account connection
POST
/accounts/{accountID}/connections
curl -X POST "https://api.moov.io/accounts/{accountID}/connections" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.04.00" \
-d '{
"principalAccountID": "c520f1b9-0ba7-42f5-b977-248cdbe41c69"
}'import { Moov } from "@moovio/sdk";
const moov = new Moov({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.accounts.connect({
accountID: "456cb5b6-20dc-4585-97b4-745d013adb1f",
shareScopes: {
principalAccountID: "c520f1b9-0ba7-42f5-b977-248cdbe41c69",
allowScopes: [
"transfers.write",
"payment-methods.read",
],
},
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;
$sdk = MoovPhp\Moov::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$shareScopes = new Components\ShareScopes(
principalAccountID: 'c520f1b9-0ba7-42f5-b977-248cdbe41c69',
allowScopes: [
Components\ApplicationScope::TransfersWrite,
Components\ApplicationScope::PaymentMethodsRead,
],
);
$response = $sdk->accounts->connect(
accountID: '456cb5b6-20dc-4585-97b4-745d013adb1f',
shareScopes: $shareScopes
);
if ($response->statusCode === 200) {
// handle response
}package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.ConnectAccountRequestValidationError;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.ConnectAccountResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws GenericError, ConnectAccountRequestValidationError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
ConnectAccountResponse res = sdk.accounts().connect()
.accountID("456cb5b6-20dc-4585-97b4-745d013adb1f")
.shareScopes(ShareScopes.builder()
.principalAccountID("c520f1b9-0ba7-42f5-b977-248cdbe41c69")
.allowScopes(List.of(
ApplicationScope.TRANSFERS_WRITE,
ApplicationScope.PAYMENT_METHODS_READ))
.build())
.call();
// handle response
}
}from moovio_sdk import Moov
from moovio_sdk.models import components
with Moov(
security=components.Security(
username="",
password="",
),
) as moov:
res = moov.accounts.connect(account_id="456cb5b6-20dc-4585-97b4-745d013adb1f", principal_account_id="c520f1b9-0ba7-42f5-b977-248cdbe41c69", allow_scopes=[
components.ApplicationScope.TRANSFERS_WRITE,
components.ApplicationScope.PAYMENT_METHODS_READ,
])
# Handle response
print(res)require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new(
security: Models::Components::Security.new(
username: '',
password: ''
)
)
res = s.accounts.connect(account_id: '456cb5b6-20dc-4585-97b4-745d013adb1f', share_scopes: Models::Components::ShareScopes.new(
principal_account_id: 'c520f1b9-0ba7-42f5-b977-248cdbe41c69',
allow_scopes: [
Models::Components::ApplicationScope::TRANSFERS_WRITE,
Models::Components::ApplicationScope::PAYMENT_METHODS_READ,
]
))
if res.status_code == 200
# handle response
endusing Moov.Sdk;
using Moov.Sdk.Models.Components;
using System.Collections.Generic;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Accounts.ConnectAsync(
accountID: "456cb5b6-20dc-4585-97b4-745d013adb1f",
body: new ShareScopes() {
PrincipalAccountID = "c520f1b9-0ba7-42f5-b977-248cdbe41c69",
AllowScopes = new List<ApplicationScope>() {
ApplicationScope.TransfersWrite,
ApplicationScope.PaymentMethodsRead,
},
}
);
// handle responseThe resource was successfully created.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
{
"principalAccountID": "string",
"allowScopes": {
"0": "first element failed validation..."
}
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Headers
X-Moov-Version
string
Set this header to v2026.04.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, which may not match the behavior documented here.
Possible values:
v2026.04.00
Path parameters
accountID
string
required
Body
application/json
principalAccountID
string
required
The account ID that will receive access to the scopes.
allowScopes
array<string>
The list of scopes to share with the principal account. If none are provided, all intersecting scopes are added.
Possible values:
accounts.read,
accounts.write,
analytics.read,
apple-pay-merchant.read,
apple-pay-merchant.write,
apple-pay.read,
apple-pay.write,
bank-accounts.read,
bank-accounts.write,
capabilities.read,
capabilities.write,
cards.read,
cards.write,
documents.read,
documents.write,
fed.read,
files.read,
files.write,
issued-cards.read,
issued-cards.write,
issued-cards.read-secure,
payment-methods.read,
ping.read,
profile-enrichment.read,
profile.read,
profile.write,
profile.disconnect,
representatives.read,
representatives.write,
transfers.read,
transfers.write,
wallets.read