Conversation

post
Start conversation

https://app.blinger.io/api/conversations/start
This endpoint allows you to start the conversation.
Request
Response
Headers
Authentication
required
string
Authentication token
Body Parameters
conversation_id
optional
integer
operator_id
optional
integer
Default - Admin
disable_webhook
optional
integer
Default - 0
200: OK
Conversation successfully started.
{
"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
}
}
}
400: Bad Request
Could not to start the conversation.
{
"error": "The c onversation was assigned to another operator",
"status": 400
}

post
Close conversation

https://app.blinger.io/api/conversations/close
This endpoint allows you to close the conversation.
Request
Response
Headers
Authentication
required
string
Authentication token
Body Parameters
conversation_id
required
integer
operator_id
optional
integer
Default - Admin
disable_webhook
optional
integer
Default - 0
200: OK
Conversation successfully closed.
{
"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
}
}
}
400: Bad Request
Could not close the conversation.
{
"error": "The conversation is closed.",
"status": 400
}

post
Assign operator

https://app.blinger.io/api/conversations/assign-operator
This endpoint allows you to assign the operator to the conversations
Request
Response
Headers
Authentication
required
string
Authentication token
Body Parameters
conversation_id
required
integer
operator_id
required
integer
disable_webhook
optional
integer
Default - 0
200: OK
{
"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
}
}
}
400: Bad Request
{
"error": "The conversation has already been assigned to this operator.",
"status": 400
}

post
Assign group

https://app.blinger.io/api/conversations/assign-group
This endpoint allows you to assign the group to the conversation
Request
Response
Headers
Authentication
optional
string
Authentication token
Body Parameters
conversation_id
required
integer
group_id
required
integer
200: OK
{
"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
}
}
}
400: Bad Request
{
"error": "The operator group has already been selected.",
"status": 400
}

post
Send message

https://app.blinger.io/api/conversations/send-message
Request
Response
Headers
Authentication
required
string
Authentication token
Body Parameters
conversation_id
required
integer
text
required
string
operator_id
optional
integer
Default - Admin
disable_webhook
optional
integer
Default - 0
200: OK
{
"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
}
}
400: Bad Request
{
"error": "text is empty",
"status": 400
}

get
Get unassigned conversations

https://app.blinger.io/api/conversaions/unassigned
This endpoint allows you to get unassigned conversations. Conversations are sorted by date updated in descending order (limit 1000).
Request
Response
Path Parameters
group_id
optional
integer
200: OK
{
"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
Get unread conversations

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).
Request
Response
Path Parameters
operator_id
optional
integer
group_id
optional
integer
200: OK
{
"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
Get not answered conversations

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).
Request
Response
Path Parameters
operator_id
optional
integer
group_id
optional
integer
200: OK
{
"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"
}
]
}