Conversation

Start conversation

POST https://app.blinger.io/api/conversations/start

This endpoint allows you to start the conversation.

Headers

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

operator_id

integer

Default - Admin

disable_webhook

integer

Default - 0

{
    "status": 200,
    "data": {
        "id": 2,
        "user_id": 1,
        "operator_user_id": 1,
        "from_blinger_user_id": 5,
        "to_blinger_user_id": 4,
        "from_user_name": "LiveChat client #5",
        "to_user_name": "user@gmail.com",
        "application": "livechat",
        "last_message": "124124",
        "unread_count": 0,
        "status": "inbox",
        "date_created": 1559737532,
        "date_updated": 1560107366,
        "from_user_avatar": null,
        "is_outgoing": false,
        "token": "A0N_JeEemP_2TItFDcw-RrvuIrJ4ZWcdQixrkYB1PBJP7c5ZKLN0Mm200XCr8ABU",
        "is_new_conversation": false,
        "waiting_operator_response": false,
        "group_id": 1,
        "is_inner_message": null,
        "is_operator_last_message": true,
        "is_group_closed": false,
        "close_group": null,
        "type": "message",
        "comment_post_id": null,
        "comment_post_url": null,
        "comment_post_title": null,
        "comment_post_img": null,
        "unassigned_date": 1559807929,
        "last_message_date": 1559826168,
        "from_user_custom_name": null,
        "toBlingerUser": {
            "id": 4,
            "service_blinger_id": 1,
            "blinger_user_id": 4,
            "is_active": true,
            "date_updated": 1559737517,
            "date_created": 1559737517,
            "tags": null,
            "name": null,
            "role": "customer",
            "avatar": null,
            "application": "livechat",
            "service_user_id": null,
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "g9k0jUSfIBdr12zgMJWLVKoi-WdhSyaf",
            "custom_name": null
        }
    }
}

Close conversation

POST https://app.blinger.io/api/conversations/close

This endpoint allows you to close the conversation.

Headers

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

operator_id

integer

Default - Admin

disable_webhook

integer

Default - 0

{
    "status": 200,
    "data": {
        "id": 2,
        "user_id": 1,
        "operator_user_id": 1,
        "from_blinger_user_id": 5,
        "to_blinger_user_id": 4,
        "from_user_name": "LiveChat client #5",
        "to_user_name": "artemylapko@gmail.com",
        "application": "livechat",
        "last_message": "124124",
        "unread_count": 0,
        "status": "closed",
        "date_created": 1559737532,
        "date_updated": 1560187173,
        "from_user_avatar": null,
        "is_outgoing": false,
        "token": "A0N_JeEemP_2TItFDcw-RrvuIrJ4ZWcdQixrkYB1PBJP7c5ZKLN0Mm200XCr8ABU",
        "is_new_conversation": false,
        "waiting_operator_response": false,
        "group_id": 1,
        "is_inner_message": null,
        "is_operator_last_message": true,
        "is_group_closed": false,
        "close_group": null,
        "type": "message",
        "comment_post_id": null,
        "comment_post_url": null,
        "comment_post_title": null,
        "comment_post_img": null,
        "unassigned_date": 1559807929,
        "last_message_date": 1560185816,
        "from_user_custom_name": null,
        "toBlingerUser": {
            "id": 4,
            "service_blinger_id": 1,
            "blinger_user_id": 4,
            "is_active": true,
            "date_updated": 1559737517,
            "date_created": 1559737517,
            "tags": null,
            "name": null,
            "role": "customer",
            "avatar": null,
            "application": "livechat",
            "service_user_id": null,
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "g9k0jUSfIBdr12zgMJWLVKoi-WdhSyaf",
            "custom_name": null
        }
    }
}a

Unassign conversation

POST https://app.blinger.io/api/conversations/unassign

Path Parameters

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

operator_id

integer

Default - Admin

disable_webhook

integer

Default - 0

