REST API Development

An API that third-party developers can't use without calling your dev team is an API that hasn't finished being built.

RESTful APIs are the standard interface between systems: between your mobile app and backend, between your product and third-party integrations, between your data layer and the services that consume it. A well-designed REST API has consistent patterns, predictable error responses, clear versioning, and documentation that lets a developer integrate without support. A poorly designed one accumulates workarounds in every client that touches it. RaftLabs builds RESTful APIs designed as products -- not as internal plumbing that happens to be externally accessible. Resource modelling, HTTP verb discipline, authentication (OAuth 2.0, JWT, API keys), rate limiting, versioning, error response standards, and OpenAPI 3.0 documentation generated from the code. Fixed cost agreed before development starts.

  • Resource-oriented design with consistent URL patterns, HTTP verbs, and response structures across all endpoints
  • OAuth 2.0 and JWT authentication with scoped permissions and token refresh
  • Rate limiting, pagination, and error responses standardised across every endpoint -- not per-developer convention
  • OpenAPI 3.0 documentation generated from the codebase, not written separately and left to drift
See our work

Recent outcomes

Voice AI · Research

Text-based interviews converted to automated phone calls

6× deeper insights

AI Automation · Ops

Manual invoice OCR across 40+ gas stations

20k+ txns day one

Loyalty · Retail

SuperValu & Centra loyalty platform with receipt validation

1,062 users in 4 weeks

SaaS · Logistics

Multi-carrier shipping hub for Indonesian eCommerce

2,000+ shipments yr 1
4.9 / 5 on ClutchSee all work

RaftLabs builds RESTful APIs designed as products -- resource-oriented URL design, OAuth 2.0 and JWT authentication, rate limiting, versioning, standardized error responses, and OpenAPI 3.0 documentation generated from the code. We build for mobile backends, third-party integration APIs, and platform APIs. A focused REST API with CRUD operations and docs typically costs $20,000 to $50,000. Most projects deliver in 6 to 14 weeks at a fixed cost.

Trusted by

Vodafone
Aldi
Nike
Microsoft
Heineken
Cisco
Calorgas
Energia Rewards
GE
Bank of America
T-Mobile
Valero
Techstars
East Ventures

RESTful APIs are the standard interface between systems -- between mobile and backend, between your product and its integrations, between data services and the applications that consume them. Most APIs are built as implementation details and retrofitted with documentation later. The result is inconsistent patterns, ambiguous error responses, and integration friction that compounds as more clients connect to the API.

A well-built REST API has the same qualities as a well-built product: a clear contract, consistent behaviour, error messages that tell consumers what went wrong, and documentation that matches the implementation. RaftLabs designs the API contract before writing implementation code -- resource naming, endpoint structure, authentication model, error response format, versioning strategy, and pagination pattern are agreed in an OpenAPI 3.0 specification that becomes the source of truth for development and documentation.

Capabilities

What we build

Resource-oriented API design

URL structure and HTTP verb discipline applied consistently across all endpoints: GET for safe, idempotent retrieval (GET /orders/{id}); POST for non-idempotent creation (POST /orders); PUT for full resource replacement (idempotent); PATCH for partial updates using JSON Merge Patch (RFC 7396) or JSON Patch (RFC 6902); DELETE for removal (idempotent). Noun-based URL paths that reflect business resources rather than operations (/users/{id}/addresses not /getUserAddresses). Consistent response envelope structure -- all collections wrapped in a data array with a pagination object; all resources wrapped in a data object; errors in a structured errors array -- so client developers can implement a single response handler rather than per-endpoint parsing logic. Appropriate HTTP status codes throughout: 201 Created with Location header on POST, 204 No Content on successful DELETE, 207 Multi-Status for batch operations with mixed results. OpenAPI 3.0 specification written before development begins using the contract-first approach -- the spec is the source of truth, code-generation tools (Zod, io-ts) derive server validation and TypeScript types from it rather than the spec drifting from the implementation.

