Which verb completes: "We need to ___ a new endpoint for user search."
Expose an endpoint is the standard collocation when you make a route publicly available through your API. Engineers say "the service exposes a /search endpoint", meaning it offers that path for clients to call. While "publish" and "release" can describe shipping an API as a product, they do not pair naturally with a single route. "Open an endpoint" sounds informal and is rarely used in design documents. Choosing expose signals that the endpoint is part of the service's public surface area.
2 / 5
A client application will ___ this endpoint to fetch order data.
To consume an endpoint (or API) means to call it and use its data from a client. We talk about API consumers and consuming a service. This is the inverse of "expose": one side exposes the endpoint, the other consumes it. The verbs "eat", "drink", and "absorb" are not used in technical English for this idea. Saying "the mobile app consumes the orders endpoint" is idiomatic and instantly understood by any backend team.
3 / 5
After processing, the handler will ___ a 200 response.
A handler returns a response (or returns a status code). This is the dominant collocation in REST and HTTP documentation: "the endpoint returns a 200 on success". Although "send" appears with responses too, "return a response" is the precise phrase for what a function or route produces. "Give back" and "hand" are too colloquial for API specs. Using return keeps your wording aligned with framework docs and HTTP standards.
4 / 5
If the payload is malformed, the API should ___ an error.
You throw an error (or raise an error) when something goes wrong. In API design we also say the endpoint returns an error to the client, but inside the code an exception is thrown. The verbs "make", "do", and "build" do not collocate with "error" in this sense. Mastering "throw an error" versus "return an error response" helps you describe both internal failures and the messages clients receive.
5 / 5
Every endpoint must ___ the incoming input before using it.
To validate input means to check that data is well-formed and safe before processing it. This is a core security and design collocation: "validate the request body", "validate query parameters". "Confirm", "approve", and "agree" carry human or transactional meanings and do not fit. Always pairing validate with input, payload, or parameters shows you understand defensive API design and prevents many bugs and vulnerabilities.