Build my first API endpoint
One endpoint, finished properly, as the template for the rest.
My project is <one sentence>, built with <stack> and hosted on <host>. I need an endpoint: <METHOD> <path> that <does what>. Build it with: - Routing done this stack's normal way. - Every input validated, with clear 400-style responses. - The right status code for each outcome. - One consistent error format I can copy to every future endpoint. - Anything this host needs for the route to be reachable, such as rewrite rules. Then show me how to call it with curl so I can test it on the live host.
Get the error format right on the first endpoint. Everything after it copies the first one, mistakes included.