Creates an enrollment link for one of your subaccounts. The link opens a page on Astrada's SDK host where the person who has it enrolls their own cards into that subaccount. - A personal link (kind: cardholder) is for one employee. It allows up to 5 session starts and is used up by the first session that completes something. - A team link (kind: team) is for sharing. Each session start counts as a use, up to maxUses. The response's url carries the link's secret after #. This response is the only one that returns it, and it is sent with Cache-Control: no-store. Astrada stores only a hash of the secret. In sandbox the url starts with https://sdk.sandbox.astrada.co/unified/v2/enroll.html#. Requires subaccounts:write. Refusals carry a code: - 404 SUBACCOUNT_NOT_FOUND: subaccountId is not one of your subaccounts. - 409 ENROLLMENT_LINKS_NOT_ENABLED: enrollment links are not enabled for your account. - 409 CARD_ENROLLMENT_OFF: card enrollment is off for the subaccount (its enrollmentPolicy.cardEnrollment is false). The hosted page offers card enrollment only, so a link would have nothing to enroll. This check runs before the daily limit is counted, so a refused request does not use it up. - 400 LINK_NAME_NOT_ALLOWED: organizationName or platformName is a well-known brand name, such as a card network or a large bank, matched ignoring case, accents and punctuation. Astrada and Plaid are also refused inside a longer name. - 429 RATE_LIMITED: your account has created 2,000 links today (UTC), team links made with POST /subaccounts/{subaccountId}/team-link included. A link made before card enrollment was turned off starts no session while card enrollment stays off: POST /enrollment-link-sessions/preview and POST /enrollment-link-sessions answer 409 CARD_ENROLLMENT_OFF, and no start is counted.
Create enrollment link
OptionalinitOverrides: RequestInit | InitOverrideFunctionCreates an enrollment link for one of your subaccounts. The link opens a page on Astrada's SDK host where the person who has it enrolls their own cards into that subaccount. - A personal link (kind: cardholder) is for one employee. It allows up to 5 session starts and is used up by the first session that completes something. - A team link (kind: team) is for sharing. Each session start counts as a use, up to maxUses. The response's url carries the link's secret after #. This response is the only one that returns it, and it is sent with Cache-Control: no-store. Astrada stores only a hash of the secret. In sandbox the url starts with https://sdk.sandbox.astrada.co/unified/v2/enroll.html#. Requires subaccounts:write. Refusals carry a code: - 404 SUBACCOUNT_NOT_FOUND: subaccountId is not one of your subaccounts. - 409 ENROLLMENT_LINKS_NOT_ENABLED: enrollment links are not enabled for your account. - 409 CARD_ENROLLMENT_OFF: card enrollment is off for the subaccount (its enrollmentPolicy.cardEnrollment is false). The hosted page offers card enrollment only, so a link would have nothing to enroll. This check runs before the daily limit is counted, so a refused request does not use it up. - 400 LINK_NAME_NOT_ALLOWED: organizationName or platformName is a well-known brand name, such as a card network or a large bank, matched ignoring case, accents and punctuation. Astrada and Plaid are also refused inside a longer name. - 429 RATE_LIMITED: your account has created 2,000 links today (UTC), team links made with POST /subaccounts/{subaccountId}/team-link included. A link made before card enrollment was turned off starts no session while card enrollment stays off: POST /enrollment-link-sessions/preview and POST /enrollment-link-sessions answer 409 CARD_ENROLLMENT_OFF, and no start is counted.
Create enrollment link
OptionalinitOverrides: RequestInit | InitOverrideFunctionCreates a team link for the subaccount: the route for the SDK's "Invite your team" ending, which calls it with the SDK token's card-subscriptions:write. An API client may call it with subaccounts:write. No body. _links.team-link on GET /subaccounts/{subaccountId} points here when the route is available to the caller. The link has the team defaults: it expires after 14 days and allows 50 session starts. The response holds only what the SDK screen shows, and is sent with Cache-Control: no-store. Every call makes a new link. A new link does not revoke an older one: each link ends at its own expiry, when its session starts are used up, or when it is revoked. Revoke a link you no longer want shared with POST /enrollment-links/{linkId}/revoke. Refusals carry a code: - 403 LINK_SESSION_FORBIDDEN: the token is an enrollment link session's. It holds card-subscriptions:write too, but cannot make links. - 404 SUBACCOUNT_NOT_FOUND: the subaccount is not one of your account's. - 409 ENROLLMENT_LINKS_NOT_ENABLED: enrollment links are not enabled for your account. - 409 CARD_ENROLLMENT_OFF: card enrollment is off for the subaccount (its enrollmentPolicy.cardEnrollment is false). The hosted page offers card enrollment only, so a link would have nothing to enroll. This check runs before the daily limits are counted, so a refused request does not use them up. - 429 RATE_LIMITED: 20 links were made here for the subaccount today (UTC), or your account has created 2,000 links today. A link made before card enrollment was turned off starts no session while card enrollment stays off: POST /enrollment-link-sessions/preview and POST /enrollment-link-sessions answer 409 CARD_ENROLLMENT_OFF, and no start is counted.
Create team link
OptionalinitOverrides: RequestInit | InitOverrideFunctionCreates a team link for the subaccount: the route for the SDK's "Invite your team" ending, which calls it with the SDK token's card-subscriptions:write. An API client may call it with subaccounts:write. No body. _links.team-link on GET /subaccounts/{subaccountId} points here when the route is available to the caller. The link has the team defaults: it expires after 14 days and allows 50 session starts. The response holds only what the SDK screen shows, and is sent with Cache-Control: no-store. Every call makes a new link. A new link does not revoke an older one: each link ends at its own expiry, when its session starts are used up, or when it is revoked. Revoke a link you no longer want shared with POST /enrollment-links/{linkId}/revoke. Refusals carry a code: - 403 LINK_SESSION_FORBIDDEN: the token is an enrollment link session's. It holds card-subscriptions:write too, but cannot make links. - 404 SUBACCOUNT_NOT_FOUND: the subaccount is not one of your account's. - 409 ENROLLMENT_LINKS_NOT_ENABLED: enrollment links are not enabled for your account. - 409 CARD_ENROLLMENT_OFF: card enrollment is off for the subaccount (its enrollmentPolicy.cardEnrollment is false). The hosted page offers card enrollment only, so a link would have nothing to enroll. This check runs before the daily limits are counted, so a refused request does not use them up. - 429 RATE_LIMITED: 20 links were made here for the subaccount today (UTC), or your account has created 2,000 links today. A link made before card enrollment was turned off starts no session while card enrollment stays off: POST /enrollment-link-sessions/preview and POST /enrollment-link-sessions answer 409 CARD_ENROLLMENT_OFF, and no start is counted.
Create team link
OptionalinitOverrides: RequestInit | InitOverrideFunctionReturns one of your enrollment links with its sessions, oldest first, without its url. With the cardsubscription webhooks, this is how you see what happened on the hosted page. Each session's outcome holds the ids the hosted page reported. Nothing checks them against the card or bank APIs: the cardsubscription webhooks are the source of truth for what was enrolled. Requires subaccounts:write. A link that is not one of yours answers 404 with code ENROLLMENT_LINK_NOT_FOUND. A link and its sessions are kept for 90 days after expiresAt, then answer 404.
Retrieve enrollment link
OptionalinitOverrides: RequestInit | InitOverrideFunctionReturns one of your enrollment links with its sessions, oldest first, without its url. With the cardsubscription webhooks, this is how you see what happened on the hosted page. Each session's outcome holds the ids the hosted page reported. Nothing checks them against the card or bank APIs: the cardsubscription webhooks are the source of truth for what was enrolled. Requires subaccounts:write. A link that is not one of yours answers 404 with code ENROLLMENT_LINK_NOT_FOUND. A link and its sessions are kept for 90 days after expiresAt, then answer 404.
Retrieve enrollment link
OptionalinitOverrides: RequestInit | InitOverrideFunctionProtectedisCheck if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json
MIME (Multipurpose Internet Mail Extensions)
True if the given MIME is JSON, false otherwise.
Lists the enrollment links of one of your subaccounts, newest first, without their url. A page holds at most limit links and can hold fewer, even none, while more remain. Keep following _links.next until a response has no _links.next. Use its href as it is: it keeps your subaccountId, state and limit. A subaccount that has no links, or that is not one of yours, gives an empty list. Requires subaccounts:write, so link details such as references and counts never reach a browser SDK token.
List enrollment links
OptionalinitOverrides: RequestInit | InitOverrideFunctionLists the enrollment links of one of your subaccounts, newest first, without their url. A page holds at most limit links and can hold fewer, even none, while more remain. Keep following _links.next until a response has no _links.next. Use its href as it is: it keeps your subaccountId, state and limit. A subaccount that has no links, or that is not one of yours, gives an empty list. Requires subaccounts:write, so link details such as references and counts never reach a browser SDK token.
List enrollment links
OptionalinitOverrides: RequestInit | InitOverrideFunctionProtectedrequestSends the request. Network errors and timeouts (while waiting for the answer or reading its body), 408, 429 and 5xx are retried for idempotent methods (see ConfigurationParameters.maxRetries). A 401 is retried once with a new token. Any other status outside 200 to 299 throws a ResponseError subclass. The body is read here, whole.
OptionalinitOverrides: RequestInit | InitOverrideFunctionRevokes one of your enrollment links. No body. An active link, an expired one included, becomes revoked: no session starts from it again, and its open sessions fail their next token refresh, so their access ends within one access token lifetime (at most 300 seconds). A link that is already used or revoked is returned as it is. Requires subaccounts:write. A link that is not one of yours answers 404 with code ENROLLMENT_LINK_NOT_FOUND.
Revoke enrollment link
OptionalinitOverrides: RequestInit | InitOverrideFunctionRevokes one of your enrollment links. No body. An active link, an expired one included, becomes revoked: no session starts from it again, and its open sessions fail their next token refresh, so their access ends within one access token lifetime (at most 300 seconds). A link that is already used or revoked is returned as it is. Requires subaccounts:write. A link that is not one of yours answers 404 with code ENROLLMENT_LINK_NOT_FOUND.
Revoke enrollment link
OptionalinitOverrides: RequestInit | InitOverrideFunction
The middleware of this instance; protected so hand-written subclasses can pass it on.