designadvanced

API Endpoint Designer

Designs a complete API surface for a domain with consistent conventions and error handling.

Prompt

Design a complete API surface for the following domain:

**Domain**: {{domain}}
**Style**: {{style}} (REST/GraphQL/gRPC)
**Entities**: {{entities}}
**Key workflows**: {{workflows}}

For each resource/endpoint:
1. **CRUD operations**: standard create, read, update, delete (with partial update support)
2. **List/search**: filtering, sorting, pagination (cursor-based), field selection
3. **Relationships**: nested resources, expansion/embedding, batch operations
4. **Actions**: non-CRUD operations (approve, publish, archive, etc.)
5. **Versioning strategy**: URL path, header, or content negotiation
6. **Error format**: consistent error response structure with error codes
7. **Idempotency**: idempotency keys for unsafe operations
8. **Webhooks**: events emitted for each state change
9. **Bulk operations**: batch create/update/delete endpoints

Include an OpenAPI 3.0 skeleton with all endpoints listed.

Variables

{{domain}}{{style}}{{entities}}{{workflows}}

Use Cases

  • API-first development
  • Microservice interface design
  • Developer platform APIs

Compatible Models

claude-sonnet-4-20250514gpt-4o

Tags

api-designrestgraphqldeveloper-experience

Details

Author
PromptIndex
Updated
2026-04-01
Difficulty
advanced

Related Prompts