<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0" -->

---
title: Best Practices for Naming API Endpoints | daily.dev
description: Following best practices for naming API endpoints ensures your API is intuitive, consistent, and easy to use. Use nouns for resource names, plural names for...
canonical: https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Best Practices for Naming API Endpoints | daily.dev
og:description: Following best practices for naming API endpoints ensures your API is intuitive, consistent, and easy to use. Use nouns for resource names, plural names for...
og:url: https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0
og:image: https://api.daily.dev/og/posts/H7AfQgoY0.png
og:image:alt: Best Practices for Naming API Endpoints
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Best Practices for Naming API Endpoints

**[Community Picks](https://daily.dev/sources/community)** · 3 min read · 969 upvotes · 27 comments

## Summary

Following best practices for naming API endpoints ensures your API is intuitive, consistent, and easy to use. Use nouns for resource names, plural names for collections, and HTTP methods to define actions. Maintain a clear hierarchical structure, use consistent naming conventions, avoid special characters and spaces, keep names simple and intuitive, include versioning, and describe actions with query parameters.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/msnmongare/best-practices-for-naming-api-endpoints-2n5o>

## Community discussion

Top comments from developers on daily.dev.

**@arvinyorro** · 10 upvotes

> /v1/orders/{id}/cancel
>
> 1. "Cancel" is a verb ❌ - Change it to a word that best describes the state of the resource post-operation. Suggestions: "Cancelled" if the status is Cancelled or "Cancellation" if you prefer an actual noun. ✅
>
> 2. POST is meant for creation of resource ❌ Use PATCH for partial updates ✅
>
> The rest are fine (no pun intended)
>
> I think REST is good practice but calling it the "best practice" makes it dogmatic and it turns away people. REST is just one way to get the job done. So lets call it "REST practices".

**@sweidehase** · 3 upvotes

> Using verbs like "cancel" is afaik an anti pattern. Instead I am using nouns like "cancellation" or plural if it is possible by Domain. Other ones would be "rejections", "withdrawals", "acceptances". Simple get or post depends on the api Conventions. I am not sure if there is a best practice.

**@stalexlife** · 2 upvotes

> Versionning api is used a lot but have seen a lot of time not changed and stayed at v1 even with new api or major changes. Can't understand why but at the end it’s overkilled like that.

**@zmarius81** · 2 upvotes

> "For a single resource, use the singular form along with its identifier (e.g., /users/{id})."
>
> Wait, "users" is singular?

**@global\_fxs** · 1 upvotes

> Just name it in a confusing way , they always need you😂😂😂
> Login endpoint: login
> Logout endpoint : llogin
> Get products : logiin
> Add products : loggin
> More confusing more money you earn 😂
> Just kidding.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#architecture](https://daily.dev/tags/architecture)

[View this post on daily.dev](https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Best Practices for Naming API Endpoints","url":"https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0"},"datePublished":"2024-09-02T18:58:31.646Z","dateModified":"2024-11-08T08:02:54.663Z","description":"Following best practices for naming API endpoints ensures your API is intuitive, consistent, and easy to use. Use nouns for resource names, plural names for...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d616e5f6b48816a1aed3ffa1a6407960?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d616e5f6b48816a1aed3ffa1a6407960?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Community Picks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":27,"discussionUrl":"https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":969},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":27}],"keywords":"webdev,architecture","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"Best Practices for Naming API Endpoints"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/best-practices-for-naming-api-endpoints-h7afqgoy0","comment":[{"@type":"Comment","text":"/v1/orders/{id}/cancel\n\n\n\n“Cancel” is a verb ❌ - Change it to a word that best describes the state of the resource post-operation. Suggestions: “Cancelled” if the status is Cancelled or “Cancellation” if you prefer an actual noun. ✅\n\n\nPOST is meant for creation of resource ❌ Use PATCH for partial updates ✅\n\n\nThe rest are fine (no pun intended)\nI think REST is good practice but calling it the “best practice” makes it dogmatic and it turns away people. REST is just one way to get the job done. So lets call it “REST practices”.","datePublished":"2024-09-26T06:51:06.798Z","dateModified":"2024-09-26T06:52:40.959Z","url":"https://daily.dev/posts/H7AfQgoY0#c-R0SERbIgB","author":{"@type":"Person","name":"Arvin Yorro","url":"https://daily.dev/arvinyorro","image":"https://avatars.githubusercontent.com/u/1425668?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":10}},{"@type":"Comment","text":"Using verbs like “cancel” is afaik an anti pattern. Instead I am using nouns like “cancellation” or plural if it is possible by Domain. Other ones would be “rejections”, “withdrawals”, “acceptances”. Simple get or post depends on the api Conventions. I am not sure if there is a best practice.","datePublished":"2024-09-13T21:01:20.975Z","url":"https://daily.dev/posts/H7AfQgoY0#c-6PnBevHA9","author":{"@type":"Person","name":"Swe","url":"https://daily.dev/sweidehase","image":"https://lh3.googleusercontent.com/a/ACg8ocJ7hKAmvjNHA1Mx5QulIGhiHPDrbAKQko3XQ5GyQ4JXiQA7A3Y=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Versionning api is used a lot but have seen a lot of time not changed and stayed at v1 even with new api or major changes. Can’t understand why but at the end it’s overkilled like that.","datePublished":"2024-10-01T14:25:27.672Z","dateModified":"2024-12-04T01:53:47.131Z","url":"https://daily.dev/posts/H7AfQgoY0#c-u5dsCAKuR","author":{"@type":"Person","name":"Steve A","url":"https://daily.dev/stalexlife","image":"https://avatars.githubusercontent.com/u/21204359?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"“For a single resource, use the singular form along with its identifier (e.g., /users/{id}).”\nWait, “users” is singular?","datePublished":"2024-11-07T08:31:18.629Z","url":"https://daily.dev/posts/H7AfQgoY0#c-QfhuDUOgg","author":{"@type":"Person","name":"Zugravu Eugen Marius","url":"https://daily.dev/zmarius81","image":"https://media.daily.dev/image/upload/s--ytYSWOOj--/f_auto/v1729681192/avatars/avatar_iLd9QLdTHiYkFIAlmMG7M"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Just name it in a confusing way , they always need you😂😂😂\nLogin endpoint: login\nLogout endpoint : llogin\nGet products : logiin\nAdd products : loggin\nMore confusing more money you earn 😂\nJust kidding.","datePublished":"2024-10-07T02:56:13.287Z","url":"https://daily.dev/posts/H7AfQgoY0#c-9npdF3hab","author":{"@type":"Person","name":"Hassan","url":"https://daily.dev/global_fxs","image":"https://media.daily.dev/image/upload/s--opodT9vc--/f_auto/v1728337887/avatars/avatar_3YhiqlxFtL8u6tUAW7sb9"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

