---
title: "Steer a task with a message"
url: https://hexelstudio.com/docs/api/harness/tasks/messages
---

# Steer a task with a message

**POST** `/harness/tasks/{id}/messages`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for your organization.

- `X-Workspace-Id: string`

  The workspace the request acts in (`ws_...`). It never grants access by itself.

- `X-Environment-Id: string`

  The environment the request acts in (`env_...`). It never grants access by itself.

## Body parameters

- `text: string`

- `mode: optional string`

  One of: `"queue"`, `"now"`

  Default: `"queue"`

## Returns

`202` Queued. (`object`)

- `queued: boolean`

## Errors

- `default` 

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/harness/tasks/{id}/messages' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'X-Workspace-Id: X_WORKSPACE_ID' \
  --header 'X-Environment-Id: X_ENVIRONMENT_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "string",
  "mode": "queue"
}'
```

### Response (202)

```json
{
  "queued": true
}
```
