Move threads to a folder
cooper_move_threadsUse this when several conversations should move to the same folder in one call, for example archiving finished work or trashing a batch. Requires auth. Same permission as updating thread labels. Inputs: inbox_id (required; inbox id, username, or email), thread_ids (required array of 1 to 100 thread ids), folder (required; inbox, archive, spam, or trash). Returns {moved:[ids that exist in this inbox], not_found:[ids that do not]}. Ids stay in request order. A thread already in that folder is listed in moved and does not emit thread.folder_updated. Unknown ids in this inbox are not_found, not an error. Another account's inbox returns HTTP 404 inbox_not_found. A missing, empty, or duplicate thread_ids returns missing_thread_ids, invalid_thread_ids, or duplicate_thread_ids. More than 100 ids returns too_many_ids. A bad folder returns invalid_folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | Destination folder. inbox removes the folder row. A bad value returns invalid_folder. | |
| inbox_id | Yes | Inbox id (inb_…), username, or full email address owned by this key | |
| thread_ids | Yes | Thread ids (thr_…) to move. 1 to 100 unique ids. Unknown ids are returned in not_found. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| moved | No | Thread ids that exist in this inbox, in request order. | |
| not_found | No | Thread ids that do not exist in this inbox. |