# Available Endpoints

***

### 📚 Base URL

```bash
https://console.heyoperator.ai/script/include/api
```

✅ All API requests must be made over HTTPS and authenticated via Bearer Token.

***

### 🛠️ Core API Endpoints

| Action                          | Endpoint                     | Method   |
| ------------------------------- | ---------------------------- | -------- |
| **Get all users**               | `/users`                     | `GET`    |
| **Get a specific user**         | `/users/{id}`                | `GET`    |
| **Create a new user**           | `/users`                     | `POST`   |
| **Update a user**               | `/users/{id}`                | `PUT`    |
| **Delete a user**               | `/users/{id}`                | `DELETE` |
| **Get all conversations**       | `/conversations`             | `GET`    |
| **Get a specific conversation** | `/conversations/{id}`        | `GET`    |
| **Send a message**              | `/messages`                  | `POST`   |
| **Add a tag to a user**         | `/tags`                      | `POST`   |
| **Get all tags**                | `/tags`                      | `GET`    |
| **Create a new conversation**   | `/conversations`             | `POST`   |
| **Assign a conversation**       | `/conversations/{id}/assign` | `POST`   |
| **Close a conversation**        | `/conversations/{id}/close`  | `POST`   |

✅ These endpoints cover the main actions needed to automate, sync, and extend Operator AI.

***

### 🔥 Example: Creating a New User

```bash
POST /users
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john@example.com",
  "phone": "+15551234567",
  "tags": ["VIP", "NewsletterSubscriber"]
}
```

✅ Create user profiles easily from your website, CRM, or signup flows.

***

### 📋 Best Practices for API Usage

| Tip                            | Why It Matters                                                             |
| ------------------------------ | -------------------------------------------------------------------------- |
| Always validate API responses  | Handle success and error codes properly.                                   |
| Use pagination for large lists | Endpoints like `/users` and `/conversations` may return paginated results. |
| Rate limit your requests       | Avoid unnecessary API call spikes.                                         |
| Secure your API tokens         | Never hardcode them in public codebases.                                   |
| Monitor API logs               | Track usage trends and potential issues early.                             |

✅ Smart API practices = faster, more reliable integrations.

***

### 🧠 Advanced: Webhooks + API Combo

* Use Webhooks to **get notified** of events (new conversations, new users).
* Use the API to **react programmatically** (assign conversations, tag users, escalate leads).

✅ Build full real-time automations and syncs with Operator AI.

***

### 🛟 Need Help?

* Explore the API tutorials and examples inside this documentation.
* Contact [support@heyoperator.ai](mailto:hey@heyoperator.ai) for help building integrations.
* Your Success Manager can advise on scaling best practices.

✅ We’re here to help you extend Operator AI however you need.

***

## 🎯 Next Step

👉 [Continue to Webhooks Overview →](https://operator-ai.gitbook.io/start/webhooks)