{
    "status": 200,
    "data": {
        "id": 2,
        "user_id": 1,
        "operator_user_id": 1,
        "from_blinger_user_id": 5,
        "to_blinger_user_id": 4,
        "from_user_name": "LiveChat client #5",
        "to_user_name": "artemylapko@gmail.com",
        "application": "livechat",
        "last_message": "124124",
        "unread_count": 0,
        "status": "closed",
        "date_created": 1559737532,
        "date_updated": 1560187173,
        "from_user_avatar": null,
        "is_outgoing": false,
        "token": "A0N_JeEemP_2TItFDcw-RrvuIrJ4ZWcdQixrkYB1PBJP7c5ZKLN0Mm200XCr8ABU",
        "is_new_conversation": false,
        "waiting_operator_response": false,
        "group_id": 1,
        "is_inner_message": null,
        "is_operator_last_message": true,
        "is_group_closed": false,
        "close_group": null,
        "type": "message",
        "comment_post_id": null,
        "comment_post_url": null,
        "comment_post_title": null,
        "comment_post_img": null,
        "unassigned_date": 1559807929,
        "last_message_date": 1560185816,
        "from_user_custom_name": null,
        "toBlingerUser": {
            "id": 4,
            "service_blinger_id": 1,
            "blinger_user_id": 4,
            "is_active": true,
            "date_updated": 1559737517,
            "date_created": 1559737517,
            "tags": null,
            "name": null,
            "role": "customer",
            "avatar": null,
            "application": "livechat",
            "service_user_id": null,
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "g9k0jUSfIBdr12zgMJWLVKoi-WdhSyaf",
            "custom_name": null
        }
    }
}

Assign operator

POST https://app.blinger.io/api/conversations/assign-operator

This endpoint allows you to assign the operator to the conversations

Headers

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

operator_id

integer

disable_webhook

integer

Default - 0

{
    "status": 200,
    "data": {
        "id": 2,
        "user_id": 1,
        "operator_user_id": 3,
        "from_blinger_user_id": 5,
        "to_blinger_user_id": 4,
        "from_user_name": "LiveChat client #5",
        "to_user_name": "artemylapko@gmail.com",
        "application": "livechat",
        "last_message": "124124",
        "unread_count": 1,
        "status": "inbox",
        "date_created": 1559737532,
        "date_updated": 1560188161,
        "from_user_avatar": null,
        "is_outgoing": false,
        "token": "A0N_JeEemP_2TItFDcw-RrvuIrJ4ZWcdQixrkYB1PBJP7c5ZKLN0Mm200XCr8ABU",
        "is_new_conversation": false,
        "waiting_operator_response": false,
        "group_id": 1,
        "is_inner_message": null,
        "is_operator_last_message": true,
        "is_group_closed": false,
        "close_group": null,
        "type": "message",
        "comment_post_id": null,
        "comment_post_url": null,
        "comment_post_title": null,
        "comment_post_img": null,
        "unassigned_date": 1559807929,
        "last_message_date": 1560185816,
        "from_user_custom_name": null,
        "toBlingerUser": {
            "id": 4,
            "service_blinger_id": 1,
            "blinger_user_id": 4,
            "is_active": true,
            "date_updated": 1559737517,
            "date_created": 1559737517,
            "tags": null,
            "name": null,
            "role": "customer",
            "avatar": null,
            "application": "livechat",
            "service_user_id": null,
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "g9k0jUSfIBdr12zgMJWLVKoi-WdhSyaf",
            "custom_name": null
        }
    }
}

Assign group

POST https://app.blinger.io/api/conversations/assign-group

This endpoint allows you to assign the group to the conversation

Headers

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

group_id

integer

