GET & POST works but DELETE wont

System Information
  • Strapi Version: 4.0.6
  • Operating System: Debian
  • Database: sqlite
  • Node Version: v12.22.5
  • NPM Version: 7.5.2
  • Yarn Version: 1.22.15

Hi people!

I have this “invites” content type where I store a name, email and the “owner” of the entity

When i do a GET localhost:1337/api/invites?filters[id][$eq]=1 it works

But a DELETE localhost:1337/api/invites?filters[id][$eq]=1 gives me a 405 Method not allowed

I’ve set the permission for both authenticated and public roles but It just wont work.

I guess i’m doing something wrong? Help me please

EDIT: I’ve figured it out I must use the id in the url not in the filter

Hi @Nishino
you cannot use ‘filters’ with DELETE.
Please, the more experienced, correct me if I’m wrong.

The correct endpoint should be: DELETE: localhost:1337/api/invites/1

You cannot bulk delete, update, or insert.
I mean: You can’t do this natively via strapi, but you can do it via the client side or by creating a custom endpoint.

If not, install the documentation in your project. It will help you a lot in the composition of endpoint calls.

1 Like