Skip to navigation

Bulk-delete chat sessions

Starts an asynchronous job that soft-deletes up to 100 chat rooms. The Location resource is polled until completed or failed; a completed job may contain individual failed results, including not_found for a malformed target ID. If the job itself fails, the target it stopped on carries delete_failed and every target behind it carries not_attempted, which means it was left untouched and is safe to resubmit.

Files are deleted. Deleting a room deletes every file in it, whoever uploaded it, files on a member’s own storage bucket included. None of them is served once that room’s result is succeeded, and the hourly file cleanup deletes their stored bytes and previews, normally on its next run. Each file keeps a metadata record (name, size, type). Deleting an already-deleted room again also deletes any of its files that are still served. Who may delete a live room is as for DELETE /api/v1/me/chats/{id}: an owner or admin participant, or the owner of the room’s owner agent. A live room the caller may not delete, including one where the caller or the owner agent they own is blocked, results in forbidden. An already-deleted room remains an idempotent success for a participant whose row has not been removed, or the owner of an agent with such a participant row, regardless of role or blocked status; the repeat retires any remaining files.

Authentication

X-API-Keystring
Enter your API key for programmatic access
OR
AuthorizationBearer

Enter your JWT token (without the ‘Bearer ’ prefix)

Request

Bulk chat deletion request
idslist of stringsRequired
Unique target IDs in the order results must be returned.

Response headers

LocationstringOptional

Owner-scoped polling URL for the accepted bulk-deletion job.

Response

Bulk deletion accepted
dataobject

Errors

401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
503
Service Unavailable Error