---
title: "Retrieves a stream of messages for a specific thread. This method establishes and manages a stream to receive continuous messages."
method: GET
path: "/aiagents/locations/{locationId}/ProcessMessageStream"
tags: ["AIAgents"]
---

# Retrieves a stream of messages for a specific thread. This method establishes and manages a stream to receive continuous messages.

`GET /aiagents/locations/{locationId}/ProcessMessageStream`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/aiagents/locations/{locationId}/ProcessMessageStream`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/aiagents/locations/:locationId/ProcessMessageStream/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `locationId` integer, required

## Query parameters

- `setupId` integer, required
- `threadId` string, required
- `assistantId` string, required
- `enableMetrics` boolean

## Response `200`

Message stream successfully received.

## Other responses

- `401`: Indicates that the requested resource requires authentication. <br>Error codes: 504 - API call rejected by security permissions;

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
