Skip to main content
POST
/
ai
/
threads
/
{thread_id}
/
run
Run thread
curl --request POST \
  --url https://api.wacht.dev/ai/threads/{thread_id}/run \
  --header 'Content-Type: multipart/form-data' \
  --cookie __session= \
  --form 'message=<string>' \
  --form 'files=<string>' \
  --form 'request_message_id=<string>' \
  --form 'approval_tool_name=<string>' \
  --form approval_mode=allow_once \
  --form cancel=true \
  --form files.items='@example-file'
{
  "status": 123,
  "message": "<string>",
  "session": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ],
  "data": {
    "status": "queued",
    "conversation_id": "<string>"
  }
}

Authorizations

__session
string
cookie
required

Path Parameters

thread_id
string
required

Body

multipart/form-data
message
string
files
file[]
request_message_id
string
approval_tool_name
string[]
approval_mode
enum<string>[]
Available options:
allow_once,
allow_always
cancel
boolean

Response

200 - application/json

Execution queued or cancelled

status
integer
message
string
session
object
errors
object[]
data
object