Share account connection

POST
/accounts/{accountID}/connections
Shares access scopes from the account specified to the caller, establishing a connection between the two accounts with the specified permissions.
curl -X POST "https://api.moov.io/accounts/{accountID}/connections" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2027.01.00" \
  -d '{
  "principalAccountID": "c520f1b9-0ba7-42f5-b977-248cdbe41c69"
}'
mc, _ := moov.NewClient()

var accountID string
var merchantAccountID string

mc.ShareConnection(ctx, accountID, moov.ShareConnectionRequest{
  PrincipalAccountID: merchantAccountID,
  AllowScopes:        []string{"profile.read"},
})
The resource was successfully created.

x-request-id

string required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
application/json
{
  "error": "string"
}

x-request-id

string required
A unique identifier used to trace requests.
The request contained missing or expired authentication.

x-request-id

string required
A unique identifier used to trace requests.
The user is not authorized to make the request.

x-request-id

string required
A unique identifier used to trace requests.
The requested resource was not found.

x-request-id

string required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
application/json
{
  "error": "string"
}

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.
application/json
{
  "principalAccountID": "string",
  "allowScopes": {
    "0": "first element failed validation..."
  }
}

x-request-id

string required
A unique identifier used to trace requests.
Request was refused due to rate limiting.

x-request-id

string required
A unique identifier used to trace requests.
The request failed due to an unexpected error.

x-request-id

string required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.

x-request-id

string required
A unique identifier used to trace requests.

Headers

X-Moov-Version

string
Set this header to v2027.01.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, the earliest supported version, which may not match the behavior documented here. An unrecognized well-formed version uses the latest supported version that is not newer than the requested version, when one exists. For example, v2026.08.00 uses v2026.07.00. A malformed value, such as 2022, returns a 404 response.
Possible values: v2027.01.00

Path parameters

accountID

string required

Body

application/json
Describes the scopes being shared from a subject account to a principal account.

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.download, files.read, files.write, issued-cards.read, issued-cards.write, issued-cards.read-private, payment-methods.read, ping.read, profile-enrichment.read, profile.read, profile.write, profile.disconnect, representatives.read, representatives.write, transfers.read, transfers.write, wallets.read