cursor / rules
agent-anatomy/cursor/.cursor/rules/api-conventions.mdc
REST API design conventions
Cursor rule0 starsChanged 5 months ago
What's in it
- REST
- Error format
- Auth
---
description: REST API design conventions
alwaysApply: true
---
## REST
- Plural nouns for resources: `/users`, `/posts`
- HTTP verbs: GET (read), POST (create), PUT (replace), PATCH (update), DELETE
- Status codes: 200 success, 201 created, 400 bad input, 401 unauth, 404 not found, 500 server error
- Always return JSON, even for errors
## Error format
```json
{
"error": {
"code": "USER_NOT_FOUND",
"message": "No user with id 123"
}
}
```
## Auth
- Bearer token in `Authorization` header
- Never log tokens or passwords
More agent context in agent-anatomy/cursor
4 other files this repository gives its agents.
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

