# Operator

## Get operators

<mark style="color:blue;">`GET`</mark> `https://app.blinger.io/api/operators/all`

This endpoint allows you to get operators.

#### Headers

| Name           | Type   | Description           |
| -------------- | ------ | --------------------- |
| Authentication | string | Authentication token. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```javascript
{
    "status": 200,
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "owner_user_id": 1,
            "invite_email": "user1@gmail.com",
            "conversations_token": "5c763415ee6c7"
        },
        {
            "id": 2,
            "user_id": 3,
            "owner_user_id": 1,
            "invite_email": "al@blinger.io",
            "conversations_token": "5cf8c80657eec"
        }
    ]
}
```

{% endtab %}

{% tab title="401 Could not find a cake matching this query." %}

```javascript
{
    "error": "Empty token",
    "status": 401
}
```

{% endtab %}
{% endtabs %}

## Get groups

<mark style="color:blue;">`GET`</mark> `https://app.blinger.io/api/operators/groups`

#### Headers

| Name           | Type   | Description          |
| -------------- | ------ | -------------------- |
| Authentication | string | Authentication token |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "status": 200,
    "data": [
        {
            "id": 1,
            "user_id": 1,
            "title": "Default",
            "priority": 1,
            "color": "#22539c",
            "is_default": true
        }
    ]
}
```

{% endtab %}

{% tab title="401 " %}

```javascript
{
    "error": "Empty token",
    "status": 401
}
```

{% endtab %}
{% endtabs %}

## Create operator

<mark style="color:green;">`POST`</mark> `https://app.blinger.io/api/operators/create`

#### Path Parameters

| Name           | Type   | Description          |
| -------------- | ------ | -------------------- |
| Authentication | string | Authentication token |

#### Request Body

| Name               | Type   | Description |
| ------------------ | ------ | ----------- |
| operator\_email    | string |             |
| operator\_password | string |             |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": 200,
    "data": {
        "invite_email": "bbb@bb.bb",
        "owner_user_id": 47,
        "id": 14758,
        "user_id": 14432
    }
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "error": {
        "invite_email": "Email \"bbb@bb.bb\" has already been taken."
    },
    "status": 400
}
```

{% endtab %}
{% endtabs %}

## Delete operator

<mark style="color:green;">`POST`</mark> `https://app.blinger.io/api/operators/delete`

#### Path Parameters

| Name           | Type   | Description          |
| -------------- | ------ | -------------------- |
| Authentication | string | Authentication token |

#### Request Body

| Name         | Type    | Description |
| ------------ | ------- | ----------- |
| operator\_id | integer |             |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": 200,
    "data": {
        "success": true
    }
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "error": "Operator not found",
    "status": 400
}
```

{% endtab %}
{% endtabs %}


---

# 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://help.blinger.io/documentation/api/operator.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.
