UserUpdate an organization's subscription status entry for a user (mobile app access)

Update an organization's subscription status entry for a user (mobile app access)

Patches the calling organization's subscription status entry for the user: only the fields present change, an omitted field is never reset, and a change equal to the current value is a no-op (event: null). An organization with no entry has mobile app access (mobileAppAccess: true). mobileAppAccess is an app entitlement, not door access, and nothing is enforced from it yet. An organization changes only its own entry (omit orgId, or name your own); a super API key may name any existing organization, and each super-key change is recorded in a permanent admin audit log first (503 with Retry-After when that record cannot be written). A user cannot change entries. Each change is delivered as a UserSubscriptionStatusUpdated webhook to the changed organization only, its own changes included; changedBy.kind says whether that organization or an administrator made it.

curl -X POST "https://api.spkey.co/users/example_string/UpdateSubscriptionStatus" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "mobileAppAccess": true,
  "orgId": "example_string"
}'
{
  "success": true,
  "aggregateId": "example_string",
  "version": 3.14,
  "event": "null"
}
POST
/users/{id}/UpdateSubscriptionStatus
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
Content-Typestring
Required

The media type of the request body

Options: application/json
mobileAppAccessboolean

Whether the user may use the mobile app for this organization; an app entitlement, not door access

orgIdstring

The organization whose entry to change; only a super API key may name another organization than its own

Pattern: ^[A-Za-z0-9._:-]{1,128}$
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

Body

application/json
mobileAppAccessboolean

Whether the user may use the mobile app for this organization; an app entitlement, not door access

orgIdstring

The organization whose entry to change; only a super API key may name another organization than its own

Responses

successboolean
Required
aggregateIdstring
Required
versionnumber
Required
eventobject,null
Required