Skip to content

Commit bd0067a

Browse files
committed
docs: update auth signed retry examples
Show Request:<uuid> request IDs and canonical compact JSON payloadToSign examples for credential add/revoke, wallet export, and session revocation. Also fixes the export curl continuation while updating that snippet.
1 parent e2cb685 commit bd0067a

9 files changed

Lines changed: 32 additions & 32 deletions

File tree

mintlify/openapi.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mintlify/snippets/global-accounts/authentication.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Key rules:
562562
- Always sign the `payloadToSign` **byte-for-byte as Grid returned it**. Do not re-parse, re-serialize, or modify whitespace.
563563
- Sign with the **session private key** held on the client — never ship it back to your backend.
564564
- The retry must reach Grid before `expiresAt` (typically 5 minutes from issue).
565-
- The `requestId` is single-use; reusing one yields `401`.
565+
- The `requestId` is returned as `Request:<uuid>` and is single-use; reusing one yields `401`.
566566

567567
### Add an additional credential
568568

@@ -585,8 +585,8 @@ Requires an active session on an *existing* credential on the same account. The
585585
```json
586586
{
587587
"type": "EMAIL_OTP",
588-
"payloadToSign": "{\"requestId\":\"7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21\",\"type\":\"EMAIL_OTP\",\"accountId\":\"InternalAccount:019542f5-b3e7-1d02-0000-000000000002\",\"expiresAt\":\"2026-04-08T15:35:00Z\"}",
589-
"requestId": "7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21",
588+
"payloadToSign": "{\"organizationId\":\"org_2m9F...\",\"parameters\":{\"userEmail\":\"jane@example.com\",\"userId\":\"user_2m9F...\"},\"timestampMs\":\"1775681700000\",\"type\":\"ACTIVITY_TYPE_UPDATE_USER_EMAIL\"}",
589+
"requestId": "Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21",
590590
"expiresAt": "2026-04-08T15:35:00Z"
591591
}
592592
```
@@ -602,7 +602,7 @@ Requires an active session on an *existing* credential on the same account. The
602602
-u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
603603
-H "Content-Type: application/json" \
604604
-H "Grid-Wallet-Signature: MEUCIQDx7k2N0aK4p8f3vR9J6yT5wL1mB0sXnG2hQ4vJ8zYkCgIgZ4rP9dT7eWfU3oM6KjR1qSpNvBwL0tXyA2iG8fH5dE=" \
605-
-H "Request-Id: 7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21" \
605+
-H "Request-Id: Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21" \
606606
-d '{
607607
"type": "EMAIL_OTP",
608608
"accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002"
@@ -636,8 +636,8 @@ A credential is revoked by signing with a session from **a different credential
636636
```json
637637
{
638638
"type": "PASSKEY",
639-
"payloadToSign": "Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==",
640-
"requestId": "9f7a2c10-5e88-4fb1-bd0e-1c3a8e7b2d45",
639+
"payloadToSign": "{\"organizationId\":\"org_2m9F...\",\"parameters\":{\"authenticatorIds\":[\"authenticator_2m9F...\"],\"userId\":\"user_2m9F...\"},\"timestampMs\":\"1775681700000\",\"type\":\"ACTIVITY_TYPE_DELETE_AUTHENTICATORS\"}",
640+
"requestId": "Request:9f7a2c10-5e88-4fb1-bd0e-1c3a8e7b2d45",
641641
"expiresAt": "2026-04-08T15:35:00Z"
642642
}
643643
```
@@ -650,7 +650,7 @@ A credential is revoked by signing with a session from **a different credential
650650
curl -X DELETE "$GRID_BASE_URL/auth/credentials/AuthMethod:019542f5-b3e7-1d02-0000-000000000001" \
651651
-u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
652652
-H "Grid-Wallet-Signature: MEUCIQDx7k2N0aK4p8f3vR9J6yT5wL1mB0sXnG2hQ4vJ8zYkCgIgZ4rP9dT7eWfU3oM6KjR1qSpNvBwL0tXyA2iG8fH5dE=" \
653-
-H "Request-Id: 9f7a2c10-5e88-4fb1-bd0e-1c3a8e7b2d45"
653+
-H "Request-Id: Request:9f7a2c10-5e88-4fb1-bd0e-1c3a8e7b2d45"
654654
```
655655

656656
**Response:** `204 No Content`. All active sessions issued by the revoked credential are also revoked.

mintlify/snippets/global-accounts/exporting-wallet.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sequenceDiagram
2525
<Step title="First call — receive the challenge">
2626
```bash
2727
curl -X POST "$GRID_BASE_URL/internal-accounts/InternalAccount:019542f5-b3e7-1d02-0000-000000000002/export" \
28-
-u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET"
28+
-u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
2929
-H "Content-Type: application/json" \
3030
-d '{
3131
"clientPublicKey": "04f45f2a22c908b9ce09a7150e514afd24627c401c38a4afc164e1ea783adaaa31d4245acfb88c2ebd42b47628d63ecabf345484f0a9f665b63c54c897d5578be2"
@@ -36,8 +36,8 @@ sequenceDiagram
3636

