I'am writing an API to make users can subscribe to things. An user can subscribe to anything via submitting a POST
something like this:
{
"item_id": "c13",
"requested_status": "subscriber",
"sure": true,
}
Here you can see a sure
parameter. I'am using this to avoid making subscriptions accidentaly. If client sends that info without sure
parameter API rejects that request to make GUI ask "are sure to subscribe this?". If user confirms, same post happens again with sure
parameter. And subscription (or unsubscription) happens.
So, when I am rejecting that request because there is no sure
parameter. Which response code should I use? I thought 400 (bad request) can be used but not sure.
Thanks for you response.