Authentication and authorisation

OAuth 2.0 with the appropriate flow for each integration type: authorisation code flow with PKCE for user-delegated access from web and mobile clients (the user grants permission to an application, which receives a scoped token); client credentials flow for machine-to-machine service integration where no user context is involved; device code flow for CLI tools and IoT devices. JWT (RS256 or ES256 asymmetric signing) for stateless token validation that allows any service instance to verify tokens without a central session store -- the public key is published at a JWKS endpoint so consuming services can validate without a service call. Refresh token rotation: each refresh operation issues a new refresh token and invalidates the previous one, so a stolen refresh token is detected when the legitimate client next refreshes (the rotation chain is broken). Scope-based authorisation defines granular permission scopes (orders:read, orders:write, admin:billing) so third-party integrations receive only the minimum access their integration requires. API key authentication for simpler integration patterns with key scoping, rate limiting per key, and key rotation without service interruption. Token revocation via a JWT denylist (Redis-backed for distributed checking) for immediate access termination when a token is compromised before its natural expiry.

Rate limiting and throttling

Per-client rate limits that protect the API from abuse and overload without blocking legitimate high-volume consumers -- implemented at the API gateway layer (Kong, AWS API Gateway) or application middleware (express-rate-limit, Fastify rate limiting) depending on your architecture. Token bucket algorithm provides burst tolerance: a client with a 1,000 req/hour limit can burst to 100 req/minute when their token bucket is full, rather than being capped at a flat 17 req/min that breaks legitimate burst patterns (e.g., a bulk export operation). Rate limit headers in every response following the IETF RateLimit Headers draft (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset) so clients know their quota status on every request and can implement backoff before hitting the 429 limit rather than after. Differentiated limits by client tier: free tier clients get 1,000 req/day, professional tier get 50,000 req/day, enterprise clients get custom limits -- enforced at the API key scope level without code changes when tiers change. Distributed rate limiting using Redis counters ensures limits are enforced consistently across multiple API server instances, preventing a client from exceeding their limit by distributing requests across instances. 429 Too Many Requests responses include a Retry-After header with the exact seconds until the rate limit window resets.

Versioning and backwards compatibility

API versioning strategy designed upfront rather than retrofitted when the first breaking change is needed. URI versioning (/v1/, /v2/) provides maximum visibility -- the version is in the URL, visible in logs, and requires no special client handling beyond using the correct base URL. Header versioning (Accept: application/vnd.api+json;version=2) keeps URLs clean but requires every client to set the header correctly, adding integration complexity. We recommend URI versioning for public APIs and partner integrations; header versioning for internal service APIs where client code is controlled. Backwards-compatible change patterns defined: additive changes (new optional fields, new endpoints, new enum values in responses) never require a version bump; only breaking changes (removed fields, changed field types, changed required parameters, changed response structure) trigger a new version. Deprecation lifecycle with Deprecation and Sunset HTTP headers on deprecated endpoints per RFC 9745 -- Sunset: Sat, 01 Jan 2027 00:00:00 GMT gives clients a machine-readable deadline for migration. Version support matrix maintained: minimum 12 months of parallel support for breaking version bumps, with a migration guide that lists every change and the client-side code update required. Old version endpoints return the Deprecation header from their introduction date so clients monitoring their API responses receive automatic lead time for planned migrations.

Error handling and response standards

Consistent error response structure (RFC 9457 Problem Details for HTTP APIs) across all endpoints: type URI that uniquely identifies the error class, title human-readable name, status HTTP status code, detail specific explanation of what went wrong in this instance, and errors[] array for validation failures with per-field error detail -- so a client developer handling a 422 can display the specific field-level message to the user without parsing free-text error strings. HTTP status codes used correctly throughout: 400 for malformed request syntax; 401 for missing or invalid authentication credentials (with a WWW-Authenticate header); 403 for authenticated but unauthorised access (no WWW-Authenticate); 404 for not found; 409 Conflict for state conflicts (duplicate record, optimistic concurrency failure); 422 for semantically invalid requests that pass syntax validation but fail business rules; 429 Too Many Requests for rate limiting; 500 for unexpected server errors (with a correlation ID, no internal stack trace). Error logging with correlation IDs (X-Correlation-ID or X-Request-ID header, echoed in the response) allows a specific error reported by a client to be traced to the exact server log entry across distributed services without exposing internal implementation details in the error response.

