> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.moveworks.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.moveworks.com/_mcp/server.

# Create response (streaming)

POST https://api.moveworks.ai/assistant/v1/conversations/{conversation_id}/responses/stream
Content-Type: application/json

Creates a response and streams updates in real-time via Server-Sent Events (SSE). This provides a real-time alternative to creating a response and polling the GetResponse endpoint.

Reference: https://help.moveworks.com/api-reference/conversations-api/conversations-api/responses/create-response-stream

## Authentication

- `Authorization` header (bearer token, required) — JWT bearer token authentication. Obtain an access token from the Moveworks auth endpoint and include it in the Authorization header as 'Bearer \<token>'.

## Request

### Path parameters

- `conversation_id` (string, required) — A base-62 identifier prefixed by a short resource type

### Headers

- `Assistant-Name` (string, required) — The Moveworks assistant identifier that was configured for your organization.
- `Accept` (enum, required) — Must be set to `text/event-stream` to receive Server-Sent Events
  - Allowed values: `text/event-stream`

### Body (application/json)

- `input` (object or object, required) — User input message
  - Text
    - `text` (string, required) — User message text
  - Callback
    - `callback_id` (string, required) — Opaque callback id for an action the user triggered (e.g. clicking a button rendered in a prior assistant message).

## Response

### 200

Server-Sent Events stream of response updates

- Streaming response of `object`.

## Examples

**Request**

```json
{
  "body": {
    "input": {
      "text": "Who does John Doe report to?"
    }
  }
}
```

**Response**

```json
[
  {
    "event_type": "RESPONSE_CREATED",
    "response": {
      "conversation_id": "conv_32bt7BMLhLyVzTUjfi35N",
      "created_at": "2025-01-20T10:00:00Z",
      "outputs": [],
      "response_id": "resp_32bt7rXXugeJjvE3pQzOk",
      "status": "CREATED"
    },
    "sequence_number": 1
  },
  {
    "event_type": "RESPONSE_IN_PROGRESS",
    "response": {
      "conversation_id": "conv_32bt7BMLhLyVzTUjfi35N",
      "created_at": "2025-01-20T10:00:00Z",
      "outputs": [],
      "response_id": "resp_32bt7rXXugeJjvE3pQzOk",
      "status": "IN_PROGRESS"
    },
    "sequence_number": 2
  },
  {
    "event_type": "RESPONSE_OUTPUT_DELTA",
    "output": {
      "reasoning_message": {
        "content": {
          "commonmark_text": {
            "text": "Looking up John Doe..."
          },
          "type": "COMMONMARK_TEXT"
        },
        "conversation_id": "conv_32bt7BMLhLyVzTUjfi35N",
        "created_at": "2025-01-20T10:00:01Z",
        "reasoning_message_id": "rs_32bt8IqHzbv0FLmtGssa3",
        "response_id": "resp_32bt7rXXugeJjvE3pQzOk"
      },
      "type": "REASONING_MESSAGE"
    },
    "sequence_number": 3
  },
  {
    "event_type": "RESPONSE_OUTPUT_DELTA",
    "output": {
      "message": {
        "actor": "ASSISTANT",
        "content": {
          "commonmark_text": {
            "text": "John Doe reports to Jane Smith in the Engineering department."
          },
          "type": "COMMONMARK_TEXT"
        },
        "conversation_id": "conv_32bt7BMLhLyVzTUjfi35N",
        "created_at": "2025-01-20T10:00:01Z",
        "feedback": {
          "helpful": {
            "callback_id": "eyJhY3Rpb24iOiJoZWxwZnVsIi4uLn0"
          },
          "unhelpful": {
            "callback_id": "eyJhY3Rpb24iOiJ1bmhlbHBmdWwiLi4ufQ"
          }
        },
        "message_id": "msg_32bt8vagXAoRwRLIdI2Oj",
        "response_id": "resp_32bt7rXXugeJjvE3pQzOk"
      },
      "type": "MESSAGE"
    },
    "sequence_number": 4
  },
  {
    "event_type": "RESPONSE_COMPLETED",
    "response": {
      "completed_at": "2025-01-20T10:00:15Z",
      "conversation_id": "conv_32bt7BMLhLyVzTUjfi35N",
      "created_at": "2025-01-20T10:00:00Z",
      "outputs": [],
      "response_id": "resp_32bt7rXXugeJjvE3pQzOk",
      "status": "COMPLETED"
    },
    "sequence_number": 5
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream"

payload = { "body": { "input": { "text": "Who does John Doe report to?" } } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"body":{"input":{"text":"Who does John Doe report to?"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream"

	payload := strings.NewReader("{\n  \"body\": {\n    \"input\": {\n      \"text\": \"Who does John Doe report to?\"\n    }\n  }\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(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream")

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  \"body\": {\n    \"input\": {\n      \"text\": \"Who does John Doe report to?\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": {\n    \"input\": {\n      \"text\": \"Who does John Doe report to?\"\n    }\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream', [
  'body' => '{
  "body": {
    "input": {
      "text": "Who does John Doe report to?"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": {\n    \"input\": {\n      \"text\": \"Who does John Doe report to?\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["body": ["input": ["text": "Who does John Doe report to?"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.moveworks.ai/assistant/v1/conversations/conv_32bt7BMLhLyVzTUjfi35N/responses/stream")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```