Skip to content

Suspend / Reactivate User

Manage user account status. Suspended users cannot use their API credentials.

Suspend User

Suspend an active user account.

Request

http
POST /v1/admin/users/:id/suspend
Authorization: Bearer {admin_key}

Example

bash
curl -X POST "https://api.insight.iagon.com/v1/admin/users/550e8400-e29b-41d4-a716-446655440000/suspend" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Response (200 OK)

json
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Corporation",
    "status": "suspended",
    "updated_at": "2026-01-26T16:00:00Z"
  },
  "message": "User account suspended successfully"
}

Error Responses

404 Not Found - User not found or already suspended:

json
{
  "success": false,
  "error": "User account not found or already suspended"
}

Reactivate User

Reactivate a suspended user account.

Request

http
POST /v1/admin/users/:id/reactivate
Authorization: Bearer {admin_key}

Example

bash
curl -X POST "https://api.insight.iagon.com/v1/admin/users/550e8400-e29b-41d4-a716-446655440000/reactivate" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Response (200 OK)

json
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Corporation",
    "status": "active",
    "updated_at": "2026-01-26T17:00:00Z"
  },
  "message": "User account reactivated successfully"
}

Error Responses

404 Not Found - User not found or not suspended:

json
{
  "success": false,
  "error": "User account not found or not suspended"
}

Notes

  • Suspended users' API credentials will fail authentication
  • Suspension is immediate - no grace period
  • All actions are recorded in the audit log
  • Use suspension for non-payment, abuse, or account issues