Queues a job that backfills the tag links (attachedTags) from the legacy tag fields of the listed collections (every registered collection when omitted), batchSize documents at a time (50 to 5000, 1000 by default), optionally as a dryRun. Returns the queued job, or 400 for a collection that is not registered. Super admin only.
POST
/admin/tags/migrate
curl \
--request POST 'http://api.example.com/admin/tags/migrate' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"collections": [
"string"
],
"batchSize": 1000,
"dryRun": false
}'
Request examples
{
"collections": [
"string"
],
"batchSize": 1000,
"dryRun": false
}
Response examples (201)
{
"data": {
"jobId": "65a1b2c3d4e5f6a7b8c9d0f2",
"status": "running",
"collections": [
{
"name": "devicemessages",
"total": 50000,
"processed": 12000,
"skipped": 40,
"errored": 0,
"startedAt": "2026-01-15T10:15:00.000Z",
"completedAt": "2026-05-04T09:42:00Z"
}
],
"lastError": "string"
},
"statusCode": 201,
"timestamp": "2026-01-15T10:15:00.000Z"
}