# Send-IntelligenceXMessage

Sends a message to a thread and starts a turn.

Command 

**Module**

`IntelligenceX.PowerShell`

**Inputs**

`IntelligenceX.OpenAI.IntelligenceXClient`

**Outputs**

`IntelligenceX.Json.JsonValue` `IntelligenceX.OpenAI.AppServer.Models.TurnInfo`

Sends a message to a thread and starts a turn.

## Syntax

```
Send-IntelligenceXMessage
-Text <string>
-ThreadId <string>
[-ApprovalPolicy <string>]
[-Client <IntelligenceXClient>]
[-CurrentDirectory <string>]
[-Model <string>]
[-NetworkAccess]
[-Raw]
[-SandboxType <string>]
[-WritableRoot <string[]>]
[<CommonParameters>]
```

[#](#method-send-intelligencexmessage-string-string-string-intelligencexclient-string-string-switchparameter-switchparameter-string-string)

## Examples

### Example 1

```powershell
Send-IntelligenceXMessage -ThreadId $thread.id -Text "Review this diff."
```

Send a message in an existing thread

### Example 2

```powershell
Send-IntelligenceXMessage -ThreadId $thread.id -Text "Summarize changes." -Model "gpt-5.3-codex"
```

Send a message with a temporary model override

### Example 3

```powershell
Send-IntelligenceXMessage -ThreadId $thread.id -Text "Run tests" -SandboxType "workspace" -NetworkAccess -WritableRoot "C:\repo"
```

Send a message with a workspace sandbox

### Example 4

```powershell
Send-IntelligenceXMessage -ThreadId $thread.id -Text "Status?" -Raw
```

Return raw JSON output

## Parameters

**-Text string required**

Message text to send.

**-ThreadId string required**

Thread identifier to send the message to.

**-ApprovalPolicy string optional**

Approval policy name to use.

**-Client IntelligenceXClient optionalpipeline: true (ByValue)**

Client instance to use. Defaults to the active client.

**-CurrentDirectory string optional**

Working directory to pass to the app-server.

**-Model string optional**

Optional model override.

**-NetworkAccess SwitchParameter optional**

Enable network access for sandboxed runs.

**-Raw SwitchParameter optional**

Return raw JSON response.

**-SandboxType string optional**

Sandbox type (for example 'workspace' or 'danger-full-access').

**-WritableRoot string[] optional**

Writable root paths for sandboxed runs.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:221D644C55501064334EF4C512C4919B18C35BB71A67A370C364DB36504B6910 -->
