-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
We’re encountering a recurring 400 Bad Request
error when attempting to update contact properties using the Mailjet API. The error consistently returns "Invalid key name"
despite the fact that the property exists in our system. This issue appeared to resolve itself over the weekend—allowing us to successfully sync over 21,000 candidates—but as of this morning, the 400 error has resumed.
createdate is a static string property
Error Message
Failed to update properties: Unsuccessful: Status Code: "400" Message: "Invalid key name: "createdate""
Observed Behavior
The request fails with a 400
status and the message "Invalid key name: "createdate"
even though:
- The property
"createdate"
exists in our account metadata. - It works for most candidates, then randomly starts throwing errors.
Environment
- Mailjet API version: v3
- Language: TypeScript / Node.js
- Endpoint: https://api.mailjet.com/v3/REST/contactdata/{Contact_ID}
Code where error is occuring
const dataArray = Object.entries(properties)
.filter(([, v]) => v != null && v !== "")
.map(([Name, Value]) => ({ Name, Value }));
try {
await this.mailjet
.put("contactdata", { version: "v3" })
.id(contactId)
.request({
Data: dataArray,
});
} catch (err) {
throw new Error(`Failed to update properties: ${err.message}`);
}
Metadata
Metadata
Assignees
Labels
No labels