Endpoints and methods: the addresses and verbs of an API

An endpoint is the address you send a request to. A method is the verb that says what you want done there. Together they make one request.
Endpoints: the where
Picture a large office building. Each department has its own door. An API is the building, and each endpoint is one door. One door might handle customer lookups and another might handle new orders.
In an API's documentation, an endpoint is usually written as a web address or the end part of one.1 MDN describes the request's address part as "The path of the resource to fetch". If you get that path wrong, nothing at that door answers.
The thing behind the door is called a resource. A customer record is a resource. So is an invoice.
Methods: the what
2 MDN says these request methods are "sometimes referred to as HTTP verbs".1 A method, in its words, "defines the operation the client wants to perform".
You'll mostly meet five.
| Method | What it does, from MDN's wording |
|---|---|
| GET | 2 "requests a representation of the specified resource" |
| POST | 2 "submits an entity to the specified resource, often causing a change in state or side effects on the server" |
| PUT | 2 "replaces all current representations of the target resource with the request content" |
| PATCH | 2 "applies partial modifications to a resource" |
| DELETE | 2 "deletes the specified resource" |
Reading versus changing
GET asks for a representation of a resource. The other methods can change what's stored.
That matters when you try an API by hand. Any request, even a GET, can still count toward limits or charges. A DELETE can remove something for real, so check which account you're in before you send one.
Where AI tools fit
Sending a prompt to an AI model through an API is normally a request in which you hand over content for the service to work on. In the docs this tends to look like a POST to a single endpoint. Check the maker's own reference page for the exact address and method, because they differ between makers and change over time.
Whatever you send in that request leaves your business. Keep secrets and customer data out of it unless your own policy allows it.
Reading one line of documentation
Docs often show a method and an address on one line. Read it left to right. The first word is the verb. The next part is where to send it. Under that, you'll find what to put in the body and what comes back.
Try an example in words. "GET, then the customers path" means: ask for customer information. "POST, then the orders path" means: send in a new order.
When the address or verb is wrong
Two errors point here.
3 MDN says a 404 (not found) reply in an API can also mean the endpoint is valid. Then "the resource itself does not exist." So a not-found reply can mean a bad address. It can also mean a good address and a missing item.
4 Anthropic's advice for a not-found error is "Check the endpoint path and any resource IDs in the request URL." Do that first: look for typos.
The other error is a refused verb.3 MDN gives the example that "an API may not allow DELETE on a resource". See reading API error codes for more, and how a request and response work for the full message.
Cited material
- Overview of HTTP, MDN Web Docs
- HTTP request methods, MDN Web Docs
- HTTP response status codes, MDN Web Docs
- Errors, Anthropic API documentation


