Skip to content
BENIBIX Learn

Stateless API

Development🔌 APIsAPI Design Practices

Also known as Statelessness, Stateless Request, Stateless (REST)

An API that keeps no memory between requests. Each one carries all it needs.

Think of it like

Think of it like a shop where nobody remembers you. Each time, you show your card and say what you want.

Example

Each request from Lucy's app carries her token. Any of her four servers can answer it, so the load is easy to share.

Why it matters

It is easy to add more servers. No request needs one special server.

Definition

A stateless API keeps no memory of past requests. Each request carries everything the server needs, like a token and the data. The server answers it and then forgets it. This is a key rule of REST. Because no server holds your session, any server can answer any request.
Each request brings its own token, and the server keeps no memory.

Common mistake

Thinking stateless means no data is saved. The database still keeps data; only requests are not linked.

Key takeaways

  1. 1
    No memory. Each request stands alone.
  2. 2
    Carry it all. Send the token every time.
  3. 3
    Easy to scale. Any server can answer.