Move an email conversation to a folder

Moves the eligible emails of one email conversation to a folder of its mailbox at the provider, as the Inbox and the MCP move_email_thread tool do. Take folderId from folderContext.folders of GET /v1/messaging/threads/{id}, which can move when folderContext.canMove is true; Sent and Drafts are never targets and their emails stay in place. Pass messageId to move a single email of the conversation. Emails moved outside the synced folders leave the inbox (hiddenFromInbox). movedCount, skippedCount and failedCount report each email; when the provider rate-limits a move part way, rateLimited and retryAfter say when to move the rest. A conversation you cannot see answers 404, an unknown folder or message 404, and a conversation that is not email 400. Requires: Inbox messages Edit and a plan that includes messaging.

POST
/v1/messaging/threads/{id}/move

Authorization

apiKeyAuth
x-api-key<token>

API key authentication. Create an API key in your user profile and include it in the x-api-key header.

In: header

Path Parameters

id*string

The email conversation id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://customermates.com/api/v1/messaging/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/move" \  -H "Content-Type: application/json" \  -d '{    "folderId": "archive"  }'
{
  "threadId": "6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
  "folderId": "archive",
  "folderName": "Archive",
  "movedCount": 2,
  "skippedCount": 0,
  "failedCount": 0,
  "hiddenFromInbox": true,
  "rateLimited": false
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
Empty