Skip to main content
Run Assistant
curl --request POST \
  --url https://{api_endpoint}/v1/assistants/{assistant_id}/runs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": {
    "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": {}
  },
  "thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "llm_params": {
    "beam_width": 1,
    "include_stop_sequence": true,
    "length_penalty": {
      "decay_factor": 2,
      "start_index": 2
    },
    "max_new_tokens": 1,
    "min_new_tokens": 1,
    "random_seed": 2147483648,
    "repetition_penalty": 1.5,
    "return_options": {
      "generated_tokens": false,
      "input_parameters": true,
      "input_text": false,
      "input_tokens": false,
      "token_logprobs": false,
      "token_ranks": false,
      "top_n_tokens": 2
    },
    "stop_sequences": "[\" and \"]",
    "temperature": 1,
    "time_limit": 123,
    "top_k": 50,
    "top_p": 0.5,
    "truncate_input_tokens": 1,
    "typical_p": 0.505
  },
  "guardrails": {
    "hap": {
      "input": {
        "enabled": false,
        "threshold": 0.5
      },
      "output": {
        "enabled": false,
        "threshold": 0.5
      },
      "mask": {
        "remove_entity_value": false
      }
    },
    "social_bias": {
      "input": {
        "enabled": false,
        "threshold": 0.5
      },
      "output": {
        "enabled": false,
        "threshold": 0.5
      },
      "mask": {
        "remove_entity_value": false
      }
    },
    "pii": {
      "input": {
        "enabled": false,
        "threshold": 0.5
      },
      "output": {
        "enabled": false,
        "threshold": 0.5
      },
      "mask": {
        "remove_entity_value": false
      }
    }
  },
  "context": {},
  "agent_id": "<string>",
  "additional_parameters": {},
  "environment_id": "<string>",
  "version": 123,
  "context_variables": {}
}
'
import requests

url = "https://{api_endpoint}/v1/assistants/{assistant_id}/runs"

payload = {
"message": {
"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": {}
},
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"llm_params": {
"beam_width": 1,
"include_stop_sequence": True,
"length_penalty": {
"decay_factor": 2,
"start_index": 2
},
"max_new_tokens": 1,
"min_new_tokens": 1,
"random_seed": 2147483648,
"repetition_penalty": 1.5,
"return_options": {
"generated_tokens": False,
"input_parameters": True,
"input_text": False,
"input_tokens": False,
"token_logprobs": False,
"token_ranks": False,
"top_n_tokens": 2
},
"stop_sequences": "[\" and \"]",
"temperature": 1,
"time_limit": 123,
"top_k": 50,
"top_p": 0.5,
"truncate_input_tokens": 1,
"typical_p": 0.505
},
"guardrails": {
"hap": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
},
"social_bias": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
},
"pii": {
"input": {
"enabled": False,
"threshold": 0.5
},
"output": {
"enabled": False,
"threshold": 0.5
},
"mask": { "remove_entity_value": False }
}
},
"context": {},
"agent_id": "<string>",
"additional_parameters": {},
"environment_id": "<string>",
"version": 123,
"context_variables": {}
}
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({
message: {
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: {}
},
thread_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
llm_params: {
beam_width: 1,
include_stop_sequence: true,
length_penalty: {decay_factor: 2, start_index: 2},
max_new_tokens: 1,
min_new_tokens: 1,
random_seed: 2147483648,
repetition_penalty: 1.5,
return_options: {
generated_tokens: false,
input_parameters: true,
input_text: false,
input_tokens: false,
token_logprobs: false,
token_ranks: false,
top_n_tokens: 2
},
stop_sequences: '[" and "]',
temperature: 1,
time_limit: 123,
top_k: 50,
top_p: 0.5,
truncate_input_tokens: 1,
typical_p: 0.505
},
guardrails: {
hap: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
},
social_bias: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
},
pii: {
input: {enabled: false, threshold: 0.5},
output: {enabled: false, threshold: 0.5},
mask: {remove_entity_value: false}
}
},
context: {},
agent_id: '<string>',
additional_parameters: {},
environment_id: '<string>',
version: 123,
context_variables: {}
})
};

fetch('https://{api_endpoint}/v1/assistants/{assistant_id}/runs', 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/assistants/{assistant_id}/runs",
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([
'message' => [
'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' => [

]
],
'thread_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'llm_params' => [
'beam_width' => 1,
'include_stop_sequence' => true,
'length_penalty' => [
'decay_factor' => 2,
'start_index' => 2
],
'max_new_tokens' => 1,
'min_new_tokens' => 1,
'random_seed' => 2147483648,
'repetition_penalty' => 1.5,
'return_options' => [
'generated_tokens' => false,
'input_parameters' => true,
'input_text' => false,
'input_tokens' => false,
'token_logprobs' => false,
'token_ranks' => false,
'top_n_tokens' => 2
],
'stop_sequences' => '[" and "]',
'temperature' => 1,
'time_limit' => 123,
'top_k' => 50,
'top_p' => 0.5,
'truncate_input_tokens' => 1,
'typical_p' => 0.505
],
'guardrails' => [
'hap' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
],
'social_bias' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
],
'pii' => [
'input' => [
'enabled' => false,
'threshold' => 0.5
],
'output' => [
'enabled' => false,
'threshold' => 0.5
],
'mask' => [
'remove_entity_value' => false
]
]
],
'context' => [

],
'agent_id' => '<string>',
'additional_parameters' => [

],
'environment_id' => '<string>',
'version' => 123,
'context_variables' => [

]
]),
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/assistants/{assistant_id}/runs"

