POST /v1/admin/users/\{user_id\}/suspend
Service: identity · operationId: (none)
Suspend a user for a specified duration
Required scopes
(no scope declared — review service config)
Path parameters
user_id(string) required —
Request body
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"enum": [
"spam",
"harassment",
"medical_misinfo",
"tos_violation",
"other"
],
"description": "Suspension reason category"
},
"reason_detail": {
"type": "string",
"description": "Free-text detail (required for 'other')"
},
"duration_ms": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Suspension duration in milliseconds"
}
},
"required": [
"reason",
"duration_ms"
]
}Responses
200 User suspended
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"action": {
"type": "string"
},
"reason": {
"type": "string"
},
"reason_detail": {
"type": [
"string",
"null"
]
},
"suspended_until": {
"type": [
"string",
"null"
]
},
"banned_at": {
"type": [
"string",
"null"
]
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"user_id",
"action",
"reason",
"reason_detail",
"suspended_until",
"banned_at",
"created_at"
]
}400 Validation error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}500 Internal error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://identity.platform.loop.health/v1/admin/users/{user_id}/suspend \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/identity— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced