Skip to main content
PATCH
/
api
/
v3
/
admin
/
admin_users
/
{id}
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const staff = await client.adminUsers.update('admin_xxx', {
  first_name: 'Ada',
  role_ids: ['role_xxx']
})
{
  "id": "admin_UkLWZg9DAJ",
  "email": "leon@kessler.us",
  "first_name": "Renamed",
  "last_name": "Casper",
  "created_at": "2026-05-17T22:57:21.878Z",
  "updated_at": "2026-05-17T22:57:21.895Z",
  "roles": [
    {
      "id": "role_UkLWZg9DAJ",
      "name": "admin"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Path Parameters

id
string
required

Body

application/json
first_name
string
Example:

"Ada"

last_name
string
Example:

"Lovelace"

role_ids
string[]

Response

200 - application/json

staff member updated