{
    "status": 200,
    "data": {
        "id": 2,
        "user_id": 1,
        "operator_user_id": 3,
        "from_blinger_user_id": 5,
        "to_blinger_user_id": 4,
        "from_user_name": "LiveChat client #5",
        "to_user_name": "artemylapko@gmail.com",
        "application": "livechat",
        "last_message": "124124",
        "unread_count": 1,
        "status": "inbox",
        "date_created": 1559737532,
        "date_updated": 1560188258,
        "from_user_avatar": null,
        "is_outgoing": false,
        "token": "A0N_JeEemP_2TItFDcw-RrvuIrJ4ZWcdQixrkYB1PBJP7c5ZKLN0Mm200XCr8ABU",
        "is_new_conversation": false,
        "waiting_operator_response": false,
        "group_id": 1,
        "is_inner_message": null,
        "is_operator_last_message": true,
        "is_group_closed": false,
        "close_group": null,
        "type": "message",
        "comment_post_id": null,
        "comment_post_url": null,
        "comment_post_title": null,
        "comment_post_img": null,
        "unassigned_date": 1559807929,
        "last_message_date": 1560185816,
        "from_user_custom_name": null,
        "toBlingerUser": {
            "id": 4,
            "service_blinger_id": 1,
            "blinger_user_id": 4,
            "is_active": true,
            "date_updated": 1559737517,
            "date_created": 1559737517,
            "tags": null,
            "name": null,
            "role": "customer",
            "avatar": null,
            "application": "livechat",
            "service_user_id": null,
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "g9k0jUSfIBdr12zgMJWLVKoi-WdhSyaf",
            "custom_name": null
        }
    }
}

Send message

POST https://app.blinger.io/api/conversations/send-message

Headers

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

text

string

operator_id

integer

Default - Admin

disable_webhook

integer

Default - 0

{
    "status": 200,
    "data": {
        "id": 178,
        "from_blinger_user_id": 4,
        "to_blinger_user_id": 5,
        "blinger_message_id": 178,
        "application": "livechat",
        "type": "text",
        "message": "124124",
        "date_updated": 1560188469,
        "date_created": 1560188469,
        "is_outgoing": true,
        "status": "sent",
        "is_inner_message": false,
        "date_read": null,
        "date_real": 15601884680000,
        "error": null,
        "is_history": false,
        "echo": false,
        "echo_outgoing": false
    }
}

Send file message

POST https://app.blinger.io/api/conversations/send-file-message

Path Parameters

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

conversation_id

integer

file_url

string

operator_id

integer

Default - Admin

disable_webhook

integer

Default - 0

{
    "status": 200,
    "data": {
        "id": 178,
        "from_blinger_user_id": 4,
        "to_blinger_user_id": 5,
        "blinger_message_id": 178,
        "application": "livechat",
        "type": "image",
        "message": "https://static-api.blinger.io/files/new/67/cf/67cf7f4783de908d9723696d295c5252_5e60f6d59964e.png",
        "date_updated": 1560188469,
        "date_created": 1560188469,
        "is_outgoing": true,
        "status": "sent",
        "is_inner_message": false,
        "date_read": null,
        "date_real": 15601884680000,
        "error": null,
        "is_history": false,
        "echo": false,
        "echo_outgoing": false
    }
}

Send note

POST https://app.blinger.io/api/conversations/send-note

Path Parameters

NameTypeDescription

Authentication

string

Authentication token

Request Body

NameTypeDescription

operator_id

integer

Default - Admin

text

string

conversation_id

integer

{
    "status": 200,
    "data": {
        "id": 178,
        "from_blinger_user_id": 4,
        "to_blinger_user_id": 5,
        "blinger_message_id": null,
        "application": "livechat",
        "type": "text",
        "message": "My private note",
        "date_updated": 1560188469,
        "date_created": 1560188469,
        "is_outgoing": true,
        "status": "sent",
        "is_inner_message": true,
        "date_read": null,
        "date_real": 15601884680000,
        "error": null,
        "is_history": false,
        "echo": false,
        "echo_outgoing": false
    }
}

Get unassigned conversations

GET https://app.blinger.io/api/conversations/unassigned

This endpoint allows you to get unassigned conversations. Conversations are sorted by date updated in descending order (limit 1000).

Path Parameters

NameTypeDescription

group_id

integer