3737
```json
3838
{
39-
"payloadToSign": "Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==",
40-
"requestId": "c3f8a614-47e2-4a19-9f5d-2b0a91d47e08",
39+
"payloadToSign": "{\"organizationId\":\"org_2m9F...\",\"parameters\":{\"targetPublicKey\":\"04f45f2a22c908b9ce09a7150e514afd24627c401c38a4afc164e1ea783adaaa31d4245acfb88c2ebd42b47628d63ecabf345484f0a9f665b63c54c897d5578be2\",\"walletId\":\"wallet_2m9F...\"},\"timestampMs\":\"1775681700000\",\"type\":\"ACTIVITY_TYPE_EXPORT_WALLET\"}",
40+
"requestId": "Request:c3f8a614-47e2-4a19-9f5d-2b0a91d47e08",
4141
"expiresAt": "2026-04-19T12:10:00Z"
4242
}
4343
```
@@ -51,7 +51,7 @@ sequenceDiagram
5151
-u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
5252
-H "Content-Type: application/json" \
5353
-H "Grid-Wallet-Signature: MEUCIQDx7k2N0aK4p8f3vR9J6yT5wL1mB0sXnG2hQ4vJ8zYkCgIgZ4rP9dT7eWfU3oM6KjR1qSpNvBwL0tXyA2iG8fH5dE=" \
54-
-H "Request-Id: c3f8a614-47e2-4a19-9f5d-2b0a91d47e08" \
54+
-H "Request-Id: Request:c3f8a614-47e2-4a19-9f5d-2b0a91d47e08" \
5555
-d '{
5656
"clientPublicKey": "04f45f2a22c908b9ce09a7150e514afd24627c401c38a4afc164e1ea783adaaa31d4245acfb88c2ebd42b47628d63ecabf345484f0a9f665b63c54c897d5578be2"
5757
}'

