Add mutiple contacts to a segment - 400 Bad Request

Your software
My Mautic version is: 7.0.0
My PHP version is: 8.3.30
My Database type and version is: MySQL 8.4.8

Your problem

Trying to perform a API request for adding a batch of contacts to a given segment (through n8n) always returns an HTTP 400 Bad Request error. I’m not sure how my syntax is incorrect here, I’ve tried to follow the documentation as close as possible.

{
  "errorMessage": "Bad request - please check your parameters [item 0]",
  "errorDescription": "This is a bad request.",
  "errorDetails": {
    "rawErrorMessage": [
      "400 - \"{\\\"errors\\\":[{\\\"code\\\":400,\\\"message\\\":\\\"This is a bad request.\\\",\\\"details\\\":[]}]}\""
    ],
    "httpCode": "400"
  },
  "n8nDetails": {
    "nodeName": "Segmente les contacts dans Mautic",
    "nodeType": "n8n-nodes-base.httpRequest",
    "nodeVersion": 4.4,
    "itemIndex": 0,
    "time": "30/06/2026 15:57:39",
    "n8nVersion": "2.21.1 (Self Hosted)",
    "binaryDataMode": "database",
    "stackTrace": [
      "NodeApiError: Bad request - please check your parameters",
      "    at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_2c2e1f47b69b34bef6f634a13cbf61d9/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1368:10)",
      "    at processTicksAndRejections (node:internal/process/task_queues:104:5)",
      "    at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_2c2e1f47b69b34bef6f634a13cbf61d9/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1711:11)"
    ]
  }
}

I’ve tried to pass the query parameters outside the request body, but I get the same error.