OpenAPI documentation and developer experience

OpenAPI 3.0 specification that stays in sync with the implementation by construction rather than being maintained as a separate document that drifts -- TSDoc annotations on route handlers (tsoa, NestJS Swagger decorators) or code-first schema generation (Fastify's JSON Schema validation auto-generates the spec) ensure that the spec reflects the actual implementation after every code change. Interactive documentation deployed as a Swagger UI or Redoc instance with authentication configured for one-click testing: the developer clicks "Authorize," enters their API key or OAuth token, and every "Try it" button sends an authenticated request without copying credentials manually. Request and response examples for every endpoint show the expected payload shape for the common case and the expected error responses for the most frequent error conditions -- so a developer can understand the contract without reading prose documentation. SDK generation from the OpenAPI spec using openapi-generator produces client libraries for Node.js, Python, Java, and other languages that match the API's type definitions exactly; clients use typed methods rather than constructing raw HTTP requests. Webhook documentation describes every webhook event your API can emit: the trigger condition, the exact payload shape (with example), the retry behaviour, and the HMAC signature verification method. Changelog maintained alongside the spec, linked from the documentation, with semantic versioning tags for each breaking change.

Have an API project?

Tell us what the API needs to do, who will consume it, and what's broken about the current setup. We'll scope the design and build and give you a fixed cost.

Frequently asked questions

REST (Representational State Transfer) is an architectural style defined by six constraints: client-server separation, statelessness, cacheability, uniform interface, layered system, and optional code on demand. RESTful means conforming to these constraints. In practice, most APIs described as REST are HTTP APIs that use URL-based resources and HTTP verbs but don't fully conform to all REST constraints. The meaningful distinction is between well-designed HTTP APIs -- consistent patterns, correct status codes, proper error responses -- and HTTP APIs that use URLs without design discipline.

A stateless API means every request from the client contains all information the server needs to fulfil it -- the server doesn't store client session state between requests. Authentication state is passed with every request (as a Bearer token in the Authorization header) rather than maintained server-side as a session. Stateless APIs are easier to scale horizontally because any server instance can handle any request -- there's no session affinity required. In practice this means JWT tokens for authentication rather than server-side sessions, and request parameters for filtering and pagination rather than cursor state maintained server-side.

The standard approach for most REST APIs is cursor-based pagination rather than offset-based. Offset pagination (?page=3&limit=20) breaks when records are inserted or deleted during pagination -- records are skipped or repeated. Cursor-based pagination (?after=cursor_value&limit=20) uses a stable reference point in the dataset that doesn't shift when the underlying data changes. The response includes a next_cursor value when more results are available and null when the end is reached. For analytics endpoints where total counts matter, offset pagination with a total count header is the right trade-off.

A focused REST API covering a single resource domain with authentication, standard CRUD operations, and OpenAPI documentation typically runs $20,000 to $50,000. A more complex API with multiple resource domains, OAuth 2.0 flows, webhook delivery, rate limiting tiers, and developer portal typically runs $50,000 to $120,000. Fixed cost agreed before development starts.

Work with us

Tell us what you need. We'll tell you what it would take.

We scope REST API Development in 30 minutes. You walk away with a clear cost, timeline, and approach. No commitment required.

  • Scope and cost agreed before work starts. No surprises. No obligation.
  • Working prototype within 3 weeks of kickoff.
  • Pay by milestone. You see progress before each invoice.
  • 60-day post-launch warranty. Bug fixes, UI tweaks, and deployment support. No retainer.
  • All conversations are NDA-protected.