Appearance
Partner Platform API Mutations
This file is auto-generated from the GraphQL schema. Do not edit directly.
It lists only the platform API operations that card partners may call, and the types they reach. The
AgioCard_*and partner webhook fields are in the Cards partner API reference and the Cards partner guides.
Available Mutations
| Mutation | Return Type | Description |
|---|---|---|
generateEncryptionKeys | EncryptionKeys! | - |
subscribePartnerWebhook | SubscribePartnerWebhookResult! | Register a new webhook subscription for the calling organization. |
The signingSecret in the result is returned only once — capture it immediately. | ||
unsubscribePartnerWebhook | UnsubscribePartnerWebhookResult! | Remove a webhook subscription. Subsequent events will not be delivered to its URL. |
rotatePartnerWebhookSecret | RotatePartnerWebhookSecretResult! | Generate a new signing secret for an existing subscription. |
| The previous secret continues to be accepted for 24 hours. | ||
resendPartnerWebhookDelivery | ReplayPartnerWebhookDeliveryResult! | Re-send one of your own past deliveries with its original eventId and payload. |
Returns NOT_FOUND for any delivery outside your organization. Rate-limited 10/min per organization. | ||
newDeliveryId is the queue job id. It is sent as the x-agio-delivery-id header, because the delivery row for the new attempt does not exist until the send finishes. | ||
cardTransferForPartner | CardTransferForPartnerResponse! | Partner-only: move collateral from one of your cardholders to another of your cardholders. The withdrawal goes from the |
| source cardholder's collateral contract straight to the recipient's verified deposit address; callers cannot supply a destination. | ||
disableTreasuryAutoConsolidate | TreasuryAutoConsolidateResult! | Switches the setting off. An admin, a user with partner_api:manage_treasury in that organization, or the partner API for its own organization. Clears the setting on the organization's treasury config, also when that config is disabled. Works whatever the flag says and while a consolidation run holds the wallet lock. |
createPartnerCardUserKycSession | PartnerCardUserKycSessionResult! | Start or refresh a verification session for a cardholder. Errors: KYC_ALREADY_APPROVED, KYC_REJECTED. |
importPartnerCardUserKyc | PartnerCardUserKycStatusResult! | Reuse a Sumsub verification for a cardholder from a share token, without a card application. Agio checks it against its own verification level, so the status can need more steps. Agio must enable it for your organization. Errors: KYC_WORKSPACE_NOT_AUTHORIZED, KYC_PROVIDER_NOT_SUPPORTED, KYC_ALREADY_LINKED, KYC_TOKEN_EXPIRED, KYC_NOT_REUSABLE, KYC_SHARE_UNAVAILABLE. |
refreshCardApplicationCompletionLink | CardApplicationCompletionLinkResult! | Fetch a fresh verification link for an application that needs the cardholder to act. |
| Links last 24 hours: call this when the cardholder is about to open one rather than reusing a stored or webhook link. | ||
| Requires the caller to own the application. | ||
freezeCard | CardOperationResponse! | Freeze a Card. Calls the card issuer API and returns immediate response. |
| Card status will be updated via webhook. | ||
| Requires the user to own the card. | ||
unfreezeCard | CardOperationResponse! | Unfreeze a Card. Calls the card issuer API and returns immediate response. |
| Card status will be updated via webhook. | ||
| Requires the user to own the card. | ||
revealCardSecrets | CardSecretsResponse! | Reveal sensitive card details (PAN, CVC, expiry). |
| Requires the user to own the card. | ||
| Returns encryptedSecrets - use decryptWithSessionKey from agio-utils to decrypt JSON. | ||
replaceVirtualCard | CardReplacementResponse! | Replace a virtual Card with a new one. |
| The old card is canceled and a new card is created with new PAN, token, and expiration. | ||
| The new card inherits spending limits from the old card. | ||
| Only virtual cards can be replaced - physical cards will return an error. | ||
| Requires the user to own the card. | ||
setCardPin | CardPinResponse! | Set or update a Card's PIN. |
| PIN must be 4-12 digits and meet security requirements. | ||
| Requires the user to own the card. | ||
getCardPin | CardPinResponse! | Retrieve a Card's PIN. |
| Returns encryptedPin - use decryptWithSessionKey from agio-utils to decrypt. | ||
| Requires the user to own the card. | ||
validateAddress | AddressValidationResponse! | Validate an address using Google Address Validation API. |
| Returns validation result with confidence level (HIGH, MEDIUM, or LOW). | ||
| Useful for validating user addresses before creating cards, shipping groups, or billing operations. | ||
| Cached for 30 days per Google's recommendations. | ||
validateCardShippingAddress | AddressValidationResponse! | Validate a shipping address via the card issuer's address validation endpoint. |
| Determines whether the card issuer can ship a physical card to this address. | ||
| Uses Google Address Validation with geocoding fallback — broader country coverage than validateAddress. | ||
autocompleteAddress | AutocompleteAddressResponse! | Autocomplete address search using Google Places API. |
| Returns address suggestions based on partial input. | ||
| Useful for address entry forms with typeahead functionality. | ||
| Results cached for 24 hours. | ||
resolvePlaceAddress | ResolvePlaceAddressResponse! | Resolve a Google Place ID to a structured address object. |
| Use the placeId returned by autocompleteAddress to fetch precise address fields. | ||
updateCardNickname | CardOperationResponse! | Update a Card's nickname (display name). |
| Validates: max 26 chars, alphanumeric + spaces + periods + hyphens only. | ||
| Updates local database. Requires the user to own the card. | ||
updateCardUserProfile | CardOperationResponse! | Update the card issuer user profile (address and/or phone). |
| Syncs to both the card issuer API and local database. | ||
| Requires the user to own the card application. | ||
updateCardCompanyAddress | CardOperationResponse! | Update the card company billing address. Synced to the card processor and persisted locally. |
| Scoped to the customer organization on the partner key (or admin role for internal use). | ||
updateCardLimit | CardLimitResponse! | Update a Card's spending limit. |
| Updates both the card issuer API and local database. | ||
| Requires the user to own the card application. | ||
lockCard | CardOperationResponse! | Lock a Card (alias for freeze). Card cannot be used for transactions. |
| Use unlockCard to restore card functionality. | ||
| Requires the user to own the card. | ||
unlockCard | CardOperationResponse! | Unlock a Card (alias for unfreeze). Restores card functionality. |
| Requires the user to own the card. | ||
cancelCard | CardOperationResponse! | Cancel a Card permanently (irreversible). |
| Card cannot be reactivated after cancellation. | ||
| Requires the user to own the card. | ||
createCard | CreateCardResponse! | Create a new Card for an approved application. |
| Supports both virtual and physical cards via cardType discriminator. |
- Virtual cards: PIN set immediately, card active after creation
- Physical cards: PIN staged, shipping required, activated when received Requires an approved card application. | |
replaceCard|CardReplacementResponse!| Replace an existing Card (for lost/stolen/damaged cards). Creates a new card with new PAN and credentials. The old card is canceled automatically. - Virtual cards: New card created immediately
- Physical cards: Requires shipping address Requires the user to own the card. | |
createPartnerCustomerOrganization|CreatePartnerCustomerOrganizationResponse!| Partner-only: Create a customer organization managed by the calling partner. Returns an organization_id that can be used with createCardCorporateApplication. | |createCardApplicationForPartnerUser|CardApplicationResponse!| Partner-only: Create a card application for a partner-provisioned card user. Skips Agio-user KYC — the partner is responsible for verifying their end-user's identity. | |createPartnerCardUser|CreatePartnerCardUserResponse!| Partner-only: Provision a cardholder (cardUser) under one of your partner-managed customer organizations. Returns thecardUserIdyou'll pass tocreateCardApplicationForPartnerUser.nationalIdis KMS-encrypted at rest. Idempotent on email (case-insensitive, trimmed): the same email under the same org, or the same email, last name and birth date under another org your key manages, returns the existing cardUserId withreused: trueand that cardholder'scustomerOrganizationId. | |patchPartnerCardUser|PatchPartnerCardUserResponse!| Partner-only: Patch PII fields on a cardholder (cardUser) previously provisioned viacreatePartnerCardUser. Use this to correct empty/incorrect address or contact fields before callingcreateCardApplicationForPartnerUser— the card issuer requires a complete address on the direct-PII path and rejects applications otherwise. Blocked once the card user's application has been submitted (non-null application status) — patching the local row after that would silently diverge from the issuer. | |updatePartnerCardUserContact|UpdatePartnerCardUserContactResponse!| Partner-only: Change the phone number and/or billing address of a cardholder you provisioned, at any application status. UnlikepatchPartnerCardUserit is not blocked after an application is submitted, and the change reaches the card processor first.emailis not accepted (it is the idempotency key ofcreatePartnerCardUser). At least one of the phone pair or the address is required; the address is replaced as a whole. Limited to 1 call per minute per cardholder. | |cardWithdrawForPartner|CardWithdrawForPartnerResponse!| Partner-only: Withdraw USDC collateral from a partner-managed sub-client's collateral contract into the partner's configured Treasury wallet. The recipient is hard-locked to the treasury_wallet_address in the partner's treasury config — callers cannot supply a destination. Routes through the same owner-EOA signing + session-key UserOp path as cardWithdraw, but the recipient is the Treasury wallet, not the sub-client smart wallet. (Admin-curated recipient allowlist is deferred — see plan.md.) | |cardFundSubClientFromTreasury|CardFundSubClientFromTreasuryResponse!| Partner-only: fund a cardholder's collateral contract from your treasury wallet with an ERC-20 transfer. Returns a job id at once. Read the outcome with cardFundSubClientStatus(jobId). | |cardFundSubClientCancel|CardFundSubClientStatusResponse!| Partner-only: cancel a failed funding job. The job becomescancelled, which is final. Any other status returns NOT_CANCELLABLE and changes nothing. | |multiSendFromWallet|MultiSendFromWalletResponse!| Partner-only: send tokens from a smart wallet to multiple destinations atomically. All transfers must resolve to the same chain. Enqueues immediately; poll multiSendJobStatus. |