Skip to main content
Callback
curl --request POST \
  --url https://{api_endpoint}/v1/callback/{thread_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "<string>",
  "content": [
    {
      "json_schema": {},
      "ui_schema": {},
      "form_data": {},
      "id": "<string>",
      "form_operation": "<string>",
      "sub_type": "<string>",
      "event_type": "<string>",
      "dps_payload_id": "<string>"
    }
  ],
  "mentions": [
    {
      "type": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    }
  ],
  "document_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "additional_properties": {
    "wxa_message": {},
    "display_properties": {
      "skip_render": false,
      "is_async": false,
      "form_operation": ""
    },
    "tool_calls": [
      {}
    ],
    "tool_call_id": "<string>",
    "tool_name": "<string>",
    "wxo_connection_status": {
      "connection_status": "<string>",
      "connection_message": "<string>"
    }
  },
  "assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "context": {
    "values": []
  },
  "step_history": [
    {}
  ],
  "message_state": {}
}
'
import requests

url = "https://{api_endpoint}/v1/callback/{thread_id}"

payload = {
    "role": "<string>",
    "content": [
        {
            "json_schema": {},
            "ui_schema": {},
            "form_data": {},
            "id": "<string>",
            "form_operation": "<string>",
            "sub_type": "<string>",
            "event_type": "<string>",
            "dps_payload_id": "<string>"
        }
    ],
    "mentions": [
        {
            "type": "<string>",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "name": "<string>"
        }
    ],
    "document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
    "parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "additional_properties": {
        "wxa_message": {},
        "display_properties": {
            "skip_render": False,
            "is_async": False,
            "form_operation": ""
        },
        "tool_calls": [{}],
        "tool_call_id": "<string>",
        "tool_name": "<string>",
        "wxo_connection_status": {
            "connection_status": "<string>",
            "connection_message": "<string>"
        }
    },
    "assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "context": { "values": [] },
    "step_history": [{}],
    "message_state": {}
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    role: '<string>',
    content: [
      {
        json_schema: {},
        ui_schema: {},
        form_data: {},
        id: '<string>',
        form_operation: '<string>',
        sub_type: '<string>',
        event_type: '<string>',
        dps_payload_id: '<string>'
      }
    ],
    mentions: [
      {type: '<string>', id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'}
    ],
    document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
    parent_message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
    additional_properties: {
      wxa_message: {},
      display_properties: {skip_render: false, is_async: false, form_operation: ''},
      tool_calls: [{}],
      tool_call_id: '<string>',
      tool_name: '<string>',
      wxo_connection_status: {connection_status: '<string>', connection_message: '<string>'}
    },
    assistant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
    context: {values: []},
    step_history: [{}],
    message_state: {}
  })
};

