action stream_io_api_create_device { label: "Create device" description: "Adds a new device to a user, if the same device already exists the call will have no effect" provider: stream_io_api method: POST path: "/devices" encoding: json input: { type: "object" properties: { id: { type: "string" } push_provider: { type: "string" enum: ["firebase", "apn", "huawei", "xiaomi"] } push_provider_name: { type: "string" } user: { type: "object" description: "Represents chat user" required: ["id"] 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" } id: { type: "string" description: "Unique user identifier" } invisible: { type: "boolean" } language: { type: "string" description: "Preferred language of a user" } 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" } } } } user_id: { type: "string" description: "**Server-side only**. User ID which server acts upon" } } } output: { type: "object" required: ["duration"] properties: { duration: { type: "string" description: "Duration of the request in human-readable format" } } } }