Skip to main content
POST
/
api
/
chats
/
{id}
/
messages
/
copy
cURL
curl --request POST \
  --url https://recoup-api.vercel.app/api/chats/{id}/messages/copy \
  --header 'Content-Type: application/json' \
  --data '
{
  "targetChatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "clearExisting": true
}
'
{
  "status": "success",
  "source_chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "target_chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "copied_count": 123,
  "cleared_existing": true
}

Path Parameters

id
string<uuid>
required

The source chat room UUID.

Body

application/json

Copy target options

targetChatId
string<uuid>
required

Target chat room UUID to receive the copied messages.

clearExisting
boolean
default:true

When true, existing messages in the target chat are deleted before copy.

Response

Messages copied successfully

status
enum<string>
required

Status of the request

Available options:
success
source_chat_id
string<uuid>
required

Source chat room UUID.

target_chat_id
string<uuid>
required

Target chat room UUID.

copied_count
integer
required

Number of messages copied from source to target.

cleared_existing
boolean
required

Whether existing target messages were deleted before copy.