All jobs / Backend developer / API Development

Backend developer interview question · 0–1 years

The interviewer asks: “What status do you return when POST creates a resource?” Strongest answer?

The strongest answer

201 Created, with a Location header (and often the body). 200 means “here is a representation,” not “I created it.”

Why it works

Exactly. 201 + Location is the uniform way for a client to follow the new resource. 200 is a successful fetch or an in-place update.

What a good answer covers

Answers that fall short

Who gets asked this

More API Development questions