API ReferenceapicommunityPOST /v1/admin/community/users/{user_id}/suspend

POST /v1/admin/community/users/\{user_id\}/suspend

Service: community · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • user_id (string) required

Request body

{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 1
    },
    "until": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 expiry; defaults to seven days from now when omitted"
    },
    "brand_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "reason"
  ]
}

Responses

200 User suspended

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "restriction": {
      "type": "string",
      "enum": [
        "warn",
        "mute",
        "suspend",
        "ban"
      ]
    },
    "reason": {
      "type": "string"
    },
    "applied_at": {
      "type": "string"
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "applied_by_user_id": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "user_id",
    "brand_id",
    "restriction",
    "reason",
    "applied_at",
    "expires_at",
    "applied_by_user_id"
  ]
}

404 User not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://community.platform.loop.health/v1/admin/community/users/{user_id}/suspend \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'