mintlify/snippets/global-accounts/managing-sessions.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Session revocation uses the same <a href="authentication#the-signed-retry-patter
5252
```json
5353
{
5454
"type": "PASSKEY",
55-
"payloadToSign": "Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==",
56-
"requestId": "2b1e5a08-9c44-4e91-ae7f-6d0b3f8c1e22",
55+
"payloadToSign": "{\"organizationId\":\"org_2m9F...\",\"parameters\":{\"apiKeyIds\":[\"api_key_2m9F...\"],\"userId\":\"user_2m9F...\"},\"timestampMs\":\"1775681700000\",\"type\":\"ACTIVITY_TYPE_DELETE_API_KEYS\"}",
56+
"requestId": "Request:2b1e5a08-9c44-4e91-ae7f-6d0b3f8c1e22",
5757
"expiresAt": "2026-04-19T12:10:00Z"
5858
}
5959
```
@@ -66,7 +66,7 @@ Session revocation uses the same <a href="authentication#the-signed-retry-patter
6666
curl -X DELETE "$GRID_BASE_URL/auth/sessions/Session:019542f5-b3e7-1d02-0000-000000000003" \
6767
-u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
6868
-H "Grid-Wallet-Signature: MEUCIQDx7k2N0aK4p8f3vR9J6yT5wL1mB0sXnG2hQ4vJ8zYkCgIgZ4rP9dT7eWfU3oM6KjR1qSpNvBwL0tXyA2iG8fH5dE=" \
69-
-H "Request-Id: 2b1e5a08-9c44-4e91-ae7f-6d0b3f8c1e22"
69+
-H "Request-Id: Request:2b1e5a08-9c44-4e91-ae7f-6d0b3f8c1e22"
7070
```
7171

7272
**Response:** `204 No Content`.

openapi.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/components/schemas/common/SignedRequestChallenge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ properties:
2121
then send the full base64url-encoded stamp in
2222
`Grid-Wallet-Signature` on the retry that completes the original
2323
request.
24-
example: Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==
24+
example: '{"organizationId":"org_2m9F...","parameters":{"userId":"user_2m9F..."},"timestampMs":"1775681700000","type":"ACTIVITY_TYPE_EXAMPLE"}'
2525
requestId:
2626
type: string
2727
description: >-

openapi/paths/auth/auth_credentials.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,21 @@ post:
141141
summary: Additional email OTP credential challenge
142142
value:
143143
type: EMAIL_OTP
144-
payloadToSign: '{"requestId":"Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21","type":"EMAIL_OTP","accountId":"InternalAccount:01HF3Z4QWERTY","expiresAt":"2026-04-08T15:35:00Z"}'
144+
payloadToSign: '{"organizationId":"org_2m9F...","parameters":{"userEmail":"jane@example.com","userId":"user_2m9F..."},"timestampMs":"1775681700000","type":"ACTIVITY_TYPE_UPDATE_USER_EMAIL"}'
145145
requestId: Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21
146146
expiresAt: '2026-04-08T15:35:00Z'
147147
oauth:
148148
summary: Additional OAuth credential challenge
149149
value:
150150
type: OAUTH
151-
payloadToSign: Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==
151+
payloadToSign: '{"organizationId":"org_2m9F...","parameters":{"oauthProviders":[{"oidcToken":"eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiYzEyMyIsInR5cCI6IkpXVCJ9...","providerName":"Google"}],"userId":"user_2m9F..."},"timestampMs":"1775681700000","type":"ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS"}'
152152
requestId: Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21
153153
expiresAt: '2026-04-08T15:35:00Z'
154154
passkey:
155155
summary: Additional passkey credential challenge
156156
value:
157157
type: PASSKEY
158-
payloadToSign: Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==
158+
payloadToSign: '{"organizationId":"org_2m9F...","parameters":{"authenticators":[{"attestation":{"attestationObject":"o2NmbXRk...","clientDataJson":"eyJjaGFsbGVuZ2UiOiJBcktRa...","credentialId":"AdKXJEch1aV5Wo7bj7qLHskVY4OoNaj9qu8TPdJ7kSAgUeRxWNngXlcNIGt4gexZGKVGcqZpqqWordXb_he1izY"},"authenticatorName":"iPhone Face-ID","challenge":"ArkQi2yAYHPlgnJNFBlneIwchQdWXBOTrdB-AmMUB21Lx","transports":["internal","hybrid"]}],"userId":"user_2m9F..."},"timestampMs":"1775681700000","type":"ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2"}'
159159
requestId: Request:7c4a8d09-ca37-4e3e-9e0d-8c2b3e9a1f21
160160
expiresAt: '2026-04-08T15:35:00Z'
161161
'400':

openapi/paths/customers/customers_{customerId}.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ patch:
172172
embeddedWalletEmailUpdate:
173173
summary: Embedded Wallet customer email update challenge
174174
value:
175-
payloadToSign: '{"requestId":"Request:019542f5-b3e7-1d02-0000-000000000010","customerId":"Customer:019542f5-b3e7-1d02-0000-000000000001","email":"john.smith@example.com","credentialIds":["AuthMethod:019542f5-b3e7-1d02-0000-000000000101","AuthMethod:019542f5-b3e7-1d02-0000-000000000102"],"expiresAt":"2026-04-08T15:35:00Z"}'
175+
payloadToSign: '{"organizationId":"org_2m9F...","parameters":{"userEmail":"john.smith@example.com","userId":"user_2m9F..."},"timestampMs":"1775681700000","type":"ACTIVITY_TYPE_UPDATE_USER_EMAIL"}'
176176
requestId: Request:019542f5-b3e7-1d02-0000-000000000010
177177
expiresAt: '2026-04-08T15:35:00Z'
178178
'400':

openapi/paths/internal_accounts/internal_accounts_{id}.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ patch:
108108
challenge:
109109
summary: Internal account update challenge
110110
value:
111-
payloadToSign: Y2hhbGxlbmdlLXBheWxvYWQtdG8tc2lnbg==
111+
payloadToSign: '{"organizationId":"org_2m9F...","parameters":{"encoding":"PAYLOAD_ENCODING_HEXADECIMAL","hashFunction":"HASH_FUNCTION_NO_OP","payload":"9f3b...","signWith":"sp1q..."},"timestampMs":"1775681700000","type":"ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2"}'
112112
requestId: Request:019542f5-b3e7-1d02-0000-000000000010
113113
expiresAt: '2026-04-08T15:35:00Z'
114114
'400':

0 commit comments

Comments
 (0)