Can 200 status code be response for POST request

I had assumed that POST should return 201 in case of success. But I have to call API with request body (something like GET + body), which is not supported and I'm going ahead with POST.

Since i fetch result(i. e list) when i hit API. Is it ok to return 200 as response , as 201 will be invalid since i'm not creating any new entry.

#rest #api

2 Likes1.55 GEEK