Skip to content

[grid] add customer phoneNumber API surface#626

Draft
DhruvPareek wants to merge 1 commit into
mainfrom
dp/grid-customer-phone-number-api
Draft

[grid] add customer phoneNumber API surface#626
DhruvPareek wants to merge 1 commit into
mainfrom
dp/grid-customer-phone-number-api

Conversation

@DhruvPareek

@DhruvPareek DhruvPareek commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds optional phoneNumber to customer create, update, and response schemas.
  • Documents phoneNumber as strict E.164 (+ plus country code and subscriber number).
  • Updates PATCH /customers/{customerId} docs to cover SMS OTP signed retry and to reject combined email + phoneNumber contact updates.
  • Bumps Grid API version to 2026-06-26.

Endpoint structure after this change

Create customer

POST /customers
{
  "customerType": "INDIVIDUAL",
  "platformCustomerId": "ind-9f84e0c2",
  "region": "US",
  "currencies": ["USD", "USDC"],
  "email": "jane.smith@example.com",
  "phoneNumber": "+14155551234",
  "fullName": "Jane Smith",
  "birthDate": "1990-01-15",
  "nationality": "US"
}

Response includes the same top-level contact fields:

{
  "id": "Customer:...",
  "customerType": "INDIVIDUAL",
  "email": "jane.smith@example.com",
  "phoneNumber": "+14155551234",
  "umaAddress": "$jane.smith@example.umadomain",
  "createdAt": "2026-06-26T12:00:00Z",
  "updatedAt": "2026-06-26T12:00:00Z"
}

Synchronous phone update

PATCH /customers/{customerId}
{
  "customerType": "INDIVIDUAL",
  "phoneNumber": "+14155559876"
}

If no tied SMS_OTP credentials need Turnkey sync, the endpoint returns 200 with the updated customer and phoneNumber.

Signed SMS OTP phone update

Initial call returns 202:

{
  "payloadToSign": "{\"organizationId\":\"org_...\",\"parameters\":{\"userId\":\"user_...\",\"userPhoneNumber\":\"+14155559876\"},\"timestampMs\":\"1775681700000\",\"type\":\"ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER\"}",
  "requestId": "Request:...",
  "expiresAt": "2026-04-08T15:35:00Z"
}

The retry sends the same request body plus Grid-Wallet-Signature and Request-Id; success returns 200 with the updated customer.

Rejected combined contact update

PATCH /customers/{customerId}
{
  "customerType": "INDIVIDUAL",
  "email": "john.smith@example.com",
  "phoneNumber": "+14155559876"
}

This shape is documented as rejected; clients should send separate PATCH calls.

Validation

  • make build
  • make lint

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jun 26, 2026 10:12pm
grid-wallet-demo Ignored Ignored Preview Jun 26, 2026 10:12pm

Request Review

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

csharp

feat(api): add phone_number field to customer models

go

feat(api): add phoneNumber field to customer requests/responses and webhooks

kotlin

feat(api): add phoneNumber field to customer models and create/update requests

openapi

feat(api): add phoneNumber field to customer create/update requests and responses

php

feat(api): add phoneNumber field to customer models and create/update requests

python

feat(api): add phone_number field to customers

ruby

feat(api): add phone_number field to customer create/update requests and model

typescript

feat(api): add phoneNumber field to customers create/update/response

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗

grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@0c5b950b7b864fd66f4eba99f2d6c3dce36b9bb9
grid-kotlin studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ✅lint ✅test ❗

grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/ca573ac02d20cb34ebf79c35ae29cb094fbc4cb1/grid-0.0.1-py3-none-any.whl
grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/3c249dc29096bd9ca0bd66bead6a52229e1156ec/dist.tar.gz
grid-csharp studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ✅test ❗


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-06-26 22:17:02 UTC

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