Appearance
Partner Platform API Types
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.
AddressSuggestion
Autocomplete suggestion from Google Places API
| Field | Type | Description |
|---|---|---|
text | String! | Display text for the suggestion |
placeId | String! | Google Place ID (can be used for further lookups) |
mainText | String! | Main text (primary part of address) |
secondaryText | String! | Secondary text (locality, region, country) |
types | [String!]! | Place types (e.g., "street_address", "locality") |
AddressValidationResponse
Response from address validation API. Uses Google Address Validation API to verify addresses.
| Field | Type | Description |
|---|---|---|
success | Boolean! | Whether the address is valid |
isValid | Boolean | Whether the address passed validation |
confidence | AddressValidationConfidence | Confidence level of the validation (if available) |
formattedAddress | String | Formatted address returned by Google |
location | GeocodeLocation | Geocode location (latitude/longitude) |
error | String | Error message if validation failed |
AgreementsAcceptanceInput (Input)
Verifiable evidence that the end user accepted the current card agreement set. agreementVersion must match the currently published agreement set exactly — a stale version is rejected.
| Field | Type | Description |
|---|---|---|
agreementVersion | String! | Must equal the currently published agreement set version exactly, or the mutation is rejected. |
documentHashes | [DocumentHashInput!]! | SHA-256 hash of each agreement document presented to the end user, keyed by document identifier. |
acceptedAt | timestamptz! | When the partner asserts the end user accepted, per the partner's own records. This is |
| relayed, unverified information from the partner — distinct from the server-stamped | ||
| acceptance timestamp recorded on the evidence row. | ||
endUserIpAddress | String | The end user's IP address at acceptance time, as asserted by the partner. Never the |
| address of the request making this call (that is the partner's own server). | ||
endUserAgent | String | The end user's browser/client user agent at acceptance time, as asserted by the partner. |
AutocompleteAddressInput (Input)
Input for autocomplete address search
| Field | Type | Description |
|---|---|---|
input | String! | Search query (partial address or place name) |
includedRegionCodes | [String!] | Limit results to specific country codes (e.g., ["US", "ID"]) |
AutocompleteAddressResponse
Response from address autocomplete API
| Field | Type | Description |
|---|---|---|
success | Boolean! | Whether the request was successful |
suggestions | [AddressSuggestion!] | List of address suggestions |
error | String | Error message if request failed |
CancelCardInput (Input)
Input for canceling a Card (irreversible)
| Field | Type | Description |
|---|---|---|
cardId | Int! | Card ID (AgioCard_card.id - our internal card ID) |
reason | String | Optional reason for cancellation |
CardAddressInput (Input)
Address input for the card issuer API applications
| Field | Type | Description |
|---|---|---|
line1 | String! | - |
line2 | String | - |
city | String! | - |
region | String! | - |
postalCode | String! | - |
countryCode | String! | - |
country | String | - |
CardApplicationCompletionLinkResult
A freshly issued verification link, valid for 24 hours. Fetch a new one each time the cardholder acts.
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
completionUrl | String | Signed verification URL. Open it exactly as returned. |
expiresAt | String | ISO 8601 time after which the URL no longer works. |
continueUrl | String | Stable link that opens a fresh verification page each time, for 14 days. Safe to store and send to the cardholder. |
error | String | - |
CardApplicationResponse
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
applicantId | String | - |
cardApplicationId | Int | Internal numeric application id (AgioCard_card_application.id). Pass this to createCard. |
cardApplicationExternalId | String | - |
applicationStatus | String | - |
applicationCompletionUrl | String | Signed URL for the hosted verification page, returned when the application needs the cardholder |
| to act. Open it exactly as returned: the page rejects a request with the signature stripped, and | ||
| a URL rebuilt from a card user id carries no signature. Later in the lifecycle the same composed | ||
| link is on AgioCard_card_application.application_completion_link as completionUrl. | ||
continueUrl | String | Stable link that opens a fresh verification page each time, for 14 days. Safe to store and send to the cardholder. |
| Present whenever applicationCompletionUrl is. | ||
shareToken | String | - |
walletAddress | String | EVM wallet address on the application. Echoes back the input walletAddress, |
or the provisioned smart wallet address when createWallet: true was used. | ||
error | String | - |
errorCode | String | Machine-readable error code if the application failed (e.g. CARD_INSUFFICIENT_FUNDS). |
kycStatus | PartnerCardUserKycStatusValue | Set with KYC_IN_PROGRESS or KYC_NOT_APPROVED: the cardholder's Agio verification status. |
kycVerificationUrl | String | Set with KYC_IN_PROGRESS: a fresh hosted verification link. Omitted when the status is REJECTED. |
CardBalance
User balance information from the card issuer API. All monetary values are in USD (converted from cents).
| Field | Type | Description |
|---|---|---|
creditLimit | Float! | Credit limit of the user, in USD |
pendingCharges | Float! | Pending charges (authorized but not settled), in USD |
postedCharges | Float! | Posted charges (settled transactions), in USD |
balanceDue | Float! | Balance due (amount owed), in USD |
spendingPower | Float! | Available spending power (creditLimit - pendingCharges - postedCharges), in USD |
CardBalanceResponse
Response from fetching card balance
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
balance | CardBalance | - |
error | String | - |
CardFundSubClientFromTreasuryInput (Input)
Input for funding a cardholder's collateral from your treasury wallet.
| Field | Type | Description |
|---|---|---|
externalUserId | String! | The issuer cardholder UUID: the application's card_user_id, returned as cardApplicationExternalId. Not the provisioned cardUserId. |
amountCents | Int! | Funding amount in integer cents. |
idempotencyKey | String | Optional key, 8 to 128 letters, digits, dashes or underscores, scoped to your organization. |
| Sending again with the same key returns the first job and creates none. The same key with | ||
| another cardholder or amount fails with IDEMPOTENCY_KEY_REUSED. |
CardFundSubClientFromTreasuryResponse
Response to a funding request.
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
jobId | String | Job id for status polling. |
errorCode | String | Set when the request is refused: INVALID_AMOUNT, SUBCLIENT_NOT_FOUND, TREASURY_NOT_CONFIGURED, |
| INVALID_IDEMPOTENCY_KEY or IDEMPOTENCY_KEY_REUSED. Failures after the job starts appear in | ||
| cardFundSubClientStatus. | ||
error | String | - |
CardFundSubClientStatusResponse
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
jobId | String! | - |
status | String | pending or running: in progress, wait. completed: final, txHash holds the transaction hash. |
| failed: nothing was sent, so it is safe to send again. submitted: the outcome is unknown, do not | ||
| send again, Agio resolves it. cancelled: final, only after you cancel a failed job. | ||
txHash | String | - |
failedReason | String | Readable failure reason. Do not branch on its text. |
failedCode | String | Failure code, for example COLLATERAL_CONTRACT_NOT_READY, FUNDING_EXPIRED or FUNDING_NOT_SENT on a |
| failed job, or FUNDING_SEND_INDETERMINATE on a submitted job. | ||
attempts | Int | - |
errorCode | String | Request error: FORBIDDEN, NOT_FOUND, NOT_CANCELLABLE (cancel on a job that is not failed), |
| or INTERNAL_ERROR. | ||
errorMessage | String | - |
CardLimitInput (Input)
Spending limit configuration
| Field | Type | Description |
|---|---|---|
amount | Int! | Amount in cents |
frequency | CardLimitFrequency! | Limit frequency period |
CardLimitResponse
Response from updating card limit
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
cardId | String | card ID |
limitAmount | Int | - |
limitFrequency | String | - |
error | String | - |
CardOperationResponse
Response from the card issuer API card operations (freeze, unfreeze, cancel)
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
cardId | String | card ID |
status | String | - |
error | String | - |
errorCode | String | Machine-readable error code if the operation failed (e.g. CARD_INSUFFICIENT_FUNDS). |
CardPinResponse
Response from PIN operations (set/get)
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
encryptedPin | String | Encrypted PIN. Decrypt with decryptWithSessionKey from agio-utils. |
error | String | - |
CardReplacedCard
Details of a replaced card from the card issuer API
| Field | Type | Description |
|---|---|---|
id | String! | New card ID from the card issuer |
type | String! | Card type (always "virtual" for replacements) |
status | String! | Card status after replacement |
last4 | String! | Last 4 digits of new card number |
expirationMonth | String! | Expiration month (MM format) |
expirationYear | String! | Expiration year (YYYY format) |
CardReplacementResponse
Response from replacing a virtual card
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
newCard | CardReplacedCard | Details of the new replacement card |
oldCardId | String | ID of the old card that was canceled |
error | String | - |
CardSecretsResponse
Response from revealing card secrets
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
encryptedSecrets | String | Encrypted card secrets JSON. Decrypt with decryptWithSessionKey from agio-utils. |
| Format: { pan: string, cvc: string, expiry: { month: string, year: string } } | ||
error | String | - |
CardShippingInput (Input)
Shipping address input for physical cards
| Field | Type | Description |
|---|---|---|
line1 | String! | - |
line2 | String | - |
city | String! | - |
region | String! | - |
postalCode | String! | - |
countryCode | String! | - |
phoneNumber | String! | Phone number (required by the card issuer API for shipping) |
firstName | String | - |
lastName | String | - |
method | CardShippingMethod | Shipping method (standard or express) |
CardTransferForPartnerInput (Input)
| Field | Type | Description |
|---|---|---|
source | String! | The sending cardholder: an Agio user ID, a cardholder UUID, a card UUID or the full card number. |
| A card UUID or card number refers to the cardholder's shared balance, not to a separate card balance. | ||
recipient | String! | The receiving cardholder, in any of the forms accepted by source. |
amountCents | Int! | - |
chainId | Int | Defaults to the chain in the partner treasury configuration. |
tokenAddress | String | Defaults to the collateral token in the partner treasury configuration. Both cardholders' contracts must accept it. |
idempotencyKey | String! | One key per transfer: a retry with the same key and the same payload returns the existing transfer and never moves funds twice. |
| 16 to 64 characters of letters, digits, dash or underscore. |
CardTransferForPartnerResponse
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
transferId | String | The durable business ID of the transfer. |
status | String | processing (submitted or waiting for on-chain finality), in_transit (funds left the source but the recipient credit is not recorded yet), complete or error |
transactionHash | String | - |
chainId | Int | - |
amountCents | Int | - |
feeMillicents | String | - |
errorCode | String | - |
error | String | - |
retryAfterSec | Int | Seconds until the active card issuer signature expires, on a signature conflict |
CardUserContactAddressInput (Input)
| Field | Type | Description |
|---|---|---|
line1 | String! | - |
line2 | String | - |
city | String! | - |
region | String! | - |
postalCode | String! | - |
countryCode | String! | - |
CardWithdrawForPartnerInput (Input)
Input for a partner-scoped collateral withdrawal routed to the partner Treasury wallet.
| Field | Type | Description |
|---|---|---|
externalUserId | String! | The issuer cardholder UUID: the application's card_user_id, returned as cardApplicationExternalId. Not the provisioned cardUserId. |
amountCents | Int! | Withdrawal amount in integer cents (e.g., 12345 = $123.45). |
chainId | Int | Chain to withdraw from. Defaults to the partner treasury config chain_id when omitted. |
dryRun | Boolean | When true, validates and prices the withdrawal without submitting an on-chain transaction. |
vasp | PartnerVaspInput | Card Partner API Travel Rule opt-in seam (issue 3157): supply the receiving VASP to opt this |
| withdrawal into hosted-counterparty Travel Rule evaluation. Omit — as every partner integration | ||
| does today — and behaviour is byte-identical to before this field existed; absence means "not | ||
| participating", never "failed to comply". PERMANENTLY optional: this field must never become | ||
| required, even after a future enforcement flip. |
CardWithdrawForPartnerResponse
Response from a partner-scoped collateral withdrawal.
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
transactionHash | String | - |
errorCode | String | INVALID_AMOUNT |
| INSUFFICIENT_SPENDING_POWER | CARD_SIGNING_IN_FLIGHT | INTERNAL_ERROR |
error | String | - |
spendingPowerCents | Int | Populated on INSUFFICIENT_SPENDING_POWER: available spending power in integer cents. |
requestedCents | Int | Populated on INSUFFICIENT_SPENDING_POWER: the requested amount echoed back, in cents. |
retryAfterSec | Int | Populated on CARD_SIGNING_IN_FLIGHT: seconds to wait before retrying. |
CreateCardInput (Input)
Input for creating a new Card (virtual or physical) Unified mutation that handles both card types via cardType discriminator.
| Field | Type | Description |
|---|---|---|
cardApplicationId | Int! | Card application ID (AgioCard_card_application.id) - the approved application to create card under |
cardType | CardType! | Card type - determines whether shipping is required |
sessionId | String | Session ID from generateEncryptionKeys mutation (required if encryptedPin provided) |
encryptedPin | String | Encrypted PIN (use encryptPassphraseForTransfer from agio-utils). |
| For virtual cards, PIN is set immediately. For physical cards, PIN is staged and set when card is activated. | ||
limit | CardLimitInput | Optional spending limit |
displayName | String | Display name on card (max 26 chars: alphanumeric, space, period, hyphen) |
| Can only be set at creation - immutable after. | ||
shipping | CardShippingInput | Shipping address - REQUIRED for physical cards, ignored for virtual |
billing | CardAddressInput | Billing address - defaults to shipping address if omitted |
CreateCardResponse
Response from creating a new card
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
id | Int | Our internal card ID (AgioCard_card.id) |
cardId | String | New card ID from the card issuer |
cardType | String | Card type (virtual or physical) |
status | String | Card status after creation |
last4 | String | Last 4 digits of card number |
expirationMonth | String | Expiration month |
expirationYear | String | Expiration year |
error | String | - |
warnings | [String!] | Changes made to the request so the card could be created, e.g. a displayName cut to the 26-character issuer limit |
CreatePartnerCardApplicationInput (Input)
| Field | Type | Description |
|---|---|---|
cardUserId | uuid! | UUID of the card user the partner has already provisioned. |
| The card user's company must belong to a partner-managed organization. | ||
walletAddress | String | Ethereum wallet address for the card (0x... format). |
Either provide walletAddress OR set createWallet: true — exactly one is required. | ||
createWallet | Boolean | When true, Agio provisions an org-scoped smart wallet on Base mainnet and |
uses its deterministic address. Mutually exclusive with walletAddress. | ||
autoIssueCard | Boolean | When true, the card issuer's approval creates a card automatically. Set false to create no card |
at approval, then call createCard at the point your flow needs it. A createCard call on a | ||
| cardholder that already has a card adds a second card. | ||
occupation | String! | SOC occupation description (e.g., "Software Developers", "Chief Executives"). |
annualSalary | String! | Estimated annual salary in USD (string to preserve the card issuer API compatibility). |
accountPurpose | String! | Purpose of the account (e.g., "Savings", "Business"). |
expectedMonthlyVolume | String! | Expected monthly transaction volume in USD. |
isTermsOfServiceAccepted | Boolean! | The partner is responsible for collecting end-user ToS acceptance before |
| submitting this application. MUST be true; the card issuer rejects the application otherwise. | ||
This is a bare assertion with no supporting evidence — prefer agreementsAcceptance, | ||
| which records verifiable acceptance evidence (document hashes, agreement version). | ||
agreementsAcceptance | AgreementsAcceptanceInput | Verifiable evidence of the end user's acceptance of the current card agreement set — |
| the agreement version, the SHA-256 hashes of the documents presented, and when the | ||
partner asserts the end user accepted. Optional: when omitted, isTermsOfServiceAccepted | ||
| alone still satisfies this mutation, but no acceptance evidence is recorded for that | ||
sign-up. When both are supplied, agreementsAcceptance is recorded as the evidence and | ||
isTermsOfServiceAccepted must still be true. | ||
cardNickname | String | User-defined card nickname (optional, max 26 chars: alphanumeric, spaces, periods, hyphens). |
requestedLimitAmount | Int | Desired credit limit amount in dollars (e.g., 25000). |
requestedLimitFrequency | String | Limit frequency (e.g., "30 day", "7 day"). See CardLimitFrequency for canonical values. |
sessionId | String | Session ID from the generateEncryptionKeys mutation (required if encryptedPin provided). |
encryptedPin | String | Encrypted PIN (use encryptPassphraseForTransfer from agio-utils). |
| PIN (4-6 digits) is staged during application and set automatically when the card is activated. | ||
| Must meet security requirements: no repeated digits, no sequential patterns. | ||
partnerKycShareToken | String | Optional opaque share-token from your KYC provider workspace. |
| When present, Agio uses it to derive applicant data instead of requiring an | ||
| out-of-band KYC packet handover. Contact Agio onboarding to register your | ||
| workspace before using this field. Tokens are short-lived (minutes-to-hours) | ||
| and single-use — expired or replayed tokens return KYC_TOKEN_EXPIRED. |
CreatePartnerCardUserInput (Input)
Input for partner-side cardholder provisioning. All identity fields are forwarded to the card processor when an application is created against this cardUserId. nationalId is KMS-encrypted at rest; the resolver wraps before INSERT and only unwraps when forwarding to the card processor.
| Field | Type | Description |
|---|---|---|
customerOrganizationId | uuid! | UUID of the customer organization this cardholder belongs to. Must be a |
partner-managed customer org from createPartnerCustomerOrganization. | ||
firstName | String! | First name on the cardholder's ID. |
lastName | String! | Last name on the cardholder's ID. |
email | String! | Cardholder email. Used as the idempotency key within customerOrganizationId. |
addressCountryCode | String! | ISO-3166 alpha-2 country code (e.g., "US") for the cardholder's address. |
addressLine1 | String! | Cardholder's street address line 1. |
addressLine2 | String | Optional street address line 2. |
addressCity | String! | City. |
addressRegion | String! | State / province / region (e.g., "CA", "NSW"). |
addressPostalCode | String! | Postal / ZIP code. |
phoneCountryCode | String! | Phone country dialing code, digits only (e.g., "1" for US, "44" for UK). |
phoneNumber | String! | National phone number, digits only. |
birthDate | String! | Date of birth in YYYY-MM-DD format. |
nationalId | String! | Tax / national identifier (SSN, passport number, etc). Plaintext at the API |
| boundary; KMS-encrypted at rest. The card processor uses this for compliance | ||
| checks during application processing. |
CreatePartnerCardUserResponse
Response from createPartnerCardUser. The returned cardUserId is the UUID you pass to subsequent createCardApplicationForPartnerUser calls for this cardholder.
| Field | Type | Description |
|---|---|---|
success | Boolean! | True if the cardholder was created (or already existed and was idempotently returned). |
cardUserId | uuid | UUID of the cardholder. Stable across all future operations — store it on |
your side. Pass this as cardUserId in createCardApplicationForPartnerUser. | ||
reused | Boolean | True when an existing cardUser was returned instead of creating a new one (see createPartnerCardUser). |
customerOrganizationId | uuid | Customer organization that holds the returned cardholder. Differs from the input |
customerOrganizationId when reused is true and the cardholder lives under another of your orgs. | ||
errorCode | String | Machine-readable error code if creation failed. |
errorMessage | String | Human-readable error message if creation failed. |
warning | String | Set when creation succeeded but something about the input should be corrected before |
| it reaches the card processor (for example a phoneCountryCode/phoneNumber pair that isn't | ||
| valid together, or a nationalId, length or postal code advisory). It never blocks the call. | ||
| Null when there is nothing to flag. |
CreatePartnerCustomerOrganizationInput (Input)
| Field | Type | Description |
|---|---|---|
name | String! | Legal name of the customer organization as registered with the partner. |
Used as the default organization_name on the new AgioAuth.organization row. |
CreatePartnerCustomerOrganizationResponse
Response from provisioning a partner-managed customer organization. The returned organizationId can be passed to createCardCorporateApplication and other partner mutations that require org-scoped context.
| Field | Type | Description |
|---|---|---|
success | Boolean! | Whether the organization and its partner_managed_organization join row were created. |
organizationId | uuid | UUID of the newly created AgioAuth.organization row. |
error | String | Error message if creation failed (e.g. duplicate name, database error). |
DocumentHashInput (Input)
One document's identifier and the SHA-256 hash of its content, as presented to the end user.
| Field | Type | Description |
|---|---|---|
key | String! | Identifier of the agreement document (e.g. "card-terms-us"). |
sha256 | String! | Lowercase hex-encoded SHA-256 hash of the document content. |
EncryptionKeys
| Field | Type | Description |
|---|---|---|
sessionId | String! | - |
key | String! | - |
iv | String! | - |
GeocodeLocation
Geocode location from Google Address Validation
| Field | Type | Description |
|---|---|---|
latitude | Float! | - |
longitude | Float! | - |
MultiSendFromWalletInput (Input)
| Field | Type | Description |
|---|---|---|
sourceWalletId | Int! | - |
transfers | [MultiSendTransferInput!]! | - |
idempotencyKey | String | - |
MultiSendFromWalletResponse
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
jobId | String | - |
alreadyEnqueued | Boolean | - |
errorCode | String | - |
errorMessage | String | - |
retryAfterSec | Int | - |
MultiSendJobStatusResponse
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
jobId | String! | - |
status | String | - |
txHash | String | - |
failedReason | String | - |
attempts | Int | - |
errorCode | String | - |
errorMessage | String | - |
MultiSendTransferInput (Input)
| Field | Type | Description |
|---|---|---|
tokenChainId | Int! | - |
destination | String! | - |
amount | String! | - |
Mutation
| Field | Type | Description |
|---|---|---|
generateEncryptionKeys | EncryptionKeys! | - |
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. |
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. |
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. | |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. | |subscribePartnerWebhook|SubscribePartnerWebhookResult!| Register a new webhook subscription for the calling organization. ThesigningSecretin 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 originaleventIdand payload. ReturnsNOT_FOUNDfor any delivery outside your organization. Rate-limited 10/min per organization.newDeliveryIdis the queue job id. It is sent as thex-agio-delivery-idheader, because the delivery row for the new attempt does not exist until the send finishes. |
PartnerCardUserKycSessionResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
kind | PartnerKycSessionKind | - |
url | String | Set for HOSTED_LINK. |
token | String | Set for SDK_TOKEN. Never log it. |
errorCode | String | - |
errorMessage | String | - |
PartnerCardUserKycStatusResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
status | PartnerCardUserKycStatusValue | - |
nextStep | String | The first step that still needs the cardholder, or null. |
reason | String | - |
steps | [PartnerCardUserKycStep!] | - |
errorCode | String | - |
errorMessage | String | - |
PartnerCardUserKycStep
| Field | Type | Description |
|---|---|---|
step | String! | The verification step, for example IDENTITY, SELFIE or PROOF_OF_RESIDENCE. |
status | String! | GREEN, RED, RECEIVED (a document is held and has no review result yet) or NOT_SUBMITTED. |
reason | String | - |
PartnerVaspInput (Input)
A Virtual Asset Service Provider (VASP) counterparty for a Travel Rule opt-in transfer, keyed by the Sumsub VASP directory id. Modeled on the Sumsub VASP directory entry shape (id, name).
| Field | Type | Description |
|---|---|---|
id | String! | Sumsub VASP directory id of the receiving VASP. |
name | String | Display name of the VASP, for logging/audit only — id is authoritative. |
PatchPartnerCardUserInput (Input)
Input for patching PII fields on a partner-provisioned cardholder. All fields except cardUserId are optional — only the fields you provide are updated, untouched fields keep their stored value. email is deliberately excluded (it's the idempotency key for createPartnerCardUser) and customerOrganizationId is derived from the existing row, not accepted here.
| Field | Type | Description |
|---|---|---|
cardUserId | String! | UUID of the cardholder to patch (returned by createPartnerCardUser). |
firstName | String | First name on the cardholder's ID. |
lastName | String | Last name on the cardholder's ID. |
addressLine1 | String | Cardholder's street address line 1. |
addressLine2 | String | Optional street address line 2. |
addressCity | String | City. |
addressRegion | String | State / province / region (e.g., "CA", "NSW"). |
addressPostalCode | String | Postal / ZIP code. |
addressCountryCode | String | ISO-3166 alpha-2 country code (e.g., "US") for the cardholder's address. |
phoneCountryCode | String | Phone country dialing code, digits only (e.g., "1" for US, "44" for UK). |
phoneNumber | String | National phone number, digits only. |
birthDate | String | Date of birth in YYYY-MM-DD format. |
nationalId | String | Tax / national identifier (SSN, passport number, etc). Plaintext at the API |
| boundary; KMS-encrypted at rest. |
PatchPartnerCardUserResponse
Response from patchPartnerCardUser.
| Field | Type | Description |
|---|---|---|
success | Boolean! | True if the cardholder row was updated. |
errorCode | String | Machine-readable error code if the patch failed. |
errorMessage | String | Human-readable error message if the patch failed. |
warning | String | Set when the patch succeeded but something about the input should be corrected before |
| it reaches the card processor (for example a phoneCountryCode/phoneNumber pair that isn't | ||
| valid together, or a nationalId, length or postal code advisory). It never blocks the call. | ||
| Null when there is nothing to flag. |
Query
| Field | Type | Description |
|---|---|---|
partnerCardUserKycStatus | PartnerCardUserKycStatusResult! | Read-only verification status for a cardholder. |
cardBalance | CardBalanceResponse! | Get balance for a Card. |
| Returns credit limit, pending charges, posted charges, balance due, and spending power. | ||
| Requires the user to own the card. | ||
multiSendJobStatus | MultiSendJobStatusResponse! | Partner-only: poll the status of a multisend job (scoped to the caller's partner org). |
cardFundSubClientStatus | CardFundSubClientStatusResponse! | Partner-only: read the outcome of a cardFundSubClientFromTreasury job of your organization. |
| Returns the status, the transaction hash when completed, and failedCode and failedReason on failure. |
ReplaceCardInput (Input)
Input for replacing an existing card (lost/stolen/damaged)
| Field | Type | Description |
|---|---|---|
cardId | Int! | Card ID (AgioCard_card.id - our internal card ID) |
reason | CardReplacementReason! | Reason for replacement |
shippingAddress | CardShippingInput | Shipping address for physical card replacement (required for physical cards) |
ReplayPartnerWebhookDeliveryResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
newDeliveryId | String | The id of the newly enqueued delivery — distinct from the original deliveryId. |
errorCode | String | - |
errorMessage | String | - |
ResolvedPlaceAddress
Structured address resolved from a Google Place ID
| Field | Type | Description |
|---|---|---|
line1 | String! | - |
city | String! | - |
region | String! | - |
postalCode | String! | - |
countryCode | String! | - |
country | String | - |
formattedAddress | String | - |
ResolvePlaceAddressResponse
Response from resolving a place ID to a structured address
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
address | ResolvedPlaceAddress | - |
error | String | - |
RotatePartnerWebhookSecretResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
signingSecret | String | Returned ONCE on rotate. Capture immediately — never readable again. |
| The previous secret continues to be accepted for 24 hours after rotation to allow | ||
| zero-downtime handover on the receiving side. | ||
previousSecretValidUntil | String | - |
errorCode | String | - |
errorMessage | String | - |
SetCardPinInput (Input)
Input for setting a card PIN
| Field | Type | Description |
|---|---|---|
cardId | Int! | Card ID (AgioCard_card.id - our internal card ID) |
sessionId | String! | Session ID from generateEncryptionKeys mutation |
encryptedPin | String! | Encrypted PIN (use encryptPassphraseForTransfer from agio-utils). |
| PIN must be 4-12 digits and meet security requirements: |
- No repeated digits (1111, 0000)
- No sequential ascending (1234, 2345)
- No sequential descending (4321, 9876) |
SubscribePartnerWebhookInput (Input)
| Field | Type | Description |
|---|---|---|
organizationId | ID | The partner organization to subscribe for. Required for a logged-in user, who needs partner_api:manage_webhooks |
| in it; ignored for a partner API token, which always acts on its own organization. | ||
url | String! | HTTPS URL that will receive signed event POSTs. Private / loopback / cloud-metadata IPs are rejected. |
events | [PartnerWebhookEvent!]! | Events to subscribe to. At least one required. |
SubscribePartnerWebhookResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
subscriptionId | ID | - |
signingSecret | String | Returned ONCE on create. Capture it immediately — it is never readable again. |
| Use it to verify HMAC-SHA256 signatures on incoming event POSTs (x-agio-signature header). | ||
errorCode | String | - |
errorMessage | String | - |
TreasuryAutoConsolidateResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
autoConsolidate | Boolean | The setting after the call. Null when the call failed. |
errorCode | String | - |
errorMessage | String | - |
UnsubscribePartnerWebhookResult
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
errorCode | String | - |
errorMessage | String | - |
UpdateCardCompanyAddressInput (Input)
Input for updating the card issuer company address
| Field | Type | Description |
|---|---|---|
cardApplicationId | Int! | Card application ID to identify the the card issuer company |
address | CardAddressInput! | Updated company address |
UpdateCardLimitInput (Input)
Input for updating a Card's spending limit
| Field | Type | Description |
|---|---|---|
cardId | Int! | Card ID (AgioCard_card.id - our internal card ID) |
limitAmount | Int | Limit amount in cents (e.g., 50000 = $500.00). Required unless removeLimit is true. |
limitFrequency | CardLimitFrequency | Limit frequency period. Required unless removeLimit is true. |
removeLimit | Boolean | True sets the largest per-transaction limit the card issuer accepts (2147483647 cents), so the card can spend its full available balance. Send no limitAmount or limitFrequency with it. |
UpdateCardUserProfileInput (Input)
Input for updating the card issuer user billing address
| Field | Type | Description |
|---|---|---|
cardApplicationId | Int! | Card application ID to identify the the card issuer user |
address | CardAddressInput! | Updated billing address |
UpdatePartnerCardUserContactInput (Input)
Contact fields to change on a partner-provisioned cardholder. Send phoneCountryCode and phoneNumber together, the full address, or both. A phone pair that does not validate is rejected with VALIDATION_ERROR.
| Field | Type | Description |
|---|---|---|
cardUserId | String! | UUID of the cardholder (returned by createPartnerCardUser). |
phoneCountryCode | String | Phone country dialing code, digits only (e.g., "1" for US, "44" for UK). |
phoneNumber | String | National phone number, digits only. |
address | CardUserContactAddressInput | New billing address; every field except line2 is required. |
UpdatePartnerCardUserContactResponse
Response from updatePartnerCardUserContact.
| Field | Type | Description |
|---|---|---|
success | Boolean! | - |
errorCode | String | VALIDATION_ERROR |
errorMessage | String | - |
warning | String | - |
cardUserId | String! | - |
updatedFields | [String!]! | Contact fields that were changed: phone, address |
ValidateAddressInput (Input)
Input for validating an address
| Field | Type | Description |
|---|---|---|
address | CardAddressInput! | Address to validate before creating cards, shipping groups, or billing operations |