Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a contact fails #282

Open
bamg-shaun opened this issue Aug 7, 2024 · 0 comments
Open

Deleting a contact fails #282

bamg-shaun opened this issue Aug 7, 2024 · 0 comments

Comments

@bamg-shaun
Copy link

bamg-shaun commented Aug 7, 2024

The documentation for the delete only shows cURL example, so on testing the DELETE contacts endpoint I discovered the SDK is wrong and needs updating.

I'm using node-mailjet v6.0.5

Example code I've used during testing, which has the same format as other calls on the above link.

      const _response = await client
        .delete('contacts', { version: 'v4' })
        .id(contactId)
        .request();

The above results in a call to DELETE/v4/contact/3860384733. which returns 404.

The reason is that the call should be directed at DELETE/v4/contacts/3860384733, notice the additional s in this call.

Executing a curl using the .../contacts/... url works fine, and with .../contact/... does not.

Basically the SDK needs updating to use contacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant