action stream_io_api_deactivate_user { label: "Deactivate user" description: "Deactivates user with possibility to activate it back" provider: stream_io_api method: POST path: "/users/{user_id}/deactivate" encoding: json input: { type: "object" properties: { created_by_id: { type: "string" description: "ID of the user who deactivated the user" } mark_messages_deleted: { type: "boolean" description: "Makes messages appear to be deleted" } user_id: { type: "string" } } required: ["user_id"] additionalProperties: false } output: { type: "object" required: ["duration"] properties: { duration: { type: "string" description: "Duration of the request in human-readable format" } user: { type: "object" description: "Represents chat user" required: ["banned", "id", "online", "role"] properties: { ban_expires: { type: "string" format: "date-time" description: "Expiration date of the ban" } banned: { type: "boolean" description: "Whether a user is banned or not" } created_at: { type: "string" format: "date-time" description: "Date/time of creation" } deactivated_at: { type: "string" format: "date-time" description: "Date of deactivation" } deleted_at: { type: "string" format: "date-time" description: "Date/time of deletion" } id: { type: "string" description: "Unique user identifier" } invisible: { type: "boolean" } language: { type: "string" description: "Preferred language of a user" } last_active: { type: "string" format: "date-time" description: "Date of last activity" } online: { type: "boolean" description: "Whether a user online or not" } push_notifications: { type: "object" properties: { disabled: { type: "boolean" } disabled_until: { type: "string" format: "date-time" } } } revoke_tokens_issued_before: { type: "string" format: "date-time" description: "Revocation date for tokens" } role: { type: "string" description: "Determines the set of user permissions" } teams: { type: "array" description: "List of teams user is a part of" items: { type: "string" } } updated_at: { type: "string" format: "date-time" description: "Date/time of the last update" } } } } } }