Skip to main content
POST
/
public
/
api
/
v1
/
inboxes
/
{inbox_identifier}
/
contacts
/
{contact_identifier}
/
conversations
/
{conversation_id}
/
toggle_status
Resolve a conversation
curl --request POST \
  --url https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status
import requests

url = "https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status"

req, _ := http.NewRequest("POST", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.cria.chat/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "inbox_id": "<string>",
  "messages": [
    {
      "id": 123,
      "content": "<string>",
      "account_id": 123,
      "inbox_id": 123,
      "conversation_id": 123,
      "created_at": 123,
      "updated_at": 123,
      "private": true,
      "source_id": "<string>",
      "content_attributes": {},
      "sender_id": 123,
      "external_source_ids": {},
      "additional_attributes": {},
      "processed_message_content": "<string>",
      "sentiment": {},
      "conversation": {},
      "attachment": {},
      "sender": {}
    }
  ],
  "contact": {}
}
{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}
{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}

Path Parameters

inbox_identifier
string
required

The identifier obtained from API inbox channel

contact_identifier
string
required

The source id of contact obtained on contact create

conversation_id
integer
required

The numeric ID of the conversation

Response

Conversation resolved successfully

id
integer

Id of the conversation

inbox_id
string

The inbox id of the conversation

messages
object[]

Messages in the conversation

contact
object

The contact information associated to the conversation