Skip to Content

Remove thread labels

Removes the given labels from the thread and returns where the thread stands. A label the thread does not carry is ignored.

DELETE
/v1/mailboxes/{id}/threads/{threadId}/labels

Removes the given labels from the thread and returns where the thread stands. A label the thread does not carry is ignored.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
threadId*string
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
labels*array<>
Items1 <= items

Response Body

MailboxThreadState

application/json
  1. response
id*MailboxThreadId
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$
folder*MailboxThreadFolder
Value in"inbox""assigned""pending""sent""archived""trash"
priority*MailboxThreadPriority
Value in"low""normal""high""urgent"
labels*array<>
read*boolean
starred*boolean
snoozedUntil*string|null
doneAt*string|null
closedAt*string|null
closedBy*|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.mailboxes.removeThreadLabels({
  "id": "example",
  "threadId": "example",
  "labels": [
    "example"
  ]
});
Example Response
{
  "id": "string",
  "folder": "inbox",
  "priority": "low",
  "labels": [
    "string"
  ],
  "read": true,
  "starred": true,
  "snoozedUntil": "string",
  "doneAt": "string",
  "closedAt": "string",
  "closedBy": {
    "kind": "user",
    "id": "string",
    "displayName": "string"
  }
}

Related documentation