Retrieve a message's details
curl --request POST \
--url https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id} \
--header 'Authorization: Bearer <token>' \
--header 'business-id: <business-id>'import requests
url = "https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}"
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'business-id': '<business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}', 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://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"business-id: <business-id>"
],
]);
$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://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"chat_messages": [
{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"sender": "<string>",
"status": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"attachments": [
{
"file_size": 123,
"file_type": "<string>",
"filename": "<string>",
"url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"error_code": 123,
"error_reason": "<string>",
"message_sid": "<string>",
"no_reply": false,
"receiver": "<string>",
"sender_type": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"user_message": null
}
],
"function_calls": [
{
"arguments": "<string>",
"call_id": "<string>",
"name": "<string>",
"type": "function_call"
}
],
"last_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"receiver": "<string>",
"reply_group": null,
"resp_id": "<string>",
"user_message": {
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"sender": "<string>",
"status": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"attachments": [
{
"file_size": 123,
"file_type": "<string>",
"filename": "<string>",
"url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"error_code": 123,
"error_reason": "<string>",
"message_sid": "<string>",
"no_reply": false,
"receiver": "<string>",
"sender_type": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"user_message": null
}
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}messages
Retrieve a message's details
Returns one message with its delivery details, optionally including the replies generated in the same exchange. This operation only reads; it uses POST for historical reasons. The business is taken from the business-id header rather than the URL; the path-scoped form of this operation is deprecated.
POST
/
api
/
v1
/
chats
/
{chat_id}
/
messages
/
{message_id}
Retrieve a message's details
curl --request POST \
--url https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id} \
--header 'Authorization: Bearer <token>' \
--header 'business-id: <business-id>'import requests
url = "https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}"
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'business-id': '<business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}', 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://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"business-id: <business-id>"
],
]);
$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://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/chats/{chat_id}/messages/{message_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"chat_messages": [
{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"sender": "<string>",
"status": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"attachments": [
{
"file_size": 123,
"file_type": "<string>",
"filename": "<string>",
"url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"error_code": 123,
"error_reason": "<string>",
"message_sid": "<string>",
"no_reply": false,
"receiver": "<string>",
"sender_type": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"user_message": null
}
],
"function_calls": [
{
"arguments": "<string>",
"call_id": "<string>",
"name": "<string>",
"type": "function_call"
}
],
"last_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"receiver": "<string>",
"reply_group": null,
"resp_id": "<string>",
"user_message": {
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"sender": "<string>",
"status": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"attachments": [
{
"file_size": 123,
"file_type": "<string>",
"filename": "<string>",
"url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"error_code": 123,
"error_reason": "<string>",
"message_sid": "<string>",
"no_reply": false,
"receiver": "<string>",
"sender_type": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"user_message": null
}
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Autorizações
Personal access token (izap_pat_…) sent as Authorization: Bearer ; dashboard session JWTs are also accepted.
Cabeçalhos
UUID of the business the request is scoped to. Required on this route; the deprecated /businesses/{business_id}/... form takes it from the path instead.
Parâmetros de consulta
Resposta
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes