# API endpoints

**Auth Routes** (Authentication)

* `POST /auth/signIn`: Login with email/password
* `POST /auth/signup`: Create a new user account 🆕
* `POST /auth/exist`: Check if an email address already exists
* `PUT /auth/password`: Update user's password
* `POST /auth/password-reset`: Send password reset link
* `POST /auth/google`: Authenticate with Google
* `GET /auth/magic-link`: Send a magic link for login via email 🪄
* `GET /auth/callback/magic-link`: Verify a magic link

**Blog Post Routes** (Blog management)

* `GET /blogposts/`: Get all blog posts
* `GET /blogposts/:id`: Get a specific blog post
* `GET /blogposts/:slug/slug`: Get a blog post by slug
* `GET /blogposts/:slug/latests`: Get latest blog posts (ignoring slug) 🆕
* `POST /blogposts/`: Create a new blog post
* `PUT /blogposts/:id`: Update a blog post ✏️
* `DELETE /blogposts/:id`: Delete a blog post ️

**File Uploads Routes** (Image uploads)

* `POST /file-uploads/image`: Upload an image ️
* `GET /file-uploads/:id/image`: Get an uploaded image ️

**Payment Routes** (STRIPE integration)

* `POST /payments/webhook`: Handle Stripe webhooks (for automatic subscription management)

**Plan Routes** (Subscription plans)

* `GET /plans/all`: Get all available subscription or payment plans
* `GET /plans/:id`: Get a specific plan
* `POST /plans/change`: Update a user's subscription or payment plan
* `POST /plans/`: Create a new subscription or payment plan ➕
* `PUT /plans/:id`: Update a subscription or payment plan ✏️
* `DELETE /plans/:id`: delete a subscription or payment plan


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nzoni.app/node.js-mongodb/api-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
