Skip to content

docs(accounts/auth/cards): sync examples with schema#504

Draft
jklein24 wants to merge 5 commits into
mainfrom
docs/sync-accounts-auth-examples
Draft

docs(accounts/auth/cards): sync examples with schema#504
jklein24 wants to merge 5 commits into
mainfrom
docs/sync-accounts-auth-examples

Conversation

@jklein24
Copy link
Copy Markdown
Contributor

Comprehensive sync of accounts / auth / cards documentation examples with the current OpenAPI schema.

Changes

Account IDs and headers:

  • accountId for internal accounts uses InternalAccount: prefix (was EmbeddedWallet:).
  • requestId values and Request-Id headers use Request: prefix.
  • /auth/credentials register response no longer falsely claims a challenge is returned (it returns AuthMethod only — call /challenge separately).
  • Removed email field from EMAIL_OTP credential create body (not in schema).

External / internal account types and fields:

  • Account types: USD_ACCOUNT, EUR_ACCOUNT, BRL_ACCOUNT, MXN_ACCOUNT, INR_ACCOUNT, etc. (no US_ACCOUNT / IBAN / IBAN_ACCOUNT / PIX / CLABE / UPI aliases).
  • ExternalAccountStatus: PENDING | ACTIVE | UNDER_REVIEW | INACTIVE (no REJECTED / FAILED / DISABLED).
  • Field renames: bankAccountType (was accountCategory), swiftCode (was swiftBic), beneficiaryType (was counterPartyType).
  • Spark wallet creation: removed unsupported top-level beneficiary block.
  • Removed fabricated GET /customers/internal-accounts/{id} endpoint example.

Platform config:

  • supportedCurrencies entries require requiredCounterpartyFields.
  • Sandbox webhook test endpoint is /sandbox/webhooks/test (not /webhooks/test).

Cards:

  • CARDHOLDER_KYC_NOT_APPROVED and FUNDING_SOURCE_INELIGIBLE are 400 (not 409).

Sibling PRs