fetch('https://{api_endpoint}/v1/callback/{thread_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_endpoint}/v1/callback/{thread_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'role' => '<string>',
    'content' => [
        [
                'json_schema' => [
                                
                ],
                'ui_schema' => [
                                
                ],
                'form_data' => [
                                
                ],
                'id' => '<string>',
                'form_operation' => '<string>',
                'sub_type' => '<string>',
                'event_type' => '<string>',
                'dps_payload_id' => '<string>'
        ]
    ],
    'mentions' => [
        [
                'type' => '<string>',
                'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
                'name' => '<string>'
        ]
    ],
    'document_ids' => [
        '3c90c3cc-0d44-4b50-8888-8dd25736052a'
    ],
    'parent_message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
    'additional_properties' => [
        'wxa_message' => [
                
        ],
        'display_properties' => [
                'skip_render' => false,
                'is_async' => false,
                'form_operation' => ''
        ],
        'tool_calls' => [
                [
                                
                ]
        ],
        'tool_call_id' => '<string>',
        'tool_name' => '<string>',
        'wxo_connection_status' => [
                'connection_status' => '<string>',
                'connection_message' => '<string>'
        ]
    ],
    'assistant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
    'context' => [
        'values' => [
                
        ]
    ],
    'step_history' => [
        [
                
        ]
    ],
    'message_state' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

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

curl_close($curl);

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

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

func main() {

	url := "https://{api_endpoint}/v1/callback/{thread_id}"

	payload := strings.NewReader("{\n  \"role\": \"<string>\",\n  \"content\": [\n    {\n      \"json_schema\": {},\n      \"ui_schema\": {},\n      \"form_data\": {},\n      \"id\": \"<string>\",\n      \"form_operation\": \"<string>\",\n      \"sub_type\": \"<string>\",\n      \"event_type\": \"<string>\",\n      \"dps_payload_id\": \"<string>\"\n    }\n  ],\n  \"mentions\": [\n    {\n      \"type\": \"<string>\",\n      \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"document_ids\": [\n    \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n  ],\n  \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n  \"additional_properties\": {\n    \"wxa_message\": {},\n    \"display_properties\": {\n      \"skip_render\": false,\n      \"is_async\": false,\n      \"form_operation\": \"\"\n    },\n    \"tool_calls\": [\n      {}\n    ],\n    \"tool_call_id\": \"<string>\",\n    \"tool_name\": \"<string>\",\n    \"wxo_connection_status\": {\n      \"connection_status\": \"<string>\",\n      \"connection_message\": \"<string>\"\n    }\n  },\n  \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n  \"context\": {\n    \"values\": []\n  },\n  \"step_history\": [\n    {}\n  ],\n  \"message_state\": {}\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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_endpoint}/v1/callback/{thread_id}")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"role\": \"<string>\",\n  \"content\": [\n    {\n      \"json_schema\": {},\n      \"ui_schema\": {},\n      \"form_data\": {},\n      \"id\": \"<string>\",\n      \"form_operation\": \"<string>\",\n      \"sub_type\": \"<string>\",\n      \"event_type\": \"<string>\",\n      \"dps_payload_id\": \"<string>\"\n    }\n  ],\n  \"mentions\": [\n    {\n      \"type\": \"<string>\",\n      \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"document_ids\": [\n    \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n  ],\n  \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n  \"additional_properties\": {\n    \"wxa_message\": {},\n    \"display_properties\": {\n      \"skip_render\": false,\n      \"is_async\": false,\n      \"form_operation\": \"\"\n    },\n    \"tool_calls\": [\n      {}\n    ],\n    \"tool_call_id\": \"<string>\",\n    \"tool_name\": \"<string>\",\n    \"wxo_connection_status\": {\n      \"connection_status\": \"<string>\",\n      \"connection_message\": \"<string>\"\n    }\n  },\n  \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n  \"context\": {\n    \"values\": []\n  },\n  \"step_history\": [\n    {}\n  ],\n  \"message_state\": {}\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://{api_endpoint}/v1/callback/{thread_id}")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"role\": \"<string>\",\n  \"content\": [\n    {\n      \"json_schema\": {},\n      \"ui_schema\": {},\n      \"form_data\": {},\n      \"id\": \"<string>\",\n      \"form_operation\": \"<string>\",\n      \"sub_type\": \"<string>\",\n      \"event_type\": \"<string>\",\n      \"dps_payload_id\": \"<string>\"\n    }\n  ],\n  \"mentions\": [\n    {\n      \"type\": \"<string>\",\n      \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n      \"name\": \"<string>\"\n    }\n  ],\n  \"document_ids\": [\n    \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n  ],\n  \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n  \"additional_properties\": {\n    \"wxa_message\": {},\n    \"display_properties\": {\n      \"skip_render\": false,\n      \"is_async\": false,\n      \"form_operation\": \"\"\n    },\n    \"tool_calls\": [\n      {}\n    ],\n    \"tool_call_id\": \"<string>\",\n    \"tool_name\": \"<string>\",\n    \"wxo_connection_status\": {\n      \"connection_status\": \"<string>\",\n      \"connection_message\": \"<string>\"\n    }\n  },\n  \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n  \"context\": {\n    \"values\": []\n  },\n  \"step_history\": [\n    {}\n  ],\n  \"message_state\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

thread_id
string
required

Body

application/json
role
string
required
content
required
mentions
(Mention · object | AssistantMention · object)[] | null
document_ids
string<uuid>[] | null
parent_message_id
string<uuid> | null
additional_properties
AdditionalProperties · object | null
assistant_id
string<uuid> | null
context
Context · object | null
step_history
Step History · object[] | null
message_state
Message State · object | null

Response

Successful Response