API Design · Junior · Question 62 of 75

How should boolean flags be named in API payloads?

Explanation

Consider enums instead of booleans when more states may appear later (status: "active" | "suspended").

Further reading

Problem with a question

API Design · Junior · question 62

Test yourself

Take the API Design · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz