DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsCustomersUpdate Customer
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Get CustomerUpdate CustomerCustom FieldsTags & SegmentsCustomer PointsCustomer AddressesCustomer Orders
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Update Customer

Update customer details and preferences.

Updated March 29, 2026

On this page
  • Overview
  • SDK Usage
  • Editable Fields
  • Profile Form Example
  • REST API
  • Next Steps

Overview

Update the authenticated customer's profile fields. Only send the fields you want to change.

SDK Usage

typescript
import dash from "@/lib/dash"

const { customer } = await dash.auth.updateProfile({
  first_name: "Jane",
  last_name: "Smith",
  phone: "555-9876",
  address_line1: "456 Oak Ave",
  city: "Dallas",
  state: "TX",
  zip_code: "75001",
  country: "US",
  accepts_marketing: false,
})

Editable Fields

FieldTypeDescription
first_namestringFirst name
last_namestringLast name
phonestringPhone number
address_line1stringStreet address
address_line2stringApt, suite, etc.
citystringCity
statestringState/province
zip_codestringPostal code
countrystringCountry code (e.g., "US")
accepts_marketingbooleanMarketing email opt-in

Profile Form Example

typescript
"use client"
import { useState, useEffect } from "react"
import dash from "@/lib/dash"

export function ProfileForm() {
  const [form, setForm] = useState({ first_name: "", last_name: "", phone: "" })
  const [saving, setSaving] = useState(false)

  useEffect(() => {
    dash.auth.getProfile().then(({ customer }) => {
      setForm({
        first_name: customer.first_name || "",
        last_name: customer.last_name || "",
        phone: customer.phone || "",
      })
    })
  }, [])

  async function handleSave() {
    setSaving(true)
    await dash.auth.updateProfile(form)
    setSaving(false)
  }

  return (
    <form onSubmit={e => { e.preventDefault(); handleSave() }}>
      <input value={form.first_name}
             onChange={e => setForm(f => ({ ...f, first_name: e.target.value }))}
             placeholder="First name" />
      <input value={form.last_name}
             onChange={e => setForm(f => ({ ...f, last_name: e.target.value }))}
             placeholder="Last name" />
      <input value={form.phone}
             onChange={e => setForm(f => ({ ...f, phone: e.target.value }))}
             placeholder="Phone" />
      <button type="submit" disabled={saving}>
        {saving ? "Saving..." : "Save Changes"}
      </button>
    </form>
  )
}

REST API

shell
POST /storefront/auth/profile
Authorization: Bearer {access_token}
Content-Type: application/json

{ "first_name": "Jane", "last_name": "Smith", "phone": "555-9876" }

Next Steps

  • Custom Fields — Store arbitrary metadata
  • Customer Addresses — Managing addresses
PreviousGet CustomerNextCustom Fields

On this page

  • Overview
  • SDK Usage
  • Editable Fields
  • Profile Form Example
  • REST API
  • Next Steps