Skip to main content

Update User Status Endpoint

Update user account status (admin only).

Security validations:

  • Admin-only access (require_admin_only)
  • Cannot suspend yourself
  • Cannot suspend other admins
  • Status must be 'active' or 'suspended'
MethodPath
PUT/api/v1/users/{user_id}/status

Primary host: https://valara.cloud (legacy alias: https://dash.jacoballenmedia.com).

Parameters

NameInRequiredTypeDescription
user_idpathyesstring

Request body

(no request body)

Response

null

Responses

StatusDescription
200Successful Response
422Validation Error (see error codes)

Examples

curl

curl -X PUT "https://valara.cloud/api/v1/users/{user_id}/status" \
-H "Authorization: Bearer $VALARA_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: $(uuidgen)"

Python

import os
import uuid
import httpx
res = httpx.request(
"PUT",
"https://valara.cloud/api/v1/users/{user_id}/status",
headers={
"Authorization": f"Bearer {os.environ['VALARA_API_KEY']}",
"Content-Type": "application/json",
"X-Idempotency-Key": str(uuid.uuid4()),
},
)
res.raise_for_status()
print(res.json())

See also