> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# RelayTasks

# Package: containersApp

# Namespace: ContainersChat

# Method link: https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/relay-tasks.md

## Introduction

Updates the task list on the in-flight assistant turn.

---

## REST API

### Schema

```
 Method: relayTasks
 Description: Updates the task list on the in-flight assistant turn.
 URL: https://www.wixapis.com/containers/chat/v1/conversations/{conversationId}/relay-tasks
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  correlationId
 Method parameters: 
   param name: correlationId | type: correlationId | description: GUID of the user message the assistant turn is responding to. | required: true | validation: format GUID
   param name: tasks | type: array<tasks> | description: Current task list.  | validation: maxItems 200
              - name: id | type: string | description: Client-supplied task GUID, unique within the turn.  | validation: maxLength 100
              - name: title | type: string | description: Human-readable task description.  | validation: maxLength 500
              - name: status | type: TaskStatus | description: Current status of the task.  
                     - enum: PENDING, IN_PROGRESS, DONE_TASK, FAILED
 Return type: RelayTasksResponse
  EMPTY-OBJECT {}


```

### Examples

### Relay Tasks
Updates the task list on the in-flight assistant turn.

```curl
curl -X POST \
  'https://www.wixapis.com/containers/chat/v1/conversations/1f5b2c8e-9a3d-4c21-8b77-2d2f6e0a9c10/relay-tasks' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "correlationId": "d5e9f3c2-1a4b-4c8d-9e7f-2b3c4d5e6f70",
    "tasks": [
      {
        "id": "task-1",
        "title": "Add contact form component",
        "status": "IN_PROGRESS"
      }
    ]
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.containers.chat.relayTasks(conversationId, correlationId, options)
 Description: Updates the task list on the in-flight assistant turn.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  conversationId, correlationId
 Method parameters: 
   param name: conversationId | type: string | description: Conversation GUID. | required: true | validation: format GUID
   param name: correlationId | type: string | description: GUID of the user message the assistant turn is responding to. | required: true | validation: format GUID
   param name: options | type: RelayTasksOptions  none  
        - name: tasks | type: array<Task> | description: Current task list.  | validation: maxItems 200
           - name: _id | type: string | description: Client-supplied task GUID, unique within the turn.  | validation: maxLength 100
           - name: title | type: string | description: Human-readable task description.  | validation: maxLength 500
           - name: status | type: TaskStatus | description: Current status of the task.  
                 - enum: PENDING, IN_PROGRESS, DONE_TASK, FAILED
 Return type: PROMISE<RelayTasksResponse>
  EMPTY-OBJECT {}


```

### Examples

### Relay tasks on an in-flight assistant turn
```javascript
import { chat } from "@wix/containers";

async function relayTasks() {
  await chat.relayTasks(
    "1f5b2c8e-9a3d-4c21-8b77-2d2f6e0a9c10",
    "d5e9f3c2-1a4b-4c8d-9e7f-2b3c4d5e6f70",
    {
      tasks: [
        {
          id: "task-1",
          title: "Add contact form component",
          status: "IN_PROGRESS",
        },
      ],
    },
  );
}

```

### relayTasks (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { chat } from '@wix/containers';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { chat },
  // Include the auth strategy and host as relevant
});


async function relayTasks(conversationId,correlationId,options) {
  const response = await myWixClient.chat.relayTasks(conversationId,correlationId,options);
};
```

---