An API defines how software systems communicate. A REST API exposes resources through URLs and uses HTTP methods to act on them.
For example, GET /tasks retrieves tasks, POST /tasks creates a task, and GET /tasks/42 retrieves one task. HTTP status codes tell clients whether a request succeeded.