Split from a larger sync effort. Two companion draft PRs cover onboarding (#502) and payments.

🤖 Generated with Claude Code

Account IDs and headers:
- accountId / Internal account uses InternalAccount: prefix (was EmbeddedWallet:)
- requestId values and Request-Id headers use Request: prefix
- /auth/credentials register response no longer falsely claims a challenge
  is returned (it returns AuthMethod only - call /challenge separately)
- Removed email field from EMAIL_OTP credential create body (not in schema)

External / internal account types and fields:
- USD_ACCOUNT, EUR_ACCOUNT, BRL_ACCOUNT, MXN_ACCOUNT, INR_ACCOUNT
  (no US_ACCOUNT / IBAN / IBAN_ACCOUNT / PIX / CLABE / UPI aliases)
- ExternalAccountStatus: PENDING | ACTIVE | UNDER_REVIEW | INACTIVE
  (no REJECTED / FAILED / DISABLED)
- Field renames: bankAccountType (was accountCategory), swiftCode (was swiftBic),
  beneficiaryType (was counterPartyType)
- Spark wallet creation: removed unsupported top-level beneficiary block
- Removed fabricated GET /customers/internal-accounts/{id} endpoint example

Platform config:
- supportedCurrencies entries require requiredCounterpartyFields
- Sandbox webhook test endpoint is /sandbox/webhooks/test (not /webhooks/test)

Cards:
- CARDHOLDER_KYC_NOT_APPROVED and FUNDING_SOURCE_INELIGIBLE are 400 (not 409)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment May 25, 2026 1:11pm

Request Review

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 25, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview May 25, 2026, 8:38 AM

@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 25, 2026

Greptile Summary

This PR syncs 16 documentation files across accounts, auth, and cards with the current OpenAPI schema, correcting field names, enum values, ID prefixes, error codes, and endpoint paths that had drifted from the implementation.

  • Account types & fields: Renames US_ACCOUNT/IBAN/PIX/CLABE/UPIUSD_ACCOUNT/EUR_ACCOUNT/BRL_ACCOUNT/MXN_ACCOUNT/INR_ACCOUNT; accountCategorybankAccountType; swiftBicswiftCode; EmbeddedWallet:InternalAccount: prefix; requestId values and Request-Id headers now carry the Request: prefix.
  • Auth flow corrections: Removes the email field from EMAIL_OTP credential requests and adds a <Note> explaining Grid derives the OTP address from the customer profile; removes false claim that POST /auth/credentials returns a challenge on passkey registration (it returns AuthMethod only).
  • Cards & platform config: Corrects CARDHOLDER_KYC_NOT_APPROVED and FUNDING_SOURCE_INELIGIBLE from 409 to 400; fixes sandbox webhook test endpoint to /sandbox/webhooks/test; adds requiredCounterpartyFields to platform config examples.

Confidence Score: 5/5

Documentation-only change with no runtime code. All examples now accurately reflect the current OpenAPI schema.

Every changed file is an MDX documentation snippet. The corrections — enum renames, field renames, ID prefix updates, error code fixes, and endpoint path corrections — are straightforward and consistent across the 16 files. Previously-flagged issues (stale email prose, mermaid diagram contradiction, IBAN stale fields) have all been resolved in this revision. No logic, migrations, or runtime behaviour are touched.

No files require special attention.

Important Files Changed

Filename Overview
mintlify/snippets/global-accounts/authentication.mdx Updates EmbeddedWallet→InternalAccount prefix, removes email from EMAIL_OTP requests, adds Note explaining OTP delivery mechanism, fixes mermaid diagram to match schema, updates requestId to Request: prefix. Previous review comments fully addressed.
mintlify/snippets/global-accounts/walkthrough.mdx Removes false claim that POST /auth/credentials returns a challenge; updates description to match schema (returns AuthMethod only). Also updates requestId and Request-Id header to Request: prefix.
mintlify/snippets/internal-accounts.mdx Renames US_ACCOUNT→USD_ACCOUNT and IBAN→EUR_ACCOUNT, swiftBic→swiftCode. Replaces fabricated GET /internal-accounts/{id} endpoint with correct list endpoint. Response shape updated to paginated array. Previously-flagged IBAN stale fields fixed.
mintlify/snippets/external-accounts.mdx Bulk rename of account types to schema-correct values (USD_ACCOUNT, MXN_ACCOUNT, BRL_ACCOUNT, EUR_ACCOUNT, INR_ACCOUNT). Renames accountCategory→bankAccountType, swiftBic→swiftCode. Adds taxId to BRL example.
mintlify/platform-overview/core-concepts/account-model.mdx Renames all account type enum values to schema-correct names; renames bankAccountType and swiftCode; replaces REJECTED with UNDER_REVIEW status.
mintlify/snippets/platform-configuration-non-uma.mdx Adds requiredCounterpartyFields: [] to GET and PATCH request/response examples; updates docs explaining the field is structurally required even for non-PII platforms.
mintlify/snippets/cards/cardholder-setup.mdx Updates CARDHOLDER_KYC_NOT_APPROVED and FUNDING_SOURCE_INELIGIBLE error codes from 409 to 400.
mintlify/snippets/cards/funding-sources.mdx Updates FUNDING_SOURCE_INELIGIBLE from 409 to 400 in both prose and error table.
mintlify/snippets/cards/issuing-cards.mdx Updates CARDHOLDER_KYC_NOT_APPROVED and FUNDING_SOURCE_INELIGIBLE error codes from 409 to 400 in the error table.
mintlify/snippets/cards/implementation-overview.mdx Updates CARDHOLDER_KYC_NOT_APPROVED error code from 409 to 400.
mintlify/snippets/platform-config-currency-api-webhooks.mdx Fixes sandbox webhook test endpoint from /webhooks/test to /sandbox/webhooks/test.
mintlify/ramps/accounts/external-accounts.mdx Updates USD_ACCOUNT, bankAccountType; replaces FAILED/DISABLED statuses with UNDER_REVIEW/INACTIVE; removes stale accountType filter example.
mintlify/ramps/conversion-flows/self-custody-wallets.mdx Removes unsupported top-level beneficiary block from Spark wallet creation examples in cURL, JS, and Python snippets.
mintlify/payouts-and-b2b/platform-tools/sandbox-testing.mdx Updates IBAN_ACCOUNT→EUR_ACCOUNT; fixes sandbox webhook test endpoint to /sandbox/webhooks/test.
mintlify/snippets/global-accounts/managing-sessions.mdx Updates requestId and Request-Id header to use Request: prefix.
mintlify/snippets/global-accounts/exporting-wallet.mdx Fixes missing curl line-continuation backslash; updates requestId and Request-Id header to use Request: prefix.

Reviews (5): Last reviewed commit: "fix stale 'address you pass' sentence (G..." | Re-trigger Greptile

The EMAIL_OTP create body intentionally omits an email field — Grid
sends the OTP to the address on the customer profile that owns the
internal account, and returns that address as the AuthMethod's
nickname. Note added next to the example so readers don't go looking
for a missing field.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

internal-accounts.mdx EUR funding-instructions accordion still used
the old aliases: accountType IBAN -> EUR_ACCOUNT and swiftBic ->
swiftCode, matching the renames already applied elsewhere in the PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

The Email OTP sequence diagram still showed an email field in the
Grid request, contradicting the curl example, Note, and schema.
Removed the field and clarified that the OTP is delivered to the
customer profile address.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant