SubaccountService
Respond Subaccount Invite
Accept or decline an invite as grantee, or cancel it as an authorized owner or admin. Acceptance requires an enrolled factor and a recently MFA-elevated session when the subaccount requires member MFA.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/auth/subaccounts/invites/1:respond' \
--header 'Accept: */*' \
--header 'X-API-KEY-ID: YOUR_API_KEY_ID' \
--header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \
--header 'X-API-SIGNATURE: YOUR_API_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"action": "ACCEPT"
}'Responses
{
"invite": {
"createdAt": "2025-01-01T00:00:00Z",
"granteeAccountId": "3J9Vz48X8Cs",
"granteeRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"granteeUsername": "trader_alpha",
"id": "4cU63p2qMQ",
"inviterAccountId": "3C1QrQLB2mg",
"inviterRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"inviterUsername": "trader_alpha",
"requireMemberMfa": false,
"respondedAt": "2025-01-01T00:00:00Z",
"role": "VIEWER",
"status": "PENDING",
"subaccountId": "35VhA2oEvkZ",
"subaccountLabel": "Market Making"
}
}Invite identifier (opaque ID).
Action to apply to the invitation.
Invite identifier (opaque ID).
4cU63p2qMQTarget sub-account (opaque ID).
35VhA2oEvkZGrantee root account ID the invite is for (opaque ID).
3J9Vz48X8CsInviter root account ID (opaque ID).
3C1QrQLB2mgRequested role for the grantee.
VIEWERCurrent invitation status.
PENDINGTime when the invitation was created.
2025-01-01T00:00:00ZTime when the invitation was accepted, declined, or cancelled. Empty while pending.
2025-01-01T00:00:00ZOptional usernames for better UX in invite lists.
trader_alphaUsername of the account that sent the invitation, when available.
trader_alphaOptional label for the target sub-account, for display in invite lists.
Market MakingInviter (root account) primary Smart Account address, when available. Useful for displaying a stable identity when no username is set.
0x2222222222222222222222222222222222222222Grantee (root account) primary Smart Account address, when available. Useful for displaying a stable identity when no username is set.
0x2222222222222222222222222222222222222222Current delegated-member MFA requirement on the target sub-account. If true, accepting the invite requires MFA enrollment and fresh step-up.
false| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |