wfn Web Function First draft

Design web APIs that feel like functions

A minimal, flexible specification for building web APIs that are intuitive, discoverable, fun to use, and feel like calling functions in your favorite programming language.

Why use Web Function? Traditional API design often feels like negotiating with a committee rather than writing code. Web Function changes that by treating endpoints as simple function calls where the path names the action and the body carries the data. It's all about intent, not structure.

For API designers

  • • Focus on functionality, not HTTP (or REST) semantics
  • • Self-documenting endpoints through packages
  • • Flexible error handling with standardized triples
  • • Built-in support for authentication and pagination
  • • No complex routing or resource modeling required

For API consumers

  • • Discoverable APIs with automatic documentation
  • • Consistent error handling across all endpoints
  • • Simple authentication with bearer tokens
  • • Intuitive pagination that works like magic
  • • Predictable request/response patterns

Core features

terminal

Simple endpoint design

Only POST requests. No complex HTTP method semantics. Just call the function with your data and get results back. The path names the action, the body carries the data.

Learn about endpoints →
inventory_2

Self-documenting packages

Every API can describe all its available endpoints, their arguments, return types, and documentation via package definition. No more guessing or reading external docs.

Learn about packages →
account_tree

Pipelining of calls

Easily chain multiple function calls together, passing results from one to the next without manual handling. Execute workflows in a single request for efficiency and clarity.

Learn about pipelining →
error

Standardized error handling

Error triples provide consistent, machine and human readable error responses. No more parsing different error formats across different endpoints.

Learn about error handling →
key

Built-in authentication

Bearer token authentication that works consistently across all protected endpoints. The specification focuses on token passing, how you obtain the token is up to you.

Learn about authentication →
format_list_numbered

Smart pagination

Strategy-agnostic pagination that works with cursors, offsets, or any other method. The server handles the complexity, clients just follow the links.

Learn about pagination →
sensors

Real-time events

Subscribe to real-time, asynchronous streams of data via standardized Server-Sent Events (SSE). Add live updates and notifications to your applications easily—without vendor lock-in.

Learn about events →

Benefits for your team

Faster development

Spend less time on API design decisions and more time building features. The specification handles the common patterns so you can focus on what matters.

Better experience

APIs that feel intuitive and predictable. Self-documenting packages mean less time reading docs and more time coding.

Consistent & reliable

Standardized patterns mean fewer bugs and easier maintenance. Error handling, auth, and pagination work the same everywhere.

Built on industry standards

check_circle

Not reinventing the wheel

Web Function doesn’t introduce new protocols or custom formats. Instead, it assembles proven, widely adopted standards into a single, well-organized system that’s easy to use.

lan
HTTP
The universal web transport for calls, status, and content negotiation.
data_object
JSON
All requests and responses use application/json for data exchange.
search
JSONPath
Used for pipelining: standardized extraction of values from JSON using familiar query syntax.
sensors
SSE
Real-time event streams leverage Server-Sent Events for efficient push updates.

By combining standards you already know, Web Function makes modern, robust web APIs accessible to everyone.

Get started

Already built something with Web Function?

If you've created a client library or API using Web Function, we'd love to hear about it! Share your implementation and help grow the ecosystem.

Send us an email