payload := strings.NewReader("{\n \"message\": {\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 },\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"llm_params\": {\n \"beam_width\": 1,\n \"include_stop_sequence\": true,\n \"length_penalty\": {\n \"decay_factor\": 2,\n \"start_index\": 2\n },\n \"max_new_tokens\": 1,\n \"min_new_tokens\": 1,\n \"random_seed\": 2147483648,\n \"repetition_penalty\": 1.5,\n \"return_options\": {\n \"generated_tokens\": false,\n \"input_parameters\": true,\n \"input_text\": false,\n \"input_tokens\": false,\n \"token_logprobs\": false,\n \"token_ranks\": false,\n \"top_n_tokens\": 2\n },\n \"stop_sequences\": \"[\\\" and \\\"]\",\n \"temperature\": 1,\n \"time_limit\": 123,\n \"top_k\": 50,\n \"top_p\": 0.5,\n \"truncate_input_tokens\": 1,\n \"typical_p\": 0.505\n },\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"context\": {},\n \"agent_id\": \"<string>\",\n \"additional_parameters\": {},\n \"environment_id\": \"<string>\",\n \"version\": 123,\n \"context_variables\": {}\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/assistants/{assistant_id}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\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 },\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"llm_params\": {\n \"beam_width\": 1,\n \"include_stop_sequence\": true,\n \"length_penalty\": {\n \"decay_factor\": 2,\n \"start_index\": 2\n },\n \"max_new_tokens\": 1,\n \"min_new_tokens\": 1,\n \"random_seed\": 2147483648,\n \"repetition_penalty\": 1.5,\n \"return_options\": {\n \"generated_tokens\": false,\n \"input_parameters\": true,\n \"input_text\": false,\n \"input_tokens\": false,\n \"token_logprobs\": false,\n \"token_ranks\": false,\n \"top_n_tokens\": 2\n },\n \"stop_sequences\": \"[\\\" and \\\"]\",\n \"temperature\": 1,\n \"time_limit\": 123,\n \"top_k\": 50,\n \"top_p\": 0.5,\n \"truncate_input_tokens\": 1,\n \"typical_p\": 0.505\n },\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"context\": {},\n \"agent_id\": \"<string>\",\n \"additional_parameters\": {},\n \"environment_id\": \"<string>\",\n \"version\": 123,\n \"context_variables\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{api_endpoint}/v1/assistants/{assistant_id}/runs")

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 \"message\": {\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 },\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"llm_params\": {\n \"beam_width\": 1,\n \"include_stop_sequence\": true,\n \"length_penalty\": {\n \"decay_factor\": 2,\n \"start_index\": 2\n },\n \"max_new_tokens\": 1,\n \"min_new_tokens\": 1,\n \"random_seed\": 2147483648,\n \"repetition_penalty\": 1.5,\n \"return_options\": {\n \"generated_tokens\": false,\n \"input_parameters\": true,\n \"input_text\": false,\n \"input_tokens\": false,\n \"token_logprobs\": false,\n \"token_ranks\": false,\n \"top_n_tokens\": 2\n },\n \"stop_sequences\": \"[\\\" and \\\"]\",\n \"temperature\": 1,\n \"time_limit\": 123,\n \"top_k\": 50,\n \"top_p\": 0.5,\n \"truncate_input_tokens\": 1,\n \"typical_p\": 0.505\n },\n \"guardrails\": {\n \"hap\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"social_bias\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n },\n \"pii\": {\n \"input\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"output\": {\n \"enabled\": false,\n \"threshold\": 0.5\n },\n \"mask\": {\n \"remove_entity_value\": false\n }\n }\n },\n \"context\": {},\n \"agent_id\": \"<string>\",\n \"additional_parameters\": {},\n \"environment_id\": \"<string>\",\n \"version\": 123,\n \"context_variables\": {}\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

assistant_id
string
required

Body

application/json
message
CreateMessage · object | null
thread_id
string<uuid> | null
llm_params
TextGenerationParameters · object | null
guardrails
Guardrails · object | null
context
Context · object | null
agent_id
string | null
additional_parameters
Additional Parameters · object | null
environment_id
string | null
version
integer | null
context_variables
Context Variables · object | null

Context variables for the agent execution (e.g., {'wxo_email_id': 'user@domain.com', 'wxo_user_name': 'John Doe'})

Response

Successful Response