Skip to content

400 Error When Updating Contact Properties #293

@JaymeAlann

Description

@JaymeAlann

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

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions