REST API - Statelessness

In RESTful APIs, statelessness is one of the core architectural constraints that means:

Server-side behavior:

Client-side responsibility:

Benefits of statelessness:

Example:

Instead of the server remembering "User John is logged in with session ID 123," the client includes an authentication token with every request, and the server validates that token fresh each time without storing session information.

This stateless design is fundamental to REST architecture and enables the scalability and reliability that makes RESTful APIs so widely adopted.