api-design

Guide REST API design covering resource naming, status codes, and pagination.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/dbrijesh/raep --skill api-design-dbrijesh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/dbrijesh/raep/tree/main/templates/skills/api-design
Command: npx skills add https://github.com/dbrijesh/raep --skill api-design-dbrijesh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to designing REST APIs, addressing common issues such as resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting.

Core Features & Use Cases

  • Resource Design: Best practices for URL structure, naming conventions, and resource relationships.
  • HTTP Methods and Status Codes: Understanding of method semantics, status code reference, and common mistakes.
  • Response Format: Standardized success and error response formats, including JSON examples.
  • Pagination: Offset-based and cursor-based pagination methods with use cases.
  • Filtering, Sorting, and Search: Implementing filtering, sorting, and full-text search capabilities.
  • Authentication and Authorization: Token-based auth and authorization patterns.
  • Rate Limiting: Configuring rate limiting with headers and tiers.
  • Versioning: URL path and header versioning strategies.
  • Implementation Patterns: TypeScript (Next.js), Python (Django), and Go examples.
  • API Design Checklist: A checklist for ensuring API quality before deployment.

Quick Start

Use the api-design skill to review the URL structure and HTTP methods for your new API endpoint.

Frequently Asked Questions about api-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for REST API resource naming and URL structure?

REST API resource naming best practices involve using plural nouns for collections and hierarchical paths to reflect resource relationships. This guide provides structured rules for URL structure, naming conventions, and managing resource relationships to ensure API quality.

How do I implement cursor-based pagination in a REST API?

Implement cursor-based pagination in a REST API by using a pointer to the last fetched item rather than an offset. This guide explains both offset-based and cursor-based pagination methods alongside their specific use cases for managing large datasets.

Which HTTP status codes should I use for successful and error responses?

Use HTTP status codes like 200 for success, 201 for creation, and 4xx or 5xx for client and server errors. This guide covers HTTP method semantics, provides a status code reference, and highlights common mistakes to avoid in REST API design.

Does this API design guide include implementation examples for Python and Go?

Yes, this API design guide includes implementation patterns with examples for Python using Django, TypeScript using Next.js, and Go. It provides these alongside standardized JSON response formats and an API design checklist to verify quality before deployment.

What is the best way to configure rate limiting headers and tiers for a REST API?

The best way to configure REST API rate limiting is by applying response headers that track usage limits and defining access tiers. This guide covers configuring rate limiting with specific headers and tiers to control API traffic effectively.

When should I use URL path versioning versus header versioning for my API?

Use URL path versioning for explicit, easily testable API versions, and header versioning when you want to keep URLs clean. This guide compares URL path and header versioning strategies to help you select the right approach for your API lifecycle.