{
    "status": 200,
    "data": [
        {
            "id": 300,
            "group_id": 21,
            "status": "unassigned",
            "application": "livechat",
            "from_blinger_user_id": 2,
            "from_user_name": "LiveChat client #2",
            "is_new_conversation": true,
            "unassigned_date": 1563894618,
            "custom_name": "John Doe"
        }
    ]
}

Get unread conversations

GET https://app.blinger.io/api/conversations/unread

This endpoint allows you to get unread conversations with status "inbox" for a specific operator. Conversations are sorted by date updated in descending order (limit 1000).

Path Parameters

NameTypeDescription

operator_id

integer

group_id

integer

{
    "status": 200,
    "data": [
        {
            "id": 300,
            "group_id": 21,
            "operator_user_id": 18,
            "status": "inbox",
            "application": "livechat",
            "from_blinger_user_id": 2,
            "from_user_name": "LiveChat client #2",
            "is_new_conversation": false,
            "unread_count": 2,
            "last_message_date": 1563895196,
            "custom_name": "John Doe",
            "operator_email": "operator@gmail.com"
        }
    ]
}

Get not answered conversations

GET https://app.blinger.io/api/conversations/not-answered

This endpoint allows you to get not answered conversations with status "inbox" for a specific operator. Conversations are sorted by date updated in descending order (limit 1000).

Path Parameters

NameTypeDescription

operator_id

integer

group_id

integer

{
    "status": 200,
    "data": [
        {
            "id": 300,
            "group_id": 21,
            "operator_user_id": 18,
            "status": "inbox",
            "application": "livechat",
            "from_blinger_user_id": 2,
            "from_user_name": "LiveChat client #2",
            "is_new_conversation": false,
            "unread_count": 0,
            "last_message_date": 1563895196,
            "custom_name": "John Doe",
            "operator_email": "operator@gmail.com"
        }
    ]
}

Get conversation by ID

GET https://app.blinger.io/api/conversations/get

This endpoint allows you to get conversation info by ID

Query Parameters

NameTypeDescription

conversation_id*

integer

{
    "status": 200,
    "data": {
        "conversation_id": 5867,
        "operator_id": 457,
        "from_blinger_user_id": 12654,
        "to_blinger_user_id": 64456,
        "from_user": {
            "id": 10,
            "service_blinger_id": 2,
            "blinger_user_id": 12654,
            "is_active": true,
            "date_updated": 1634559429,
            "date_created": 1634559429,
            "tags": null,
            "name": "Alex",
            "role": "default",
            "avatar": null,
            "application": "telegrambot",
            "service_user_id": "253560468",
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "7YCH_DHyQIHsMB1rfuQM85tgbFX3Qrfq",
            "custom_name": null,
            "dialog_id": null,
            "comments_group_id": null,
            "phone": "+37529576375",
            "service_user_nickname": "alex"
        },
        "to_user": {
            "id": 44,
            "service_blinger_id": 2,
            "blinger_user_id": 64456,
            "is_active": true,
            "date_updated": 1635854447,
            "date_created": 1635854447,
            "tags": null,
            "name": null,
            "role": "customer",
            "avatar": null,
            "application": "telegrambot",
            "service_user_id": null,
            "status": "enabled",
            "group_id": null,
            "is_comments": null,
            "page_url": null,
            "page_title": null,
            "extra_fields": null,
            "extra_field_secret_key": "TSrwT2DvVJZFX9nJu3AQEcCFVMxQa3P4",
            "custom_name": null,
            "dialog_id": null,
            "comments_group_id": null,
            "phone": null,
            "service_user_nickname": null
        },
        "application": "telegrambot",
        "status": "inbox",
        "date_created": 1635856462,
        "date_updated": 1643971557,
        "messages": [
            {
                "id": 7532,
                "message": "/start",
                "type": "text",
                "date_created": 1635856462
            },
            {
                "id": 7543,
                "message": "Hello, can I help you?",
                "type": "text",
                "date_created": 1635856464,
                "operator_id": 457
            },
            {
                "id": 8634,
                "message": "Hello!",
                "type": "text",
                "date_created": 1635863152
            }
        ]
    }
}

Last updated