Restore a thread from trash
/v1/email/threads/{thread_id}/restoreconst thread = await bird.email.threads.restore("thr_01abc");
console.log(thread.id);thread = client.email.threads.restore("thr_01krdgeqcxet5s7t44vh8rt9mg")
print(thread.id)thread, err := client.Email.Threads.Restore(context.Background(), "thr_123")
if err != nil {
log.Fatal(err)
}
fmt.Println(thread.Id)$thread = $bird->email->threads->restore('thr_01krdgeqcxet5s7t44vh8rt9mg');
echo $thread->getId();bird email threads restore <thread-id>curl -X POST "https://us1.platform.bird.com/v1/email/threads/{thread_id}/restore" \
-H "Authorization: Bearer $TOKEN"{
"id": "thr_01krdgeqcxet5s7t44vh8rt9mg",
"mailbox_id": "mbx_01krdgeqcxet5s7t44vh8rt9mg",
"channel": "email",
"contact_id": "con_01krdgeqcxet5s7t44vh8rt9mg",
"subject": "Re: Your order",
"last_direction": "inbound",
"folder": "inbox",
"labels": [
"urgent"
],
"highlights": {
"subject": [
"Re: your **order** **4821**"
],
"text": [
"confirming your **order** **4821** shipped"
]
}
}
Restores the conversation's unexpired trashed messages and updates its message and unread counts. Messages past their trash deadline or the mailbox retention period stay deleted. Folder, read state and custom labels are preserved. Repeating the operation leaves restored messages unchanged. Previously canceled scheduled sends are not resumed.
Parámetros
thread_idstringThread identifier. Starts with thr_.
Carga de respuesta
idThread ID.
mailbox_idMailbox this conversation belongs to.
channelChannel this conversation lives on. Always email.
contact_idContact linked to this conversation, or null when none is linked.
subjectSubject of the conversation, taken from its first message. Null when that message had no subject.
participantsAddresses that appear on the retained messages in this conversation, including the mailbox's own address.
message_countNumber of retained messages in this conversation, both directions.
unread_countNumber of retained received messages that are still unread. Spam and blocked mail is not counted.
last_message_atWhen the most recent retained message in this conversation was received or sent.
last_directionDirection of the most recent message: inbound for a received message, outbound for a sent one.
Possible values: inbound, outbound
folderPrimary conversation folder. The supported folders are inbox, archive, spam, blocked, sent, and trash. Blocked and sent are assigned automatically. The sent filter also includes sent conversations that received replies and still sit in the inbox; moving them with PATCH removes them from the sent filter.
Possible values: inbox, archive, spam, blocked, sent, trash
readWhether every retained received message is read, including trash, spam and blocked messages. Outbound messages do not affect this state.
labelsCustom labels applied to this conversation. Folder and read state are separate fields.
created_atWhen the thread was created.
updated_atWhen the thread last changed.
highlightsMatched search fragments, keyed by the field that matched. Returned only by thread search. Omitted when listing threads.
scheduled_countScheduled or dispatching sends targeting this conversation. Returned by conversation get and list, including zero when none remain. Omitted by search.
next_scheduled_atEarliest due time among scheduled or dispatching sends. Returned by conversation get and list only when scheduled_count is positive. Omitted by search and when no sends remain.
Recursos relacionados
Continúa con la documentación, guías y ejemplos de este tema.