> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/mutations/ai-assistant/new-user.md).

# Add user to journey

Use the `addUserToJourney` mutation to assign a user to a WGPT journey.

## **Arguments**

<table data-header-hidden><thead><tr><th>Argument</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Argument</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>input</code></td><td>Input</td><td></td></tr><tr><td><code>input.journey</code></td><td>ID!</td><td>Id of the journey to assign.</td></tr><tr><td><code>input.portalUser</code></td><td>ID!</td><td>Id of the Coach to assign.</td></tr><tr><td><code>input.profile</code></td><td>ID!</td><td>User Id base64 encoded.</td></tr></tbody></table>

## Available Fields

The following fields will be displayed in the response:

| Field     | Type   | Description                                                                          |
| --------- | ------ | ------------------------------------------------------------------------------------ |
| `success` | string | **True** if the user has been assigned to journey successfully. Otherwise, **False** |
| `message` | string | Description of the result                                                            |

## **Examples**

### Setup a user's password

{% tabs %}
{% tab title="Request" %}

```graphql
mutation{
  addUserToJourney (input:{journey:"Sm91cm5leTowNTM1NDgwNC0xZWVlLTQzN2YtYjczNS01N2IwZGE2MzA0ZDQ=" portalUser:"Q29hY2g6NzczMA==" profile:"TWVtYmVyOjMwNmEzMmI5LTJkZjAtNGM1MS05MmM4LWQwMDJiODE0NGE0MA=="}){
    success
    message
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "createUser": {
      "success": true,
      "message": "User assigned to journey"
    }
  }
}
```

{% endtab %}
{% endtabs %}
