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

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

const invitation = await client.invitations.create({
  email: 'ada@example.com',
  role_id: 'role_xxx'
})
{
  "id": "inv_gbHJdmfrXB",
  "email": "new-staff@example.com",
  "status": "pending",
  "created_at": "2026-05-17T22:57:41.880Z",
  "updated_at": "2026-05-17T22:57:41.880Z",
  "expires_at": "2026-05-31T22:57:41.878Z",
  "role_id": "role_UkLWZg9DAJ",
  "role_name": "admin",
  "inviter_email": "myong@rau.name",
  "acceptance_url": "/accept-invitation/inv_gbHJdmfrXB?token=TemhXQKMdCgFXmyPhhDS37sy"
}

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

Body

application/json
email
string
required
Example:

"ada@example.com"

role_id
string
required
Example:

"role_xxx"

Response

201 - application/json

invitation created